HomeMath › Slope Intercept Form Calculator

Slope Intercept Form Calculator

Get a line into y = mx + b from whatever you have: the slope and y-intercept directly, a slope plus any point, or two points. Decimals and negatives are fine; the result shows the equation, m, b, and where the line crosses each axis.

Example: with I know... Slope and y-intercept (m and b) · Slope m 2 · y-intercept b (mode 1) -3 · x₁ (point) 1 · y₁ (point) 4 → Equation: y = 2x - 3.

  • Slope (m)2
  • y-intercept (b)-3 — crosses the y-axis at (0, -3)
  • x-intercept1.5 — crosses the x-axis at (1.5, 0)

Computed by the calculator below using its default values. Change any input to see your own numbers.

Equation
Slope (m)
y-intercept (b)
x-intercept

y = mx + b: m sets the tilt (rise per unit of run), b pins where the line crosses the y-axis. From a point, b = y₁ − m·x₁; from two points, m = Δy/Δx first.

Reading y = mx + b like a native

The two constants split the job cleanly. b is the starting height: at x = 0 the mx term vanishes, so the line crosses the y-axis at (0, b). m is the recipe for everything after that: each 1-unit step right moves the line m units up (or down when m is negative). y = 2x − 3 starts at (0, −3) and climbs 2 per step; that is enough to sketch it in five seconds.

The form also makes intercepts trivial. The y-intercept is b by definition; the x-intercept comes from setting y = 0 and solving, x = −b/m. The only line the form cannot express is a vertical one — its slope divides by zero — which is why this calculator switches to x = a notation when your two points share an x-value.

How it’s calculated

Mode 1 uses m and b directly. Mode 2: b = y₁ − m·x₁. Mode 3: m = (y₂ − y₁)/(x₂ − x₁), then b = y₁ − m·x₁. x-intercept = −b/m for m ≠ 0. Values are rounded to 4 decimal places for display; vertical lines (Δx = 0) are reported as x = a since they have no slope-intercept form.

Two-point mode assumes the two points are distinct — identical points define infinitely many lines, not one.

How m and b move the graph

ChangeEffect on the line
Increase bSlides straight up, tilt unchanged
m > 0 vs m < 0Rises left-to-right vs falls left-to-right
|m| grows past 1Steeper than 45° (per equal axis scales)
m = 0Horizontal at height b
m undefined (vertical)Not expressible as y = mx + b — written x = a

Slope-intercept conventions: m is rise per unit run, b is the height at x = 0.

Common mistakes

  • Reading the slope from the wrong spot: in y = 3 + 2x the slope is 2 (the x-coefficient), not 3.
  • Sign slips finding b from a point — b = y₁ − m·x₁ subtracts the product, so with m = −1.5 and point (2, 1), b = 1 − (−3) = 4.
  • Inverting rise and run in two-point mode: m is Δy over Δx, never the reverse.
  • Forcing a vertical line into the form — x = 3 has undefined slope, and no choice of m and b produces it.

Frequently asked questions

What do m and b mean in y = mx + b?

m is the slope — how much y changes per 1-unit increase in x — and b is the y-intercept, the y-value where the line crosses the y-axis at x = 0.

How do I find b if I only know the slope and a point?

Solve y = mx + b for b at your point: b = y₁ − m·x₁. With slope −1.5 through (2, 1): b = 1 − (−1.5)(2) = 4, so the line is y = −1.5x + 4.

How do I find the x-intercept from y = mx + b?

Set y to 0 and solve: x = −b/m. For y = 2x − 3 that gives x = 1.5, the point (1.5, 0). Horizontal lines (m = 0) never cross unless b is also 0.

How is slope-intercept form different from point-slope and standard form?

They describe the same lines in different clothes: y = mx + b shows slope and intercept instantly, y − y₁ = m(x − x₁) plugs in any known point, and Ax + By = C keeps integer coefficients. Converting between them is a few algebra steps.

Why can't a vertical line be written as y = mx + b?

A vertical line has one x-value and every y-value, so y is not a function of x at all — and its slope, rise over zero run, is undefined. Vertical lines get their own notation: x = a.