Slope Calculator - Gradient, Line Equation and Distance
Slope between two points
First point
Second point
What slope really measures
Slope is rise over run: how much the line climbs for every step it takes sideways. A slope of 2 means two units up for one across; a slope of −0.5 means half a unit down. The number is a rate, not a length, which is why the same slope describes a wheelchair ramp and a hillside road.
Using it in three steps
- 1 Type the coordinates of the first point, x then y.
- 2 Do the same for the second point. Order does not matter: swapping the two points gives the same slope.
- 3 Read the slope and the line equation at the top; the angle, intercept, distance and midpoint sit below.
Vertical lines have no slope
When both points share the same x, the run is zero and the formula would divide by it. This calculator says the slope does not exist instead of printing infinity, because infinity reads as "very steep" when the truth is that the question does not apply. The line still has an equation - it is just x = a number.
Slope as a percentage
Road signs and building codes usually quote slope as a percentage, which is simply the slope multiplied by a hundred: a gradient of 0.08 is an 8 percent grade. Accessibility rules for ramps are often written this way, and so are railway limits. The angle shown here is the same thing expressed in degrees - 8 percent is about 4.6 degrees, not 8.