Slope-intercept form: y = mx + b
In y = mx + b, m is the slope and b is the y-intercept, the point where the line crosses the y-axis.
Not sure this is the right level? Take the free grade 8 check-up and get a daily practice plan.
What m and b mean
Every straight line that is not vertical can be written as y = mx + b:
- m is the slope: the number multiplying x. It tells you how much y changes for each 1 step in x.
- b is the y-intercept: the value of y when x = 0, where the line crosses the y-axis. It is the starting value.
So y = 3x − 4 has slope 3 and y-intercept −4. y = −x + 5 has slope −1 and y-intercept 5. y = 6x has slope 6 and y-intercept 0, so it passes through the origin: a proportional relationship is just y = mx + b with b = 0.
Common Core standard 8.EE.B.6 asks grade 8 students to derive y = mx + b for a line crossing the y-axis at b, and 8.F.B.4 asks them to build a linear function from a description, a table or a graph.
See it: pictures to draw with your child
Copy these onto paper or a whiteboard. A quick sketch makes the idea concrete before any written method.
How to graph y = mx + b
- Plot b on the y-axis. For y = 2x + 1, put a point at (0, 1).
- Use the slope to step. m = 2 = 2/1: go 1 right and 2 up to (1, 3). Do it again to (2, 5).
- Draw the line through the points, all the way across the grid.
For a fraction slope like y = (2/3)x − 1, start at (0, −1), then go 3 right and 2 up to (3, 1). For a negative slope like y = −2x + 4, go 1 right and 2 down.
How to write the equation of a line
From a graph: read b where the line crosses the y-axis, then find m with a slope triangle. Put them into y = mx + b.
From a table: the rate of change is m. If the table includes x = 0, that y-value is b. If not, work back.
| x | 2 | 3 | 4 | 5 |
|---|---|---|---|---|
| y | 7 | 10 | 13 | 16 |
Each step of 1 in x adds 3 to y, so m = 3. Going back from x = 2 to x = 0 takes away 3 twice: 7 − 6 = 1, so b = 1 and the equation is y = 3x + 1.
From another form: rearrange to get y on its own. 2x + y = 7 becomes y = −2x + 7, so the slope is −2.
A full example, start to finish
Write the equation of the line through (2, 1) and (6, 7).
- Slope: (7 − 1) ÷ (6 − 2) = 6 ÷ 4 = 3/2.
- Put in one point to find b: 1 = (3/2) × 2 + b, so 1 = 3 + b and b = −2.
- Write it: y = (3/2)x − 2.
- Check with the other point: (3/2) × 6 − 2 = 9 − 2 = 7. Correct.
y = mx + b practice
Read the slope and y-intercept, match a graph to its equation, and find m and b from a table. New lines every time.
What comes next
In word problems, m is the rate of change and b is the initial value: see linear functions. Two lines in y = mx + b form can be compared at a glance in comparing functions, and where they cross solves a system of equations.
What to say to your child
A short script for teaching it the first time. Pause after each line and let your child do the next step.
- “Where does this line cross the y-axis?” (That’s b.)
- “From there, how far up for each step right?” (That’s m.)
- “So the line is y = m x + b. Let’s write it.”
- “Check: pick another point on the line and put its x in. Do you get its y?”
- “Now I’ll say an equation. You draw the line.”
More worked examples
Example 1: y = −3x + 2
Slope −3, y-intercept 2. Start at (0, 2), go 1 right and 3 down.
Example 2: Line crosses at 4 and rises 1 for each 2 across
m = 1/2, b = 4: y = (1/2)x + 4.
Example 3: Table x: 0, 1, 2 and y: −5, −1, 3
b = −5 (at x = 0), m = 4: y = 4x − 5.
Practice questions (answers below)
Ask these out loud or write them down. Check each answer, and ask “how did you get that?” for one or two.
- Slope of y = 5x − 3
- y-intercept of y = −2x + 7
- y-intercept of y = 4x
- Slope of 3x + y = 9
- Line through (0, −2) with slope 3
- Table x: 1, 2, 3 and y: 5, 7, 9. Equation?
- Line through (1, 4) and (3, 10). Equation?
- Is y = 2x + 1 proportional?
Show the answers
- 5
- 7
- 0
- −3
- y = 3x − 2
- y = 2x + 3
- y = 3x + 1
- No, b is not 0
Common mistakes
How to teach it at home
Taxi and phone plans
Any bill with a starting fee and a cost per unit is a linear function. Ask: what is the rate of change, and what is the initial value?
Graph a walk
Walk away from a wall, stop, then walk back, while someone times it. Sketch distance against time together.
Input–output game
One person thinks of a rule like “double it and add 1”. The other gives inputs and guesses the rule from the outputs.
By grade
- Grade 8 (8.EE.B.6): y = mx + b for a line crossing the y-axis at b.
- Grade 8 (8.F.B.4): build a linear function and interpret m and b.
- Algebra 1: point-slope and standard form, and parallel and perpendicular lines.
More for each grade: Grade 8 math and the CBSE class 8 maths guide.
Worksheets and practice

Slope and y-intercept worksheet: printable PDF with an answer key.
Last reviewed
Questions parents ask
What does y = mx + b mean?
It is the equation of a straight line: m is the slope and b is the y-intercept.
How do you find the y-intercept?
It is b in y = mx + b, the y-value when x = 0, where the line crosses the y-axis.
How do you graph y = mx + b?
Plot b on the y-axis, then use the slope as rise over run to plot more points, and draw the line through them.
How do you write an equation from a graph?
Read b where the line crosses the y-axis, find m with a slope triangle, and write y = mx + b.
What grade learns slope-intercept form?
Grade 8, in Common Core standards 8.EE.B.6 and 8.F.B.4.