Slope Calculator
Enter two points (x₁, y₁) and (x₂, y₂) to get the slope and everything else about the line through them.
Two points
The slope formula
m = (y₂ − y₁) ÷ (x₂ − x₁)
- m
- slope (rise over run)
- (x₁, y₁), (x₂, y₂)
- the two points
Once you have the slope, the y-intercept is b = y₁ − m·x₁, giving the line y = mx + b. The angle the line makes with the x-axis is arctan(m).
Worked example
Points (1, 2) and (4, 8)
- Rise: 8 − 2 = 6
- Run: 4 − 1 = 3
- Slope: 6 ÷ 3 = 2
- Intercept: b = 2 − 2 × 1 = 0
The line is y = 2x, rising at about 63.43°.
Interpreting slope
| Slope | Meaning |
|---|---|
| Positive | Line rises from left to right |
| Negative | Line falls from left to right |
| 0 | Horizontal line (y = constant) |
| Undefined | Vertical line (x₁ = x₂) |
Slope is also used as a grade: a slope of 0.08 is an 8% gradient, meaning 8 units of rise for every 100 units of horizontal distance.