Slope is a rate, not a distance
The slope of a line answers one question: how much does y change for each unit that x increases? A slope of 2 means the line climbs two units for every one it moves right. A slope of −0.5 means it drops half a unit for each unit right. The formula m = (y₂ − y₁)/(x₂ − x₁) is exactly that rate, computed from any two points on the line.
Because a straight line has the same steepness everywhere, the two points you pick do not matter. Choose the pair furthest apart if you are reading them off a graph, since the differences are then large relative to your reading error. And take both differences in the same order: subtracting y in one direction and x in the other flips the sign and turns an uphill into a downhill.
Slope is dimensionless when both axes carry the same unit, which is why it can be quoted as a bare ratio, a percentage or an angle without changing anything physical. When the axes carry different units, slope carries units too — the slope of a distance-time graph is a speed in metres per second, and the slope of a cost-quantity graph is a price per unit.
Ratio, percentage, angle and 1-in-N
The same steepness gets written four different ways depending on the trade, and confusing them is expensive. The slope itself is the pure ratio rise/run. Percent grade is that ratio multiplied by 100, so a slope of 0.08 is an 8% grade — this is the form on highway warning signs. The angle of inclination is arctan(m), which is what a digital level or an inclinometer reads. The 1-in-N form inverts the magnitude: a slope of 1/12 is written 1 in 12, the form used in accessibility and drainage codes.
The crucial point is that percent grade and angle are not the same number and are not even proportional. A 100% grade is 45°, not 90°, because grade is 100 tan θ and the tangent runs away to infinity as the angle nears a right angle. A 10% grade is 5.71° and a 2% grade is 1.15°, so the two numbers never coincide anywhere except at zero — even on the gentlest ground the grade is about 1.75 times the angle in degrees. What is true on gentle ground is that the relationship is very nearly linear: because arctan m stays within 2% of m itself for any slope up to 0.25, percent grade is close to 1.745 times the angle in degrees over the whole range a road or a ramp ever uses. A 4.76° ramp is 1.745 × 4.76 = 8.31%, against the exact 8.33%.
Steepness thresholds in real codes are quoted in whichever form is easiest to check on site. The 2010 ADA Standards for Accessible Design cap a new ramp's running slope at 1:12, which is 8.33% or 4.76°. Highway signs post grades in percent because a driver's stopping distance depends on the ratio, not the angle. Roofers use a rise-in-12 pitch because that is what a framing square measures directly.
Worked example: the slope from (1, 2) to (5, 10)
Work the default points by hand, then convert the answer into every form a trade might want.
- Find the rise. y₂ − y₁ = 10 − 2 = 8.
- Find the run. x₂ − x₁ = 5 − 1 = 4.
- Divide. m = 8 ÷ 4 = 2. The line climbs two units for every one across.
- Convert to percent grade. 2 × 100 = 200%. Steeper than any road.
- Convert to an angle. arctan(2) = 63.434949°. Note that 200% is nowhere near 200 degrees.
- Find the perpendicular slope. −1 ÷ 2 = −0.5, so any line at right angles to this one falls half a unit per unit across.
- Write the equation. b = y₁ − mx₁ = 2 − 2(1) = 0, so the line is y = 2x.
Check it by testing the second point: 2 × 5 = 10, which matches y₂, so the equation is right. Reverse the point order as a second check: rise = 2 − 10 = −8 and run = 1 − 5 = −4, and −8 ÷ −4 = 2 again. The slope does not depend on which point you call first.
Now a practical one. A ramp rises 1 foot over a 12-foot run: m = 1/12 = 0.083333, grade 8.3333%, angle arctan(0.083333) = 4.763642°. That is the steepest ramp the ADA permits on a new build, and the reason the code states it as 1:12 is that a builder can verify a 1-in-12 ratio with a level and a tape without any trigonometry at all.
Sign, magnitude and the two special cases
Read the sign first. A positive slope rises left to right; a negative slope falls left to right. A slope of zero is a horizontal line. The sign is a statement about direction only, and it flips if you flip the orientation of the axes — which is why screen coordinates, where y increases downwards, make a positive slope look like it is falling.
Read the magnitude second. A magnitude below 1 means the line runs further than it rises, so it is shallower than 45°. A magnitude above 1 means it rises faster than it runs, so it is steeper than 45°. Exactly 1 is the 45-degree diagonal in both directions.
Two cases need care. A horizontal line has slope 0, a perfectly ordinary number, and its perpendicular is vertical, which has no slope at all — that is why the perpendicular field shows a dash for a horizontal input. A vertical line has zero run, so the slope is undefined rather than infinite; it cannot be written in y = mx + b form at all and is instead written x = constant. This calculator reports 90° for its angle of inclination and 0 for its perpendicular slope, both of which are well defined even where the slope is not.
Slope, percent grade and angle side by side
| Slope m | Percent grade | Angle | 1 in N | Where you meet it |
|---|---|---|---|---|
| 0.02083 | 2.08% | 1.19° | 1 in 48 | Maximum cross slope on an accessible route |
| 0.05 | 5% | 2.86° | 1 in 20 | Steeper than this and a walking surface counts as a ramp (ADA 403.3) |
| 0.08333 | 8.33% | 4.76° | 1 in 12 | Maximum ADA ramp running slope |
| 0.10 | 10% | 5.71° | 1 in 10 | A steep highway grade |
| 0.25 | 25% | 14.04° | 1 in 4 | A 3-in-12 roof pitch |
| 0.50 | 50% | 26.57° | 1 in 2 | A 6-in-12 roof pitch |
| 1.00 | 100% | 45.00° | 1 in 1 | A 12-in-12 roof pitch |
| 2.00 | 200% | 63.43° | 2 in 1 | Far steeper than any road or roof |
The gap between grade and angle widens as the slope grows: at 5% they differ by a factor of 1.75, at 100% by a factor of 2.22. Never treat a percent grade as an angle.
Errors that flip or inflate a slope
- Subtracting in inconsistent orders. (y₂ − y₁) over (x₁ − x₂) reverses the sign. Keep both subtractions pointing the same way.
- Inverting to run over rise. Slope is rise over run. Using run over rise gives the reciprocal, which is the cotangent of the angle rather than its tangent.
- Reading a percent grade as an angle. A 100% grade is 45 degrees. The two coincide only near zero, where arctan(m) ≈ m in radians.
- Calling a vertical slope infinite. Division by zero is undefined, not infinite. A vertical line has no slope and no y = mx + b form; write x = constant instead.
- Taking the perpendicular as −m rather than −1/m. The product of two perpendicular slopes is −1, so the perpendicular of 2 is −0.5, not −2.
The 1:12 ramp rule
Section 405.2 of the 2010 ADA Standards for Accessible Design limits the running slope of a new ramp to 1:12, which is a slope of 0.0833, a grade of 8.33%, or an angle of 4.76°. Section 405.3 limits the cross slope to 1:48, or 2.08%. The code states both as ratios rather than angles because a ratio is directly measurable on site with a spirit level and a tape, with no trigonometry involved. Always check the edition in force in your jurisdiction, since state and local amendments are common.
Where slope leads next
Slope is the bridge between geometry and calculus. The slope of a straight line is constant; the slope of a curve changes from point to point, and the derivative is exactly the limiting slope of the line through two points as they close together. Everything you do with rise over run here reappears there as dy/dx.
In coordinate geometry, slope is the test for parallel and perpendicular. Two lines are parallel when their slopes are equal, and perpendicular when the product of their slopes is −1. Combined with a point, a slope determines a whole line, which is what the line equation calculator produces and what the line intersection calculator consumes.
For the other properties of the same pair of points, use the distance formula calculator for the segment's length and the midpoint calculator for its centre; together with the perpendicular slope from this page, those two give you the perpendicular bisector. To turn a slope back into an angle in a different unit, the inverse trig functions calculator and the degrees to radians calculator handle the conversion.
