About this calculator
A vertical line has an undefined slope.
How to use it
- Enter the first point.
- Enter the second point.
- Read the slope and equation.
The formula
- m
- slope
- c
- y-intercept
Worked example
Points (1, 2) and (4, 8)
- m = (8 − 2) ÷ (4 − 1) = 2.
- c = 2 − 2 × 1 = 0, so y = 2x.
- Angle with the x-axis ≈ 63.43°.
What the result means
Parallel lines have equal slopes; perpendicular slopes multiply to −1.
Slope, angle and percentage gradient
A 1 in 20 ramp has a slope of 0.05, a 5% gradient and an angle of only about 2.86°.
| Slope m | Angle with the x-axis | Gradient |
|---|---|---|
| 0 | 0° | 0% |
| 0.05 (1 in 20) | ≈ 2.86° | 5% |
| 0.1 (1 in 10) | ≈ 5.71° | 10% |
| 0.5 | ≈ 26.57° | 50% |
| 1 | 45° | 100% |
| √3 ≈ 1.732 | 60° | ≈ 173.2% |
| 2 | ≈ 63.43° | 200% |
| −1 | −45° | −100% |
Worked example with a negative slope
- Points (−2, 5) and (4, −1).
- m = (−1 − 5) ÷ (4 − (−2)) = −6 ÷ 6 = −1.
- c = 5 − (−1)(−2) = 5 − 2 = 3, so y = −x + 3. The calculator writes this as y = −1x + 3.
- Setting y = 0 gives the x-intercept 3. The angle with the x-axis is −45°.
Mistakes to avoid
- Mixing the order of the points: (8 − 2) ÷ (1 − 4) = −2 has the wrong sign. Subtract in the same order on top and bottom.
- Confusing horizontal and vertical lines: y = 4 has slope 0, while x = 2 has an undefined slope.
- Reading m from an equation not in y = mx + c form: rewrite 2x + 3y = 6 as y = −(2/3)x + 2, so m = −2/3.
Assumptions
- Any two different points; for a vertical line the slope is undefined.
Limitations
- Results are rounded to 10 significant figures.
Frequently asked questions
What is slope?
Rise over run: the change in y divided by the change in x.
What is the slope of a horizontal line?
0.
What is a negative slope?
The line falls from left to right.
What is the slope of y = 3x + 2?
3. In y = mx + c the coefficient of x is the slope, and 2 is the y-intercept.
What is the slope of a line perpendicular to one with slope 2?
−1/2, because perpendicular slopes multiply to −1.
How do I find the slope from an angle?
Take the tangent: m = tan θ. A line at 45° has slope 1, and a line at 60° has slope √3 ≈ 1.732.
Last reviewed on 12 October 2026. How we calculate and check. Found a mistake? Tell us.

