How to use the Slope Calculator
- Enter the first point as x₁ and y₁.
- Enter the second point as x₂ and y₂.
- Read the slope, the equation of the line and the working underneath.
How it works
Slope measures how steep a line is: how much y changes for each step in x, often called rise over run. Subtract the y-values, subtract the x-values in the same order, and divide. A positive slope rises from left to right, a negative slope falls, zero is flat and an undefined slope is a vertical line.
Once the slope m is known, the y-intercept b comes from putting one point into y = mx + b. The angle is the inverse tangent of the slope, and the distance between the points uses the Pythagorean theorem.
Formula
m = (y₂ − y₁) ÷ (x₂ − x₁) b = y₁ − m × x₁ y = mx + b d = √((x₂ − x₁)² + (y₂ − y₁)²) angle = tan⁻¹(m)
Example
For the points (2, 3) and (6, 11), the slope is (11 − 3) ÷ (6 − 2) = 8 ÷ 4 = 2. The intercept is 3 − 2 × 2 = −1, so the line is y = 2x − 1. The points are √(4² + 8²) ≈ 8.944 apart and the line rises at about 63.43°.
Reading a slope
| Slope | Line | Grade |
|---|---|---|
| 0 | Flat | 0% |
| 0.05 | Gentle ramp | 5% |
| 1/12 ≈ 0.083 | Maximum US wheelchair ramp (ADA) | 8.3% |
| 1 | 45° diagonal | 100% |
| −2 | Falls 2 for every 1 across | −200% |
| Undefined | Vertical | — |
Road and ramp grades are slope written as a percent: multiply the slope by 100.
Frequently asked questions
What is the slope formula?
m = (y₂ − y₁) ÷ (x₂ − x₁). It's the change in y divided by the change in x, or rise over run.
What does an undefined slope mean?
The two points have the same x-value, so the line is vertical and the run is zero. You can't divide by zero.
How do I find the slope from an equation?
Rearrange it to y = mx + b. The number in front of x is the slope. For 2y = 6x + 4, divide by 2 to get y = 3x + 2, so the slope is 3.
How do I convert slope to a percent grade?
Multiply by 100. A slope of 0.06 is a 6% grade.
Last reviewed December 3, 2026. Spotted an error? Tell us.
Add this calculator to your website
Free for blogs, schools and businesses. Copy the code and paste it into your page (in WordPress, use a Custom HTML block). Please keep the credit link.