- Home
- Math
- Slope Calculator
Slope Calculator
Slope is rise over run: m = (yโ โ yโ) รท (xโ โ xโ). From (1, 2) to (5, 10) the slope is 8 รท 4 = 2.
Building a ramp or checking a road grade? The result also gives the angle in degrees and the slope as a percent grade.
Slope between two points
Find a second point from a slope and distance
Slope, angle and grade from rise and run
How we got this
Compare options
Row 1 follows the calculator above. Edit any cell.Bulk mode
My saved calculations
Stored only in this browser. Nothing is sent to our servers.Country & format
Change the country edition from the menu at the top.Your next step
Your answer carries over, so you donโt have to type it again.
The slope formula
m = (yโ โ yโ) รท (xโ โ xโ)
A positive slope rises from left to right, a negative one falls, a slope of 0 is flat, and a vertical line has an undefined slope because the run is 0.
Worked example
From (1, 2) to (5, 10): rise = 10 โ 2 = 8, run = 5 โ 1 = 4, so m = 2. The angle is arctan(2) โ 63.43ยฐ, and the line is y = 2x + 0.
Slope, angle and percent grade
| Ratio (rise:run) | Percent grade | Angle |
|---|---|---|
| 1:20 | 5% | 2.86ยฐ |
| 1:12 | 8.33% | 4.76ยฐ |
| 1:10 | 10% | 5.71ยฐ |
| 1:4 | 25% | 14.04ยฐ |
| 1:2 | 50% | 26.57ยฐ |
| 1:1 | 100% | 45ยฐ |
A 1:12 ramp is the maximum slope many accessibility codes allow for wheelchair ramps, including the US ADA standard. Check your local building rules.
Equation of the line
Once you know m, find the y-intercept b = yโ โ m ร xโ. The line is then y = mx + b. Two points always define exactly one straight line.
Frequently asked questions
How do you find the slope between two points?
Subtract the y-values and divide by the difference in x-values: m = (yโ โ yโ) รท (xโ โ xโ).
What is a 1:12 slope in degrees?
About 4.76ยฐ, or an 8.33% grade.
How do I convert slope to percent grade?
Multiply the slope by 100. A slope of 0.05 is a 5% grade.
What does an undefined slope mean?
The line is vertical: x does not change, so the run is 0 and you cannot divide by it.