Skip to content
Calixo
Math

Slope-Intercept Form: Going From Two Points to y = mx + b

How to find the slope using coordinates and turn it into a complete line equation in slope-intercept form, with a fully worked example checked against both original points.

Published July 15, 2026

Once you know how to find the slope using coordinates, you’re actually most of the way to something more useful than the slope number alone: a complete equation that describes every point on the line, not just the steepness between two of them.

Two professionals discussing a parabola graph on a notebook, promoting teamwork and collaboration.
Photo by Gustavo Fring on Pexels
A student writes mathematical notes in a notebook using a pen, focus on studying.
Photo by Louis Bauer on Pexels

What slope-intercept form actually tells you

y = mx + b

m is the slope; b is the y-intercept — where the line crosses the y-axis, at x = 0.

Slope-intercept form packs two pieces of information into one equation: m, the slope (steepness and direction), and b, the y-intercept (the y-value where the line crosses the vertical axis, at x = 0). Once both are known, the equation describes every single point on the line — not just the two original points you started with — letting you find the y-value for any x-value at all, or vice versa.

Step 1: find the slope

Two points m = (y₂ − y₁) / (x₂ − x₁) Slope found

Using the points (2, 3) and (6, 11): m = (11 − 3) / (6 − 2) = 8 / 4 = 2. This is the same slope-formula step covered in finding slope from two points — nothing new here, just the necessary first ingredient for what comes next.

Step 2: solve for b using one known point

b = y − mx

Plug in either original point's x and y — both give the identical, correct b value.

With the slope known, plug it and one of the original points into y = mx + b and solve for b. Using (2, 3): 3 = 2(2) + b → 3 = 4 + b → b = −1. The complete equation is y = 2x − 1.

Step 3: verify against the other point

Check at x = 6: y = 2(6) − 1
y = 11 ✓

This verification step is genuinely worth doing every time, not just as a formality: plug the second original point’s x-value into your new equation and confirm you get back its known y-value. At x = 6: y = 2(6) − 1 = 12 − 1 = 11 — which matches the original point (6, 11) exactly, confirming the equation is correct.

💡
Did you know?

It doesn't matter which of your two original points you use in Step 2 to solve for b — both points sit on the identical line, so both will produce the exact same b value. Using the second point (6, 11) instead: 11 = 2(6) + b → 11 = 12 + b → b = -1, the identical result.

Why this matters beyond the two original points

Just the slope

Tells you the line's steepness and direction — but not where it actually sits on the graph.

Full equation (y = mx + b)

Lets you find the y-value for ANY x-value on the line, not just the two you started with.

This is the practical payoff of going the extra step from slope alone to a full equation: with y = 2x − 1, you can find y at x = 100 (y = 199) or x = −50 (y = −101) instantly, without needing any additional data points — the two original points were only ever needed to derive the equation, not to use it afterward.

A second worked example, including a negative slope

Using points (1, 5) and (4, −1): slope m = (−1 − 5) / (4 − 1) = −6 / 3 = −2. Solving for b using (1, 5): 5 = −2(1) + b → 5 = −2 + b → b = 7. The equation is y = −2x + 7. Checking against (4, −1): y = −2(4) + 7 = −8 + 7 = −1 ✓, confirming the equation correctly.

Common mistakes in this two-step process

MistakeEffect
Using the wrong point order when calculating slopeFlips the sign of m, producing a wrong equation entirely
Arithmetic error solving for bCorrect slope, but line shifted to the wrong vertical position
Forgetting to verify against the second pointA silent error in b goes uncaught
Confusing y-intercept (b) with x-interceptb is where the line crosses the y-axis (x=0), not the x-axis

From two points to a usable equation

The Slope Calculator computes the slope (m) directly from two coordinate pairs — from there, the y-intercept step above is simple algebra using either original point. Having the complete y = mx + b equation, rather than just the slope number, is what actually lets you predict or graph the line’s behavior at any point, which is exactly why this second step is worth doing whenever the full line equation, not just its steepness, is what the problem actually calls for. Outside pure algebra, that same slope number often gets reframed as a percentage grade instead of a decimal.

FAQ

Do I need both original points to write the final equation? No — once you have m and b, the equation y = mx + b is complete and self-sufficient. The two original points were only needed to derive m and b in the first place.

What if my line is vertical? A vertical line has an undefined slope and can’t be written in slope-intercept form at all — it’s instead described by an equation like x = 3 (a constant x-value for every y), a genuinely different form reserved for this special case.

Can I use slope-intercept form if I only know the slope and one point, not two points? Yes — the exact same Step 2 process (solving b = y − mx using your one known point and the given slope) works whether the slope came from two points or was given to you directly.

What does a negative b value mean graphically? It means the line crosses the y-axis below the origin (at a negative y-value when x = 0) — nothing more unusual than that; negative y-intercepts are completely normal.

Is slope-intercept form the only way to write a line’s equation? No — point-slope form and standard form are common alternatives, each convenient for different situations, but all three describe the identical line and can be algebraically converted between each other.

Why is verifying against the second point worth the extra step? It catches arithmetic errors in solving for b that wouldn’t otherwise be obvious — if your equation doesn’t correctly reproduce both original points, something went wrong in the calculation and needs to be rechecked.

Related calculators