Algebra · 2 min read

How to find slope

To find the slope of a line, divide the change in y by the change in x between two points: m = (y₂ − y₁) / (x₂ − x₁), often called rise over run. The line through (1, 2) and (3, 8) has slope 6 / 2 = 3. In y = mx + b, the slope is m.

The slope formula

Example 1: from two points

Find the slope through and .

  1. Rise:
  2. Run:

Example 2: with negative numbers

Find the slope through and .

  1. Rise:
  2. Run:
  3. . The line goes down to the right.

Example 3: from a graph

Pick two points where the line crosses grid corners exactly. Count how many units you go up (positive) or down (negative) to get from the left point to the right point: that’s the rise. Count how many units right: that’s the run. Divide rise by run.

Example 4: from an equation

  • In slope-intercept form , the slope is the number in front of . In , .
  • In standard form , solve for or use . For : .

The four kinds of slope

Slope Line Example
Positive rises left to right
Negative falls left to right
Zero horizontal
Undefined vertical

Common mistakes

  • Subtracting in a different order on top and bottom.
  • Putting run over rise.
  • Calling a vertical line’s slope 0. It’s undefined. A horizontal line has slope 0.

Check it with the calculator

The slope calculator gives the slope, y-intercept and line equation from any two points, with steps. For distances between points on a grid, try the Pythagorean theorem calculator.

Point 1
Point 2
Worked example

m = 3; y = 3x − 1

Step by step

  1. Write the slope formula
  2. Put in the points

    and .

  3. Work out the rise and the run

    Rise , run .

  4. Simplify
  5. Find the y-intercept b

    Use with the first point and solve for .

  6. Write the line equation

FAQ

What is the slope formula?

: the change in divided by the change in .

How do you find slope from a graph?

Pick two points on the line, count the rise (vertical change) and the run (horizontal change) between them, then divide rise by run.

What is the slope of a horizontal line?

Zero. The value never changes, so the rise is 0.

How do you find slope from y = mx + b?

The slope is , the coefficient of . In , the slope is 2.