Slope Calculator
Enter two points to find the slope of the line through them — the rise divided by the run. You also get the equation of the line, the angle it makes with the horizontal, the percent grade and the distance between the points. Vertical lines are handled.
Blank for a vertical line, whose slope is undefined.
- Equation of the line
- y = 3x − 1
- Rise (Δy)
- 6
- Run (Δx)
- 2
- Angle of incline
- 71.57 °
- Percent grade
- 300%
- Distance between the points
- 6.3246
Saved setups
Save a set of inputs you reuse — your usual rate, your loan, your room sizes — and load it back in one tap.
Your recent calculations
Results you calculate here are kept on this device so you can come back to them.
Formula
How to use it
- Enter the coordinates of the first point.
- Enter the coordinates of the second point.
- Read the slope and the equation. A positive slope rises to the right; a negative slope falls.
Worked examples
From (1, 2) to (3, 8): rise 6 over run 2
- Slope (m)
- 3
- Equation of the line
- y = 3x − 1
- Rise (Δy)
- 6
- Run (Δx)
- 2
- Angle of incline
- 71.57 °
- Percent grade
- 300%
- Distance between the points
- 6.3246
From (−2, 5) to (4, 2): a falling line
- Slope (m)
- -0.5
- Equation of the line
- y = −0.5x + 4
- Angle of incline
- -26.57 °
- Distance between the points
- 6.7082
From (2, 5) to (2, −1): a vertical line has no slope
- Equation of the line
- x = 2
- Angle of incline
- 90 °
- Distance between the points
- 6
Four kinds of slope
Positive: the line climbs from left to right. Negative: it descends. Zero: the line is horizontal, y = a constant. Undefined: the line is vertical, x = a constant, because the run is zero and you cannot divide by it.
Slope, grade and angle
Roads and ramps quote slope as a percent grade: a rise of 1 over a run of 12 is 8.33%, an angle of 4.76°. That 1:12 ratio is the steepest slope the ADA allows for a wheelchair ramp. A 100% grade is a 45° angle, not a vertical wall.
Questions people ask
What is the slope between (1, 2) and (3, 8)?
(8 − 2) ÷ (3 − 1) = 6 ÷ 2 = 3.
What is the slope of a vertical line?
Undefined. Both points share the same x, so the run is zero. The line’s equation is x = that value.
Does it matter which point I enter first?
No. Swapping the points changes the sign of both the rise and the run, so the slope is the same.