Slope Calculator
This slope calculator finds the slope of a line from two points, with the equation of the line, or from a rise and run as a percent grade and angle. Choose a tab, fill in the boxes and press Calculate.
Slope Calculator
Slope formula
Slope measures how steep a line is: how much it goes up (the rise) for each step across (the run).
m = (y₂ − y₁) ÷ (x₂ − x₁) = rise ÷ runHow to find the slope from two points
- Label the points (x₁, y₁) and (x₂, y₂). It doesn't matter which one is first.
- Subtract the y values: y₂ − y₁. That's the rise.
- Subtract the x values in the same order: x₂ − x₁. That's the run.
- Divide rise by run and simplify the fraction.
Example: from (1, 2) to (4, 8), the rise is 8 − 2 = 6 and the run is 4 − 1 = 3, so m = 6 ÷ 3 = 2. Then b = 2 − 2 × 1 = 0, so the line is y = 2x.
Positive, negative, zero and undefined slope
| Slope | The line… | Example |
|---|---|---|
| Positive | rises from left to right | m = 2/3 |
| Negative | falls from left to right | m = −4 |
| Zero | is flat (horizontal) | y = 3 |
| Undefined | is straight up and down (vertical) | x = 2 |
Writing the equation of the line
Once you have the slope m, you can write the line two common ways:
Slope-intercept form: y = mx + b, where b = y₁ − m × x₁ Point-slope form: y − y₁ = m(x − x₁)For the points (2, 3) and (5, 5): m = 2/3, b = 3 − 2/3 × 2 = 5/3, so y = (2/3)x + 5/3, or in point-slope form y − 3 = (2/3)(x − 2).
Slope as percent grade and angle
Builders and road engineers usually describe slope as a percent grade or an angle instead of a fraction:
Grade (%) = rise ÷ run × 100 Angle = arctan(rise ÷ run)| Grade | Ratio (rise : run) | Angle | Where you see it |
|---|---|---|---|
| 2% | 1 : 50 | 1.15° | Typical patio drainage, about ¼ inch per foot |
| 5% | 1 : 20 | 2.86° | Gentle walkway |
| 8.33% | 1 : 12 | 4.76° | Steepest ADA wheelchair ramp |
| 10% | 1 : 10 | 5.71° | Steep road |
| 50% | 1 : 2 | 26.57° | A 6/12 roof pitch |
| 100% | 1 : 1 | 45° | Rise equals run |
Wheelchair ramps: the 2010 ADA Standards (section 405.2) limit a ramp's running slope to 1:12.
Frequently asked questions
What does a slope of 2/3 mean?
The line rises 2 units for every 3 units it moves to the right. As a decimal that's about 0.667, as a percent grade 66.7%, and as an angle about 33.7° above horizontal.
Can a slope be a fraction?
Yes, and in algebra it's usually left as a fraction in lowest terms, such as 2/3 rather than 0.6667, because the fraction is exact. This calculator gives both.
What is the slope of a vertical line?
It's undefined. A vertical line has no run (x doesn't change), and you can't divide by zero. Its equation is written as x = a number, such as x = 2. A horizontal line has slope 0.
How do you convert slope to degrees?
Take the inverse tangent (arctan) of the slope. A slope of 1 is 45°, a slope of 0.5 is about 26.57°, and a slope of 1/12 is about 4.76°.
What is the maximum slope for a wheelchair ramp?
Under the 2010 ADA Standards for Accessible Design, a ramp's running slope can't be steeper than 1:12, which is 1 inch of rise for every 12 inches of run. That's about 8.33% or 4.76°. Use the Rise & run tab to check a ramp.
See also
- Proportion Calculator: Solve A/B = C/D for the missing number, with steps.
- Ratio Calculator: Simplify ratios, convert to 1:n, and split a total in a ratio.
- Percentage Calculator: Percent of a number, percent change, and increase or decrease by a percent.
- Square Footage Calculator: Area of rooms and odd-shaped spaces, plus a cost estimate.
Last updated: November 16, 2026