Slope-Intercept Form Calculator
Give two points and get the line through them in y = mx + b form, with the slope and both intercepts. Vertical lines are reported as such rather than as an error.
How it works
How the Slope-Intercept Form Calculator works
the part a result on its own leaves out
What m and b mean on the picture
m is the slope — how far the line rises for each step right. b is where it crosses the y-axis, which is the value of y when x is zero. Between them they fix the line completely.
Why two points are enough
Two distinct points determine exactly one straight line. The slope comes from the difference between them; the intercept comes from substituting either one back in.
Common mistakes
Common mistakes with slope-intercept form
the errors that actually show up, not every possible slip
Subtracting the coordinates in a different order
The slope is (y₂ − y₁)/(x₂ − x₁). Taking y₂ − y₁ over x₁ − x₂ flips the sign and tilts the line the wrong way.
Putting x over y
Slope is rise over run — the y difference on top. Inverting it gives the reciprocal, which is a different line.
Calling a vertical line's slope zero
A horizontal line has slope zero. A vertical line has undefined slope, because the run is zero and you cannot divide by it.
Questions
Asked often enough to answer here
answers that change how you work
What if the two points have the same x?
The line is vertical. It has no slope-intercept form and is written x = a instead. The calculator says so rather than dividing by zero.
How do I convert from standard form?
Solve Ax + By = C for y: subtract Ax from both sides, then divide everything by B. The coefficient of x is the slope.
What does a negative slope mean?
The line falls from left to right. Every step right takes you down.
Next
Related calculators
what people open straight after this one