All three forms, from two points or a point and a slope.
All three forms
From two points, or a point and a slope.
slope 2
y = 2x + 1
Crossing the y-axis at 1 and the x-axis at −0.5.
The same line, three ways
The line written in slope-intercept, point-slope and standard form, with what each is useful for
Form
Equation
Good for
Slope-intercept
y = 2x + 1
graphing — the slope and intercept are visible
Point-slope
y − 1 = 2(x − 0)
writing from a point and a slope
Standard
2x − y = −1
whole numbers, and the only form a vertical line has
Slope
2
rise over run
y-intercept
1
where x = 0
x-intercept
−0.5
where y = 0
Passes through
(0, 1)
the point it was built from
The three forms describe the same line. Slope-intercept is easiest to graph, point-slope is easiest to write from a point and a slope, and standard form is the only one that can represent a vertical line.
The y-intercept comes from substituting the point into y = mx + c and solving for c: 1 − (2)(0) = 1.
Standard form here is written with whole-number coefficients and a non-negative leading one, which is the usual convention and makes two equations of the same line look the same.
Standard form is normalised to whole numbers with a non-negative leading coefficient, so two equations of one line look identical.
What this tool shows
One line, three equations. Slope-intercept is easiest to graph, point-slope is easiest to write from what you know, and standard form is the only one that can express a vertical line at all — which is the case that quietly breaks y = mx + c.
The line through two points
The line through a point with a given slope
Slope-intercept form
Point-slope form
Standard form with whole-number coefficients
Both intercepts, and when one does not exist
Three forms at once Both intercepts Two ways in Vertical lines handled
Updated 7 September 2026 · Works in any browser, no installation
Find the slope, then substitute a point. Through (0,1) and (2,5) the slope is 2, so y − 1 = 2(x − 0), which tidies to y = 2x + 1 and to 2x − y = −1. All three describe the same line; only the third can also describe a vertical one.
At a glance
Formula shown
Slope-intercept: y = mx + c. Point-slope: y \u2212 y\u2081 = m(x \u2212 x\u2081). Standard: Ax + By = C, with A, B and C whole and A \u2265 0. A vertical line has only x = k and standard form; it has no slope-intercept form at all.
Scenario support
Writing the equation of a line through two plotted points; converting a given equation into another form; finding where a line crosses each axis.
Educational estimate
Planning support from the values you enter — not professional advice.
Which form to use
Slope-intercept, y = mx + c. Best for graphing and for reading: the slope and the y-intercept are both visible without any work. It is the form to give when someone has to picture the line.
Point-slope, y − y₁ = m(x − x₁). Best for writing. Given a point and a slope it needs no rearranging at all, which is why it is the first thing to write down and the last thing to tidy.
Standard, Ax + By = C. Best for systems of equations and for whole numbers, and the only one of the three that can represent a vertical line.
None is more correct. A question asking for “the equation of the line” without saying which form usually wants slope-intercept, and a question that specifies wants what it specified.
Converting between them
Point-slope to slope-intercept: expand the bracket and solve for y. The constant left over is c.
Slope-intercept to standard: multiply through by any denominators, then move the x term across. y = (2/3)x + 4 becomes 3y = 2x + 12, then 2x − 3y = −12.
Standard to slope-intercept: solve for y. From Ax + By = C the slope is −A/B and the intercept is C/B — and the minus sign on the slope is the step most often dropped.
Every conversion is reversible and none of them changes the line. If two forms of what should be one line disagree at a test point, one conversion went wrong.
The vertical line
x = 3 is a perfectly good line, and it has no slope-intercept form. Not an awkward one — none.
y = mx + c gives one y for each x, which is what makes it a function. A vertical line has every y at a single x, so no m and c can produce it. The form cannot express it, and that is a limitation of the form rather than of the line.
Standard form handles it because B is allowed to be zero: 1x + 0y = 3, written x = 3.
This is the practical argument for learning all three. A program that stores lines only as (m, c) cannot represent a vertical one at all, which is a bug that surfaces the first time two points share an x-coordinate.
Intercepts
The y-intercept is where the line crosses the y-axis — substitute x = 0. In slope-intercept form it is sitting there as c.
The x-intercept is where it crosses the x-axis — substitute y = 0 and solve. It is also called the root or the zero of the line.
Either can be missing. A horizontal line off the axis never crosses the x-axis; a vertical line crosses the y-axis nowhere or everywhere. The page reports those as absent rather than as a number.
Two intercepts are enough to draw the line, which is why the intercept method is the quickest way to sketch one from standard form.
Why standard form is normalised
2x − y = −1 and −2x + y = 1 and 4x − 2y = −2 are all the same line. Without a convention, two correct answers look different.
So the usual convention: whole-number coefficients, no common factor, and a non-negative leading coefficient. That picks exactly one writing out of the infinitely many, and it is the one this page produces.
It matters for marking and for comparing. Two people who followed the convention get character-for-character the same equation, and a difference means a real difference.
Some textbooks additionally require A > 0 strictly, which forces a choice on vertical lines only. The page uses A ≥ 0, which handles the horizontal case without a special rule.
Where it gets used
Lines of best fit. A regression result is a slope and an intercept, and reading it means reading a linear equation.
Systems of equations. Two lines in standard form solve together by elimination far more comfortably than two in slope-intercept form, which is why the form exists.
Linear programming. Constraints are written as standard-form inequalities, and the feasible region is bounded by these lines.
Anything with a fixed rate and a starting value. A taxi fare, a phone plan, a depreciation schedule: c is where you start and m is the rate.
Sources and methodology
The three forms and the normalisation convention are curriculum standards; these are the references.
Method. The slope and intercept are exact rationals, and standard form is produced by clearing denominators and dividing by the greatest common divisor, then flipping signs so the leading coefficient is non-negative — which is what makes two equations of the same line print identically. A vertical line is detected before any division and is given its x = k equation and a standard form with no y term. The suite substitutes both defining points back into both standard and slope-intercept form across four thousand generated lines. That engine is verified on every change against 67 hand-written assertions, including that both defining points satisfy the standard form exactly on integers, and the slope-intercept form to nine decimal places, across four thousand generated lines. The count and the per-case breakdown are published on the formula verification page.
Related calculators
Where this goes next:
SlopeSlope as an exact fraction, with the vertical case reported as undefined rather than as a division by zero — and the angle, gradient percentage and both related slopes alongside it.
Parallel and Perpendicular LinesBoth lines through your point at once — and the two cases where the slopes-multiply-to-−1 rule does not apply, because 0 × undefined is not −1.
MidpointThe midpoint of a segment, plus the reverse problem nobody else solves: given one endpoint and the midpoint, where is the other endpoint?
DistanceThe distance between two points in the plane or in space, kept exact as a surd wherever the square root does not come out — √50 stays √50, and is also shown as 5√2.
System of EquationsSolve linear systems in up to six unknowns with exact fractions — row operations, the matrix form, Cramer’s rule, and the parametric family when there is no single answer.
Graphing Inequalities on a Number LinePlot up to six inequalities on one shared number line, read the overlap and the union straight off it, and see which conditions conflict and which are doing no work at all.
For a line parallel or perpendicular to this one through a chosen point, the Parallel and Perpendicular Lines Calculator does that step and handles the two cases where the slope rule breaks.
Educational use disclaimer
This is an educational tool. Slopes and intercepts are exact for the coordinates entered; standard form is normalised to whole-number coefficients, which is a convention rather than the only correct writing.
Published the line equation page giving all three standard forms at once, since which one a question wants is arbitrary and converting between them by hand is where the sign errors happen.
A vertical line has no slope-intercept form — x = k is the whole equation — and the page says that rather than printing an infinity into y = mx + c.
Standard form is normalised the conventional way, with integer coefficients and A non-negative, so two people solving the same problem get the same equation.
Add this calculator to your site
Responsive embed — and private: nothing your visitors type leaves their browser.