About the Slope Intercept Form Calculator
This slope intercept form calculator writes the equation of a straight line as y = mx + b, where m is the slope and b is the y-intercept. Start from whatever you have — two points on the line, one point plus the slope, or an equation in standard form Ax + By = C — and it converts to every common form in one step.
Alongside y = mx + b you get the point-slope form, the standard form with whole-number coefficients where possible, the x- and y-intercepts, the angle the line makes with the x-axis, and a plotted graph so you can see the line. It is a quick check for algebra homework, for linear trends such as cost per unit plus a fixed fee, and for drawing lines on a coordinate grid.
Vertical lines (where both points share an x-value) cannot be written in slope-intercept form because their slope is undefined; the calculator recognises them and gives the equation x = k instead.
How to use the slope intercept form calculator
- 1Choose what you know: two points, a point and the slope, or a standard-form equation.
- 2Enter the coordinates or coefficients (negatives and decimals are fine).
- 3Read the equation in y = mx + b form.
- 4Use the standard form, point-slope form, intercepts and graph as needed.
Formula and method
The slope m measures rise over run between any two points on the line. Once you have m and any point (x₁, y₁), substitute into y = mx + b and solve for the y-intercept: b = y₁ − m·x₁. That is also why the point-slope form y − y₁ = m(x − x₁) is equivalent.
From standard form Ax + By = C, solve for y to get y = (−A/B)x + C/B. Going the other way, the calculator scales the coefficients to the smallest whole numbers with A non-negative, which is the conventional standard form. The x-intercept is where y = 0, i.e. x = −b/m, and the angle of inclination is arctan(m). If B = 0 (or the two x-values match) the line is vertical and has no slope-intercept form.
- m
- Slope (rise ÷ run)
- b
- y-intercept — where the line crosses the y-axis
- (x₁, y₁), (x₂, y₂)
- Points on the line
- A, B, C
- Standard-form coefficients
Worked examples
Line through (1, 3) and (4, 9)
m = (9 − 3) ÷ (4 − 1) = 2. Then b = 3 − 2 × 1 = 1, so y = 2x + 1. Setting y = 0 gives the x-intercept −0.5, and rearranging gives 2x − y = −1.
Standard form 3x + 4y = 12
Solve for y: 4y = −3x + 12, so y = −0.75x + 3. The line crosses the y-axis at 3 and the x-axis at 4.
Point (2, −1) with slope −0.5
b = −1 − (−0.5)(2) = 0, so the line passes through the origin: y = −0.5x. Clearing the decimal gives the standard form x + 2y = 0.
Vertical line through (3, 1) and (3, 5)
The run is zero, so the slope is undefined. The line is x = 3 and cannot be written as y = mx + b.
Frequently asked questions
What is slope-intercept form?+
It is y = mx + b, where m is the slope and b is the y-intercept. It is the most convenient form for graphing because you can start at (0, b) and move by the slope.
How do I convert standard form to slope-intercept form?+
Solve Ax + By = C for y: subtract Ax from both sides and divide by B, giving y = (−A/B)x + C/B. For 2x + 3y = 6 that is y = −(2/3)x + 2.
How do I find the equation of a line from two points?+
Compute the slope m = (y₂ − y₁)/(x₂ − x₁), then substitute one point into y = mx + b and solve for b. For (1, 3) and (4, 9): m = 2 and b = 1.
Why can’t a vertical line be written in y = mx + b form?+
A vertical line has zero run, so its slope would require dividing by zero. It is written as x = k instead, where k is the x-value every point shares.
What is the difference between point-slope and slope-intercept form?+
Point-slope form, y − y₁ = m(x − x₁), uses any known point; slope-intercept form uses the specific point where x = 0. Expanding point-slope form and simplifying gives slope-intercept form.