WorkedMathGlossary

Slope-Intercept Form Calculator

Enter two points below to instantly get the equation of the line in y = mx + b form.

Point 1
Point 2
Slope-Intercept Form
y = 3x − 1
024010(x₁, y₁)(x₂, y₂)

Finding Slope-Intercept Form

m = (y₂ − y₁) / (x₂ − x₁), then b = y₁ − m·x₁.

Worked example

Points (1, 2) and (3, 8).

m = (8 − 2) / (3 − 1) = 6 / 2 = 3

b = 2 − 3(1) = −1

Equation: y = 3x − 1

A second example

Points (−1, 4) and (2, −5).

m = (−5 − 4) / (2 − (−1)) = −9 / 3 = −3

b = 4 − (−3)(−1) = 4 − 3 = 1

Equation: y = −3x + 1

Keep going

Frequently Asked Questions

What is slope-intercept form?

Slope-intercept form writes a line's equation as y = mx + b, where m is the slope and b is the y-intercept (where the line crosses the y-axis).

How do you find the equation of a line from two points?

First find the slope: m = (y₂ − y₁) / (x₂ − x₁). Then plug one point and the slope into y = mx + b and solve for b.

What does the slope tell you?

The slope is how much y changes for every one-unit increase in x. A positive slope rises left to right; a negative slope falls; a slope of 0 is a flat horizontal line.

Can every line be written in slope-intercept form?

No — vertical lines (like x = 4) have an undefined slope, so they can't be written as y = mx + b. Every non-vertical line can be, including horizontal lines, which simply have m = 0.

What's a common mistake when solving for b?

A sign error when isolating b. Once you rearrange y = mx + b to b = y − mx, plug in one known point's x and y along with the slope you already found — dropping a negative sign here is the most frequent source of a wrong final equation.

Related Calculators

View all calculators →

Related Terms