Learn · Algebra and geometry (grades 8–10)

How to Find the Slope of a Line from Two Points

The slope of a line measures how steep it is: how far it rises for each step to the right. It is "rise over run".

Try it with your own problem ↓

The steps

  1. Name the points (x₁, y₁) and (x₂, y₂). It doesn't matter which is first, as long as you stay consistent.
  2. Subtract the y-values: y₂ − y₁. This is the rise.
  3. Subtract the x-values in the same order: x₂ − x₁. This is the run.
  4. Divide: slope m = rise ÷ run.
  5. Simplify. A positive slope goes up to the right, and a negative slope goes down.

A worked example

Find the slope of the line through (1, 2) and (5, 4).

  1. Let (x₁, y₁) = (1, 2) and (x₂, y₂) = (5, 4).
  2. Rise: y₂ − y₁ = 4 − 2 = 2.
  3. Run: x₂ − x₁ = 5 − 1 = 4.
  4. Slope: m = 2/4 = 1/2.
  5. Meaning: for every 2 steps right, the line goes up 1.

The slope is m = 1/2.

Why it works

Going from one point to the other, the y-value changes by the rise and the x-value changes by the run. A straight line has the same steepness everywhere, so rise over run gives the same number for any two points on it. A slope of 1/2 means "up 1 for every 2 across".

Try it with your own problem

Open the free The Slope Grid with this example already filled in. It shows every step, and you can type over it with your own numbers.

Work it out: (1,2) (5,4)Opens The Slope Grid with this example

Or try these

Common mistakes

Questions people ask

What is the slope of a horizontal line? A vertical one?

Horizontal lines have slope 0 (no rise). Vertical lines have an undefined slope, because the run is 0 and you can't divide by 0.

Does it matter which point is first?

No, as long as you subtract in the same order on top and bottom.

What does slope mean in real life?

A rate of change: miles per hour, dollars per pound, or the steepness of a ramp.

Keep learning

Show The Steps is free, with no accounts or ads, and everything is worked out in your own browser. Start at the home page.