How to use the Slope Calculator
- Enter the coordinates of two points.
- Read the slope, equation and intercept.
- Use the percent grade for ramps, roofs and roads.
How it works
Slope m = (y₂ − y₁) ÷ (x₂ − x₁). Intercept b = y₁ − m·x₁. Angle = arctan(m). Percent grade = m × 100.
Worked examples
(1, 2) and (4, 8)
m = 6/3 = 2, so y = 2x + 0. The line rises at 63.4°.
Frequently asked questions
What does a slope of 0 or undefined mean?
0 is a horizontal line. Undefined is a vertical line, where the run is zero.
G
Built and reviewed by Guru G
Calculation logic is covered by automated tests against known values. Last reviewed Nov 8, 2026. Found a problem? Let us know — see our editorial policy.