Slope Intercept Form Calculator
A slope intercept form calculator is an algebraic tool that determines the equation of a line in the standard form y equals mx plus b, where m represents the slope and b represents the y-intercept. The calculator computes the equation from various inputs, including two coordinate points, one point and the slope, or by converting a general linear equation. It outputs the slope, the y-intercept and the assembled equation, and displays the step-by-step working. Math students use this tool to verify coordinate geometry homework and graph lines.
Pick a starting point (two points, slope-plus-point, or standard form). Enter the values; the calculator returns y = mx + b along with the slope, y-intercept, and a worked step.
Quick Answer
Find the slope-intercept form equation of a line. Enter two points, a slope and a point, or the A, B and C of a standard-form equation to get the slope (m) and y-intercept (b).
From
For just the slope between two points, use the slope calculator. To build y − y₁ = m(x − x₁), use the point-slope form calculator.
Equation
y = 3x - 1
m = 3; b = -1
Slope-intercept form makes the y-intercept visible at a glance: it is the constant term. The slope is the coefficient of x. A vertical line cannot be written in this form because its slope is undefined.
Examples
Two points (1,2), (3,8)
m = 3, b = −1, y = 3x − 1
Slope 3, point (1,4)
b = 1, y = 3x + 1
Standard 2x + 3y = 12
m = −2/3, b = 4, y = −0.6667x + 4
Two points (0,5), (2,5)
Horizontal line y = 5
How it works
Formula · y = mx + b · m = (y₂ − y₁) / (x₂ − x₁) · b = y − m·x · from Ax + By = C: m = −A/B, b = C/B
All three input modes lead to the same equation y = mx + b. Once you have the slope (or it is given), find b by plugging a known point into the equation and solving.
Slope · m = (y₂ − y₁) / (x₂ − x₁)
Intercept · b = y − m·x
From standard form · y = (−A/B)·x + (C/B)
What this page is for, and the two beside it
Three pages on this site work on straight lines, and they are not the same page three times. The split is worth a moment before you pick one.
This page builds the equation. The subject is y = mx + b itself, and it is the only one of the three that will take a standard-form equation, Ax + By = C, and rearrange it for you. If what you have is a textbook equation in the wrong shape, this is the page.
The slope calculator is about the slope itself. The slope calculator solves from five directions rather than three, so it can recover a missing coordinate from a known slope, and it reports the angle in degrees, the grade as a percentage and the rise-run ratio. It draws the rise and run on a coordinate plane. Go there when how steep is the question and the equation is incidental.
The y = mx + b calculator explores a line you already have. The y = mx + b calculator graphs the line, reports the x-intercept as well as the y, and lets you query points along it. Go there when you want to see the line rather than write it.
Reading y = mx + b
Two letters carry the whole line. m is the slope: how much y changes for every one that x changes. Positive rises left to right, negative falls, and zero is flat. b is the y-intercept: the value of y when x is zero, which is where the line crosses the vertical axis.
That is why this form is the one people graph by hand. Put a dot at b on the y-axis, then move one step right and m steps up, and you have a second point. Everything else about the line follows from those two numbers.
Working it out by hand
Three starting points, three short routes to the same place. All three run in the tool above and produce the figures below.
1. From two points
Take (1, 2) and (3, 8). The slope is the rise over the run: m = (8 − 2) ÷ (3 − 1) = 6 ÷ 2 = 3. Now put one of the points back into y = mx + b and solve for b: 2 = 3 × 1 + b, so b = 2 − 3 = −1. The equation is y = 3x - 1. Either point works: the second gives 8 = 3 × 3 + b, and b is −1 again.
2. From a slope and one point
With m already known there is only one step. For m = 3 through (1, 4): b = y − m·x = 4 − 3 × 1 = 1, giving y = 3x + 1. Note this is the same slope as the first example but a different line, one unit higher, because b moved.
3. From standard form
This is the mode the other two pages do not have. Take 2x + 3y = 12 and solve for y. Subtract 2x: 3y = −2x + 12. Divide everything by 3: y = (−2/3)x + 4. So the slope is −2/3 and the intercept is 4. The calculator shows the slope as -0.6667, which is that fraction rounded for display. In general m = −A/B and b = C/B, which is why B cannot be zero.
A vertical line has no slope-intercept form
This is the honest limit of the form, and it is not a limitation of the calculator. y = mx + b assumes that every x has exactly one y. A vertical line has a single x and every y at once, so no equation of that shape can describe it, whatever you put in for m and b.
The slope is the reason. Slope is rise divided by run, and on a vertical line the run is zero. Dividing by zero has no answer, so the slope is undefined rather than large. There is no number to put in the m slot. Such a line is written x = 4, which is a perfectly good equation and simply not this one: it has no m and no b to report.
The tool says so rather than printing something plausible. Enter two points with the same x and it refuses and explains why, and the same happens in standard-form mode when B is zero, because Ax = C is that same vertical line wearing different clothes.
Undefined slope and zero slope are opposites
These two get swapped constantly, and they are as far apart as two cases can be. A horizontal line has a slope of exactly zero: no rise over any run. It has a completely ordinary equation, y = 5, which is y = mx + b with m set to zero. The calculator handles it without complaint.
A vertical line has an undefined slope, which is not a value at all, and no equation in this form. Zero is a number; undefined is the absence of one. Recording a vertical line as slope zero, or calling an undefined slope infinite, are two versions of the same mistake.
Edge cases
- The same point twice is not a line. Infinitely many lines pass through one point, so there is nothing to solve. The tool reports this separately from the vertical case, because they are different situations that happen to share a zero.
- A vertical line is refused, not approximated. No very large slope is substituted for the undefined one.
- B = 0 in standard form is the vertical case again. Ax + 0y = C is Ax = C, a vertical line, so it is refused for the same reason rather than by dividing by zero.
- A horizontal line is fine. Two points with the same y give m = 0 and the equation y = b, which the tool prints without the x term rather than showing a pointless 0x.
- Slopes are shown as decimals. A slope of −2/3 displays as −0.6667, rounded to four places. The exact value is the fraction, and for written work the fraction is usually the better form.
- A blank field waits. Clearing an input leaves the result waiting rather than treating the blank as zero and building an equation from it.
Your coordinates stay in the page
The values you enter are processed by this page in your browser. They are not sent to a server, not stored after you close the tab, and not visible to anyone else. There is no account and nothing to sign up for.
Related calculators
- Slope calculator when the slope itself is the question, or when you need the angle, the grade or a missing coordinate.
- Point slope form calculator to write the same line as y − y₁ = m(x − x₁).
- y = mx + b calculator to graph the line, read its x-intercept, and query points on it.
Sources
There is no citation on this page, and adding one would be decoration. Solving y = mx + b for b is one subtraction, and rearranging Ax + By = C is one more. These are steps of elementary algebra rather than results anybody established, and the page shows the working instead of pointing at an authority for it.
The same call was made on the percentage, final grade and circumference pages: cite what an outside body actually settles, and say plainly when nothing does.
Related Calculators
More tools from Education



