Slope Calculator (Two Points)
calculated
calculated
calculated
Type in any field to change it. Press × on a value to calculate that field instead.
How to use this calculator
Enter the coordinates of two points, (x₁, y₁) and (x₂, y₂). You get the slope, the straight-line distance between the points and the angle of the line.
Formulas
m = (y₂ − y₁) ÷ (x₂ − x₁)
d = √((x₂ − x₁)² + (y₂ − y₁)²)
θ = tan⁻¹(m)
Worked example
Points (1, 2) and (4, 6):
- Rise = 6 − 2 = 4, run = 4 − 1 = 3
- Slope m = 4 ÷ 3 = 1.333
- Distance = √(3² + 4²) = 5
- Angle = tan⁻¹(1.333) = 53.13°
Equation of the line
With the slope, the line is y = m x + c. Find c from either point: c = y₁ − m x₁ = 2 − 1.333 × 1 = 0.667. So y = 1.333x + 0.667.
Slope as grade and angle
| Grade | Slope | Angle |
|---|---|---|
| 1% | 0.01 | 0.57° |
| 5% | 0.05 | 2.86° |
| 10% | 0.1 | 5.71° |
| 100% | 1 | 45° |
Wheelchair ramps are commonly limited to about 1:12 (8.3%), or about 4.8°.
Frequently asked questions
What is the slope formula?
m = (y₂ − y₁) ÷ (x₂ − x₁) — the change in y (rise) divided by the change in x (run).
What does a negative slope mean?
The line goes down from left to right. A slope of zero is horizontal; a vertical line has an undefined slope.
How do I turn slope into a percentage grade?
Multiply by 100. A slope of 0.05 is a 5% grade — 5 m rise for every 100 m horizontally.