Enter two points to get the slope, y-intercept, equation and angle of the line through them.
What this calculator does
Give two points and this calculator returns the slope (rise over run), the y-intercept, the line’s equation in y = mx + b form, and its angle.
It’s a staple of algebra and coordinate geometry.
Worked example
On the values this calculator opens with, the slope (m) is 2. Underneath, Equation comes out at y = 2x + 0 and Angle at 63.4°. Change any field and every figure updates as you type.
Using the calculator
- Enter the first point’s x and y.
- Enter the second point’s x and y.
- Read the slope, intercept and equation.
The maths behind it
slope m = (y₂ − y₁) ÷ (x₂ − x₁)
y-intercept b = y₁ − m·x₁
Common questions
How do I calculate slope?
Divide the change in y by the change in x between the two points. A vertical line (no change in x) has undefined slope.
What does the slope mean?
It’s how steep the line is — how much y changes for each step in x. Positive rises, negative falls.
What is the y-intercept?
Where the line crosses the y-axis, i.e. the value of y when x is 0.