➗ Mathematics

Slope-Intercept Form: How to Graph and Write y = mx + b

Slope-intercept form explained for Algebra 1: find the slope, graph a line, write y = mx + b from two points and convert from standard form.

  • ⏱ 3 min read
  • ✏️ 3 worked examples
  • 🎯 5 practice questions
  • 📶 Beginner
Middle SchoolHigh School

Curriculum fit: US Grade 8 and Algebra 1 (Common Core 8.EE.B and Functions). The same idea is called y = mx + c in the UK; see the straight line graphs guide for the GCSE version.

On this page

What Is It?

Slope-intercept form writes the equation of a straight line as y = mx + b. The number m is the slope, which tells you how steep the line is and which way it leans. The number b is the y-intercept, the point where the line crosses the y-axis.

The slope is the rise divided by the run. The rise is how far the line goes up or down and the run is how far it goes across. A positive slope goes up from left to right, a negative slope goes down, and a slope of zero is flat. Many real situations fit this form: b is the starting amount and m is the rate of change.

run 1rise 2b = 1y = mx + bm = slope = rise ÷ runb = y-intercept (x = 0)Here: y = 2x + 1m = 2, b = 1
The y-intercept b is where the line crosses the y-axis. The slope m is the rise divided by the run: here the line rises 2 for every 1 across.

Key Formulas and Ideas

  • Slope-intercept form: y = mx + b, where m = slope and b = y-intercept (0, b).
  • Slope from two points: m = (y₂ − y₁) ÷ (x₂ − x₁).
  • Standard form Ax + By = C becomes y = −(A/B)x + C/B (when B ≠ 0).
  • Parallel lines have equal slopes. Perpendicular lines have slopes that are negative reciprocals, so their product is −1.
  • A horizontal line y = b has slope 0. A vertical line x = a has undefined slope.

Worked Examples

Example 1

Graph a Line From Its Equation

Question

Graph y = −2x + 3.

  1. The y-intercept is b = 3, so plot the point (0, 3).
  2. The slope is −2, which is −2/1: go down 2 and right 1.
  3. From (0, 3) that gives (1, 1), and again gives (2, −1).
  4. Draw a straight line through the points.

✓ Answer A line through (0, 3), (1, 1) and (2, −1)

Example 2

Write an Equation From Two Points

Question

Write the equation of the line through (2, 5) and (4, 11).

  1. Find the slope: m = (11 − 5) ÷ (4 − 2) = 6 ÷ 2 = 3.
  2. Put one point into y = 3x + b: 5 = 3(2) + b, so b = −1.
  3. Write the equation: y = 3x − 1.
  4. Check with (4, 11): 3(4) − 1 = 11. ✓

✓ Answer y = 3x − 1

Example 3

Convert From Standard Form

Question

Write 3x + 4y = 12 in slope-intercept form and state the slope and y-intercept.

  1. Subtract 3x from both sides: 4y = −3x + 12.
  2. Divide every term by 4: y = −(3/4)x + 3.
  3. Compare with y = mx + b.

✓ Answer y = −(3/4)x + 3, so the slope is −3/4 and the y-intercept is 3

Common Mistakes to Avoid

  • Writing the slope as run ÷ rise instead of rise ÷ run.
  • Losing the sign on a negative slope, or subtracting the coordinates in a different order on the top and bottom.
  • Reading b straight from standard form. In 3x + 4y = 12 the y-intercept is 3, not 12.
  • Dividing only some terms by B when rearranging. Every term must be divided.
  • Mixing up zero slope (a flat line) and undefined slope (a vertical line).

Slope-Intercept Form in Word Problems

In a word problem, b is the starting value and m is the rate of change. A gym charges a $20 joining fee and $12 per month. The cost after x months is y = 12x + 20. The y-intercept 20 is the joining fee and the slope 12 is the cost per month. After 6 months the cost is 12(6) + 20 = $92.

Parallel and Perpendicular Lines

To write a line parallel to y = 2x + 1 through (0, 4), keep the slope 2 and use b = 4: y = 2x + 4. For a perpendicular line, flip the slope and change its sign to get −1/2, so y = −(1/2)x + 4.

Practice Questions

0 of 5 answered
Q1What are the slope and y-intercept of y = −4x + 9?
Q2What is the slope of the line through (1, 2) and (3, 8)?
Q3Write 2x + y = 7 in slope-intercept form.
Q4What is the slope of any line parallel to y = 5x − 3?
Q5What is the slope of a line perpendicular to y = (2/3)x + 1?

Frequently Asked Questions

What is slope-intercept form?

It is the equation of a line written as y = mx + b, where m is the slope and b is the y-intercept. It shows you straight away where to start on the graph and how to move to the next point.

What is the difference between slope-intercept form and point-slope form?

Slope-intercept form is y = mx + b and needs the y-intercept. Point-slope form is y − y₁ = m(x − x₁) and starts from any point on the line. Both describe the same line and you can convert between them.

Is y = mx + b the same as y = mx + c?

Yes. US textbooks write y = mx + b and UK textbooks write y = mx + c. In both, m is the gradient or slope and the last term is the y-intercept.

Take This Guide With You

Get a free printable PDF with the worked examples and quiz answers. Enter your email and the download starts straight away.

Sources and Review

Reviewed by StudyMorrow editorial review on 7 Nov 2026.