Slope Calculator
Enter two points to get the slope, the angle of the line, its percent grade and the equation of the line in slope-intercept, point-slope and standard form.
- Rise = y₂ − y₁ = 8 − 2 = 6
- Run = x₂ − x₁ = 4 − 1 = 3
- m = 6 ÷ 3 = 2
- b = y₁ − m·x₁ = 0
- Angle
- 63.43°
- Grade
- 200%
- Distance
- 6.7082
- Slope-intercept
- y = 2x
- Point-slope
- y − 2 = 2(x − 1)
- Standard form
- 2x − y = 0
Slope is rise over run
Move the two points. The amber step shows the run (how far right) and the rise (how far up). Slope is rise ÷ run: positive climbs to the right, negative falls, zero is flat, and a vertical line has no defined slope because you'd divide by zero.
rise 4 ÷ run 6 = 0.667
How to calculate slope from two points
Subtract the y-values, subtract the x-values in the same order, and divide: m = (y₂ − y₁) / (x₂ − x₁). For (1, 2) and (4, 8): m = (8 − 2) / (4 − 1) = 6 / 3 = 2. The line climbs 2 units for every 1 unit to the right.
Four kinds of slope
- Positive: rises left to right.
- Negative: falls left to right.
- Zero: horizontal, y = constant.
- Undefined: vertical, x = constant.
Parallel lines have equal slopes; perpendicular lines have slopes that multiply to −1 (2 and −½, for example).
Slope in the real world
| Use | Typical slope | As angle |
|---|---|---|
| Wheelchair ramp (ADA maximum) | 1:12 (8.33%) | 4.76° |
| Drain pipe (common minimum) | ¼ in per ft (2.08%) | 1.19° |
| "4/12" roof pitch | 4 ÷ 12 (33.3%) | 18.43° |
| Steep road sign warning | 10% | 5.71° |
Percent grade is slope × 100. It is not the same as the angle: a 100% grade is 45°, not 90°.
Questions people ask
How do you find slope from two points?
Divide the change in y by the change in x: m = (y₂ − y₁) / (x₂ − x₁). Keep the same order for both subtractions.
Does it matter which point is first?
No. Swapping them flips the sign of both rise and run, so the quotient is unchanged.
How do I turn slope into an angle?
Angle = arctan(m). A slope of 1 is 45°; a slope of 0.5 is about 26.57°.
What is the slope of a vertical line?
Undefined, because the run is zero and you cannot divide by zero. Its equation is x = constant.
How do I find the y-intercept?
Plug one point and the slope into b = y − m·x. For m = 2 through (1, 2): b = 2 − 2 = 0, so y = 2x.
Stuck on a word problem?
Paste a homework question or describe your project. The AI tutor names the formula and works it through step by step. Always check the result with the calculator above.