All calculators

Education

Slope Intercept Form Calculator

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.

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.

Slope-intercept

Equation

y = 3x - 1

m = 3; b = -1

Slope m3
y-intercept b-1
Stepm = (y₂ − y₁) / (x₂ − x₁) = (8 − 2) / (3 − 1) = 3; b = y₁ − m·x₁ = 2 − 3·1 = -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.

Was this helpful?

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.667x + 4

Two points (0,5), (2,5)

Horizontal line y = 5

How it works

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)

Related calculators

Frequently asked questions

y = mx + b. m is the slope (rise over run), b is the y-intercept (the y value where the line crosses the y-axis). This form is the easiest to graph by hand.

First compute the slope m = (y₂ − y₁) / (x₂ − x₁). Then plug one of the points into y = mx + b and solve for b: b = y − m·x. The calculator does both steps.

Solve for y: subtract Ax from both sides to get By = −Ax + C, then divide by B: y = (−A/B)·x + (C/B). The slope is −A/B and the y-intercept is C/B. Requires B ≠ 0.

A vertical line has undefined slope and cannot be written as y = mx + b. The calculator flags this case and suggests writing the line as x = constant instead.

The slope calculator returns just the slope between two points. This page builds the full equation y = mx + b including the y-intercept. Use the slope calculator when you only need m.