← All guides

How to find the slope of a line (slope formula)

Slope = rise over run = (y₂ − y₁)/(x₂ − x₁). How to find it from two points, a graph or a table, with positive, negative, zero and undefined slopes.

Video lesson: Slope from tables and two points (free, with subtitles)

Slope tells you how steep a line is: how much y changes each time x goes up by 1. It is "rise over run".

slope m = (y₂ − y₁) / (x₂ − x₁)

From two points

Find the slope through (2, 3) and (6, 11).

m = (11 − 3) / (6 − 2) = 8 / 4 = 2. The line rises 2 for every 1 step right.

A negative slope

Through (−1, 4) and (3, −2): m = (−2 − 4) / (3 − (−1)) = −6 / 4 = −3/2. The line goes down 3 for every 2 steps right.

Does the order of the points matter?

No, as long as you stay consistent. (3 − 11)/(2 − 6) = −8/−4 = 2, the same answer. Just don't take y from one point first and x from the other point first.

The four kinds of slope

From a table

If x goes 0, 1, 2, 3 and y goes 5, 8, 11, 14, then y goes up 3 each time x goes up 1, so the slope is 3.

Why it works

On a straight line the steepness is the same everywhere, so any two points give the same ratio. That's what makes it a line, and it's why you can pick whichever two points are easiest.

Practice it free

Watch the full lesson and try questions with new numbers every time, with the worked steps shown if you get one wrong.

Practice: Slope from tables and two points All courses