How it works
The slope of a line measures how steep it is: how much y changes for each step in x, often described as “rise over run”. A positive slope climbs to the right, a negative one falls, zero is flat and a vertical line has no defined slope.
slope m = (y₂ − y₁) ÷ (x₂ − x₁) · intercept b = y₁ − m × x₁ · y = mx + b angle = arctan(m) · distance = √((x₂ − x₁)² + (y₂ − y₁)²) · midpoint = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2)Worked example. Points (1, 2) and (4, 6): rise = 4, run = 3, so m = 4/3 ≈ 1.333333. b = 2 − 4/3 × 1 = 0.666667, giving y = 1.333333x + 0.666667. The angle is 53.13°, the distance is √(9 + 16) = 5 and the midpoint is (2.5, 4).
Reading a slope
| Slope | Angle | Grade |
|---|---|---|
| 0 | 0° | Flat |
| 0.05 | 2.86° | 5% — typical wheelchair ramp maximum is 8.33% |
| 0.5 | 26.57° | 50% |
| 1 | 45° | 100% |
| Undefined | 90° | Vertical |
Parallel and perpendicular lines
- Parallel lines have equal slopes.
- Perpendicular lines have slopes whose product is −1: the perpendicular to m = 4/3 has slope −3/4.
Slope in real life
Road signs give slope as a percentage grade (rise ÷ run × 100). Roofers use pitch, such as 6/12 — 6 inches of rise per 12 of run, a slope of 0.5. Accessibility rules in many countries limit ramps to 1:12 (8.33%).
Solving equations? The quadratic formula calculator handles ax² + bx + c = 0. For fractions in your slope, try the fraction calculator, and for proportional problems the rule of three.