Maths & numbers
Line slope calculator
Find a line’s gradient and intercept from two points.
A clear answer. Here’s how.
Slope = (y₂−y₁)/(x₂−x₁), intercept = y₁−slope×x₁. Distinguishes vertical lines from repeated points. A vertical line has no finite slope or y-intercept.
See a worked example
Worked example
A fixed demonstration, separate from the values you enter above.
- First x
- 1
- First y
- 3
- Second x
- 4
- Second y
- 9
Example result
- Slope
- 2
- Y-intercept
- 1