Slope-intercept form: y = mx + b

Topic guide · Updated 2026-11-26

Quick answer

Slope-intercept form writes a line as y = mx + b, where m is the slope and b is the y-intercept. To graph it, plot (0, b), then use the slope as rise over run to plot a second point and draw the line through both.

−10−8−6−4−2246810−6−4−2246
  • y=m x+b
Open in graphing calculator

Graph a line from y = mx + b

  1. Plot the y-intercept (0, b).
  2. Write the slope as a fraction rise/run. For m = 3/2, go up 3 and right 2.
  3. Plot the second point and draw a straight line through both.

Write the equation from two points

For (2, 5) and (6, 13): slope m = (13 − 5)/(6 − 2) = 2. Substitute one point into y = mx + b: 5 = 2·2 + b, so b = 1. The equation is y = 2x + 1.

Convert from standard form

Standard form is Ax + By = C. Solve for y: By = −Ax + C, so y = (−A/B)x + C/B. Example: 3x + 2y = 8 becomes y = −1.5x + 4, so the slope is −1.5 and the y-intercept is 4.

Other forms of a line

Slope-intercepty = mx + b
Point-slopey − y₁ = m(x − x₁)
StandardAx + By = C
Interceptx/a + y/b = 1

Frequently asked questions

Can every line be written in slope-intercept form?

Every line except vertical lines. A vertical line x = c has undefined slope, so it has no y = mx + b form.

What does b mean in a word problem?

The starting value: the value of y when x is 0, such as a flat fee or an initial amount.