Skip to main content
Online

Slope of a line practice

Slope (and y-intercept) of the line through two points. Work through one problem at a time and get a new one on every click, or print a worksheet with an answer key.

Easy: Whole-number slopes. Medium: Slope and y-intercept. Hard: Slope and y-intercept.

Loading your first problem…

How to solve slope of a line problems

  1. Slope m = (y₂ − y₁) ÷ (x₂ − x₁): rise over run.
  2. Take the points in the same order on the top and the bottom.
  3. The y-intercept is b = y₁ − m × x₁.
  4. Write the line as y = mx + b.

Worked example

Find the slope and y-intercept of the line through (1, 3) and (4, 9).

  1. Rise: 9 − 3 = 6.
  2. Run: 4 − 1 = 3.
  3. Slope: m = 6 ÷ 3 = 2.
  4. Intercept: b = 3 − 2 × 1 = 1, so the line is y = 2x + 1.

Answer: m = 2, b = 1

Common mistakes

  • Putting the x difference on top: slope is rise over run.
  • Subtracting the points in a different order on the top and the bottom.

How to use this page

  • Students: work each problem on paper, type your answer and press Check. Use Hint if you are stuck and open the worked solution only after you have tried. Three right answers in a row move you up a level.
  • Teachers: use Copy link to this problem to share a single question, or switch to Printable worksheet, press New worksheet until you like the set, and share its link. Everyone who opens it gets the same problems.
  • The full method for this topic is explained in the slope of a line solver, which also solves your own problems step by step.
  • More topics: all practice topics, or mix every topic in one session on the practice page.