← All skill guides

Find the Slope of a Line: Step-by-Step Guide

The slope of a line tells you how steep it is. It is the rise (how far the line goes up or down) divided by the run (how far it goes across). If you know two points, (x1, y1) and (x2, y2), the slope is m = (y2 - y1) / (x2 - x1). A line that goes up from left to right has a positive slope. A line that goes down has a negative slope. A flat line has a slope of zero, and a straight up-and-down line has an undefined slope.

Math Racer skill guide · Algebra 1 · Grade 9

How to solve it, step by step

  1. Label the two points. Call one point (x1, y1) and the other (x2, y2). It does not matter which is which, but be consistent.
    \[(x_1, y_1), \;(x_2, y_2)\]
  2. Find the rise. Subtract the y-coordinates: rise = y2 - y1.
    \[\Delta y = y_2 - y_1\]
  3. Find the run. Subtract the x-coordinates in the same order: run = x2 - x1.
    \[\Delta x = x_2 - x_1\]
  4. Divide rise by run. The slope is rise divided by run. Simplify the fraction if you can.
    \[m = \dfrac{y_2 - y_1}{x_2 - x_1}\]

Worked example

Find the slope of the line through (-1, 2) and (3, 10).

Step 1: Let (x1, y1) = (-1, 2) and (x2, y2) = (3, 10).

Step 2: Rise = y2 - y1 = 10 - 2 = 8.

Step 3: Run = x2 - x1 = 3 - (-1) = 4.

Step 4: Slope = 8 / 4 = 2.

Check: Swap the points. (2 - 10) / (-1 - 3) = -8 / -4 = 2. It is the same.

The slope is m = 2.

Tips and common mistakes

  • Subtract the y-values and the x-values in the same order. If you flip only one, you get the wrong sign.
  • Watch for negatives. Subtracting a negative is the same as adding: 3 - (-1) = 4.
  • If the run is 0, the line is vertical and the slope is undefined. It is not zero.
  • If the rise is 0, the line is horizontal and the slope is 0.
  • A line has the same slope everywhere, so pick the two points that are easiest to work with.
  • In y = mx + b, the slope is the number in front of x.
  • Parallel lines have the same slope. Perpendicular lines have slopes that multiply to -1.

Practice in Explorer · More skill guides