Math & Science

Slope Calculator

Calculate slope (m), angle of inclination, distance, midpoint, and line equation (y = mx + b) with dynamic Cartesian plot and derivation.

Reviewed for Mathematical Accuracy Last updated: 2026
Standard Positive (1, 2) → (5, 8) Negative Slope (-3, 6) → (5, -2) Horizontal Zero Slope (y = 4) Vertical Line (x = 3)

📍 Point 1 (x₁, y₁)

📍 Point 2 (x₂, y₂)

SLOPE (m = Rise / Run)
1.50
Line Equation: y = 1.50x + 0.50
56.31°
Inclination Angle
7.21
Distance (Length)
(3.0, 5.0)
Midpoint
-0.67
Perpendicular m

The Concept of Slope in Coordinate Geometry

In mathematics, the slope (denoted by the letter $m$) quantifies both the steepness and direction of a straight line connecting two coordinates $(x_1, y_1)$ and $(x_2, y_2)$ on a 2-dimensional Cartesian grid. It is universally defined as the ratio of vertical change (rise) to horizontal change (run):

m = Δy / Δx = (y₂ - y₁) / (x₂ - x₁)

Types of Slope

Slope Type Value of m Visual Orientation Angle Range
Positive Slope $m > 0$ Rises upward from left to right $0^\circ < \theta < 90^\circ$
Negative Slope $m < 0$ Falls downward from left to right $-90^\circ < \theta < 0^\circ$
Zero Slope $m = 0$ Perfect horizontal flat line ($y = C$) $\theta = 0^\circ$
Undefined Slope $\Delta x = 0$ (div by zero) Perfect vertical line ($x = C$) $\theta = 90^\circ$ or $-90^\circ$

Distance, Midpoint, and Equation of the Line

Frequently Asked Questions

What is the slope formula?

The slope formula is m = (y2 - y1) / (x2 - x1), representing the vertical change (rise) divided by the horizontal change (run).

What does an undefined slope mean?

An undefined slope occurs when x1 = x2 (a vertical line). Dividing by zero (Δx = 0) is mathematically undefined in Euclidean geometry.

What is the slope of perpendicular lines?

Perpendicular lines have negative reciprocal slopes: m1 × m2 = -1, or m2 = -1 / m1.

Geometric Application: Slope arithmetic is identical to derivative rates of change in calculus ($\frac{dy}{dx}$), velocity in physics ($\frac{\Delta s}{\Delta t}$), and civil engineering gradient slopes for roadway drainage.