Positive slope
Between (2, 3) and (6, 11), m = (11 − 3) / (6 − 2) = 8/4 = 2.
Values stay on your device
Find slope from two points
Enter two coordinate points to calculate rise, run, and slope, including horizontal and vertical-line cases.
Calculated in your browser
Formula and steps included
No account. No signup.
Formula
Slope: m = (y₂ − y₁) / (x₂ − x₁), when x₂ ≠ x₁
Slope measures vertical change per unit of horizontal change. It is often described as rise over run and keeps the subtraction order consistent for both coordinates.
A positive slope rises from left to right, a negative slope falls, and zero is horizontal. When the run is zero, the line is vertical and its slope is undefined.
Assign the coordinates consistently as (x₁, y₁) and (x₂, y₂).
Subtract y₁ from y₂ to find the vertical change.
Subtract x₁ from x₂ in the same point order used for the y-values.
Divide rise by run when the run is nonzero, then use the sign to describe the line's direction.
Worked examples
Between (2, 3) and (6, 11), m = (11 − 3) / (6 − 2) = 8/4 = 2.
Between (4, −1) and (4, 7), the run is 4 − 4 = 0, so the slope is undefined.
Common questions
Its slope is zero because the y-values do not change, making the rise zero while the run is nonzero.
Both points have the same x-value, so the run is zero. The slope formula would require division by zero, which is undefined.
No, if you reverse both subtraction orders. Both the rise and run change sign, leaving their quotient unchanged.
Your coordinates are not saved by default or uploaded. You can opt into Remember on this device or download a local JSON backup.