Slope Formula: Rise Over Run Explained
The slope formula measures how steep a line is: m = (y₂ − y₁) ⁄ (x₂ − x₁), or “rise over run”.
Distance & Midpoint
The distance between two points on a coordinate plane is the Pythagorean theorem applied to the horizontal and vertical gaps.
- Distance
- d = √((x2 − x1)2 + (y2 − y1)2)
- Midpoint
- M = ((x1 + x2) ⁄ 2, (y1 + y2) ⁄ 2)
- Slope
- m = (y2 − y1) ⁄ (x2 − x1)
- (x₁, y₁) first point
- (x₂, y₂) second point
What the slope tells you
- Positive slope: the line goes up from left to right.
- Negative slope: it goes down.
- Zero: a flat, horizontal line.
- Undefined: a vertical line (you would divide by zero).
Worked example
Find the slope through (1, 2) and (4, 11).
- Rise = 11 − 2 = 9
- Run = 4 − 1 = 3
- m = 9 ÷ 3 = 3
A negative slope
Find the slope through (−2, 5) and (3, −5).
- Rise = −5 − 5 = −10
- Run = 3 − (−2) = 5
- m = −10 ÷ 5 = −2
Slope in real life
A ramp that rises 1 m over 12 m has a slope of 1⁄12 ≈ 0.083. Road signs show it as a percentage: 1⁄12 ≈ 8.3%.
Try the coordinate calculator
Try it yourself
Find the slope through (0, 4) and (6, 1).
Show the answer
m = (1 − 4) ÷ (6 − 0) = −3 ÷ 6 = −0.5
More on the distance, midpoint and slope formulas page.
Slope formula: FAQ
What is the slope formula?
m = (y₂ − y₁) ⁄ (x₂ − x₁), the change in y divided by the change in x.
What does a negative slope mean?
The line goes down from left to right.
What is the slope of a vertical line?
Undefined, because the run is zero.
