How Slope Is Calculated, and Why It's Called 'Rise Over Run'

The slope formula explained with a worked example, and how slope connects to real-world grade and pitch measurements.

Slope measures how steeply a line rises or falls between two points — the same concept whether you're graphing an equation, designing a wheelchair ramp, or reading a road grade sign.

The formula

m = (y2 − y1) / (x2 − x1)

Worked example

Points (1, 2) and (4, 8): m = (8 − 2) / (4 − 1) = 6/3 = 2. This means for every 1 unit moved horizontally, the line rises 2 units vertically — a fairly steep upward slope.

What different slope values mean

A slope of 0 means a perfectly horizontal line (no rise at all). A very large slope (like 50) means an almost vertical line. A negative slope means the line falls from left to right instead of rising. An undefined slope (division by zero) occurs for a perfectly vertical line, where x1 equals x2 — no amount of horizontal movement, so the formula's denominator becomes zero.

Slope in the real world: road grades

Road grade signs (like "8% grade") express slope as a percentage — identical math, just multiplied by 100 and expressed as rise over horizontal run rather than the raw ratio. An 8% grade means an 8-unit rise for every 100 units traveled horizontally, corresponding to a slope of 0.08 in the standard formula.

Slope and the equation of a line

Once you know a line's slope and one point on it, the full equation follows directly (in point-slope form: y − y1 = m(x − x1)). This is exactly why slope is the first thing typically calculated when fitting a line to two known points — everything else about the line's equation follows from it.

Common mistakes to avoid

  • Swapping the order of subtraction between the numerator and denominator (must consistently be point 2 minus point 1 in both, or point 1 minus point 2 in both)
  • Assuming a steep visual slope on a graph always means a large numeric slope value — this depends heavily on the graph's axis scaling, which can visually exaggerate or minimize the same numeric slope
  • Forgetting that a vertical line's slope is undefined, not zero — these represent opposite extremes, not the same case

Calculate your own slope with the slope calculator, and find the exact midpoint of the same two points with the midpoint calculator.