Equation Of A Line Calculator
Get the equation of a line from two points, or from slope and intercept. Outputs common forms you can use directly in algebra or graphing.
Enter the Details
Express the equation of a line in standard form, slope-intercept form, and point-slope
form using the calculator below.
You can use two known points,
the slope and one known point on the line, or the slope and y-intercept.
Point #1 Coordinates:
Point #2 Coordinates:
Result will appear here...
What this calculator does
So, you want the equation of a line, and rather than picking a single form, this tool gives you all three at once: standard form, slope-intercept form, and point-slope form. You supply what you know, and it writes the line every standard way.
As with the focused line tools, a dropdown lets you start from two points, a point and the slope, or the slope and the y-intercept.
How to use it
- Choose your known information: two points, one point and the slope, or the y-intercept and the slope.
- Enter the values.
- Press Calculate.
The result lists the same line three times, once in each form, so you can take whichever one your problem needs.
One line, three ways to write it
A single straight line can be written in several equivalent forms. They describe the exact same line; they just arrange the information differently, and each is convenient for a different job. This tool exists because it is genuinely useful to see all three side by side, both to pick the one you want and to see how they relate. The idea of writing a geometric line as an algebraic equation at all goes back to Descartes, whose coordinate plane, set out in 1637, married algebra and geometry so that a line became something you could write down and manipulate as an equation.
Standard form
Standard form writes the line as
Ax + By = C
with the x and y terms gathered on one side and a constant on the other, using whole-number coefficients where possible. It does not show the slope or intercept directly, but it treats x and y evenly, which makes it the tidy form for writing a line in a table, and the convenient one when you are solving two lines together as a system of equations.
Slope-intercept form
Slope-intercept form is y = mx + b, with m the slope and b the y-intercept. It is the form built for graphing and for reading a line at a glance: start at b on the y-axis and climb by m. When you want to picture the line or compare its steepness with another, this is the form to have.
Point-slope form
Point-slope form is y - y1 = m(x - x1), built from the slope and a single point the line passes through. It is the one you can write the instant you know a slope and a point, with no need to solve for the intercept first, which makes it a natural starting form before tidying into either of the others.
A worked example, all three forms
Take the two points (1, 3) and (3, 7). The slope is (7 - 3) / (3 - 1) = 2.
- Point-slope form, using (1, 3): y - 3 = 2(x - 1).
- Slope-intercept form: expanding gives y = 2x + 1.
- Standard form: gathering terms gives 2x - y = -1.
Three equations, one line. The tool produces all three from the single pair of points.
Which form to use when
Reach for slope-intercept form when you want to graph the line or read its slope and intercept. Reach for point-slope form when you have a slope and a point and want to write the line straightaway. Reach for standard form when you are lining a set of equations up together, or when a problem or textbook asks for it specifically. Since they are the same line, you can always convert between them, and this tool saves you the trouble by giving all three. If you only ever want one, the slope-intercept form calculator and the point-slope form calculator each focus on a single form.
Questions people ask
Why are there three forms of one line?
Because each arranges the same information differently and suits a different task: graphing, writing quickly from a point and slope, or solving systems. They all describe the identical line.
What can I start from?
Two points, a point and the slope, or the slope and the y-intercept. The tool builds all three forms from any of these.
What makes standard form useful?
It keeps x and y on one side with whole-number coefficients, which is tidy for tables and convenient when solving two lines together as a system.
Are the three forms really the same line?
Yes. They are equivalent equations, so they graph as exactly the same line; only the arrangement of the numbers differs.
What if I want just one form?
Use the slope-intercept form calculator for y = mx + b, or the point-slope form calculator for y - y1 = m(x - x1).
References
On the several forms of a line. A line can be written in standard form, slope-intercept form, or point-slope form, all equivalent, and the very idea of a line as an equation rests on the coordinate plane introduced by Descartes.
- Christopher Stover and Eric W. Weisstein, "Line," from MathWorld, a Wolfram resource, on the slope-intercept, two-point, and standard forms of a line.
- "Cartesian coordinates," Encyclopaedia Britannica, on Descartes and the coordinate system that lets a line be written as an equation.
Okan Atalay is a results driven senior operations manager and a graduate of Industrial Engineering from Bilkent University. With over 22 years of experience in textile manufacturing and integrated operations, he has led large scale business process improvements and strategic planning initiatives. Currently, he serves as a top mathematics expert for a global ed tech platform, where he applies his analytical expertise to solve complex mathematical problems. At Eon Tools, he reviews converter and maths tools.
Other Tools
- Average Rate Of Change Calculator
- Cross Product Calculator
- Distance Calculator
- Dot Product Calculator
- End Point Calculator
- Gradient Calculator
- Linear Interpolation Calculator
- Midpoint Calculator
- Parabola Calculator
- Perpendicular Line Calculator
- Point Slope Form Calculator
- Slope Calculator
- Slope Intercept Form Calculator
- Unit Vector Calculator
- Vector Calculator
- Vector Magnitude Calculator
- Vertex Form Calculator
- X And Y Intercept Calculator