Slope & Distance Calculator
Free slope calculator — slope, distance, midpoint, angle, and line equation between any two points on a graph.
Free slope calculator — slope, distance, midpoint, angle, and line equation between any two points on a graph.
Find slope, angle, distance and midpoint from two points.
Convert between ratio, percentage and degrees for a road or ramp.
Check a pitch or a drainage fall meets the required minimum.
Interpret the slope of a line as the change in y per unit of x.
Height gained over horizontal distance is what separates a pleasant walk from a scramble. Tightly packed contours on a map are a steep slope in your legs.
1-in-40 is 2.5%. Conventional rail struggles beyond about 1-in-25 without assistance, which is why lines take long detours where roads climb straight over.
Rise over run — the change in y divided by the change in x between two points: m = (y₂ − y₁) ÷ (x₂ − x₁). A slope of 2 means the line climbs two units for every one across. Order matters only in that you must be consistent: subtract the same point first in both numerator and denominator, or the sign flips.
Zero slope is a horizontal line — no rise for any run. Undefined slope is a vertical line, where the run is zero and the division is impossible. These are genuinely different cases, not two ways of saying flat, and confusing them is common. A vertical line cannot be written as y = mx + c at all; it needs the form x = a.
They express the same steepness three ways. Slope is the ratio; the angle is arctan of that ratio; percentage gradient is the slope times 100. A slope of 1 is 45° and a 100% gradient — which surprises people who assume 100% means vertical. A 10% road gradient is only about 5.7°, and roads rarely exceed 20%.
Parallel lines have identical slopes. Perpendicular lines have slopes whose product is −1, so each is the negative reciprocal of the other: a line of slope 2 is perpendicular to one of slope −½. The exception is the horizontal-vertical pair, where one slope is zero and the other undefined, so the product rule cannot be applied.
By Pythagoras on the rise and run: d = √((x₂ − x₁)² + (y₂ − y₁)²). It is the straight-line distance regardless of slope, and unlike slope it is always positive and independent of which point you take first. The same two measurements therefore give you slope, angle and distance together.
Road and railway gradients, wheelchair ramp regulations — typically a maximum of 1:12 — roof pitch, drainage falls in plumbing, and the rate of change in any graph. In data work slope is the regression coefficient: the amount y changes per unit of x, which is the whole point of fitting a line to data.