Algebra I · Linear Functions

How to Find Slope from Two Points

The slope formula, explained from scratch. Includes four worked examples covering positive, negative, zero, and undefined slopes, plus the mistakes that trip students up every time.

What Is Slope?

Slope measures how steep a line is. More precisely, it measures how much the \(y\)-value changes for every one unit increase in the \(x\)-value. A line going steeply uphill has a large positive slope. A line going downhill has a negative slope. A flat horizontal line has a slope of zero.

You'll see slope written as \(m\) in math — it shows up in the slope-intercept form of a line: \(y = mx + b\).

The Slope Formula

Given any two points on a line — call them \((x_1, y_1)\) and \((x_2, y_2)\) — the slope is:

The Slope Formula
\[m = \frac{y_2 - y_1}{x_2 - x_1}\]
Rise over Run  ·  Change in y over Change in x

The numerator \((y_2 - y_1)\) is called the rise — how far the line moves up or down. The denominator \((x_2 - x_1)\) is the run — how far the line moves left or right. That's where "rise over run" comes from.

How to Use It: Step by Step

Step 1

Label your two points. Assign one point as \((x_1, y_1)\) and the other as \((x_2, y_2)\). It doesn't matter which point you call "1" and which you call "2" — as long as you stay consistent.

Step 2

Subtract the \(y\)-values (rise). Calculate \(y_2 - y_1\). This is your numerator.

Step 3

Subtract the \(x\)-values in the same order (run). Calculate \(x_2 - x_1\). This is your denominator. Use the same order as Step 2 — second minus first.

Step 4

Divide and simplify. Divide the rise by the run. Simplify the fraction if possible. The result is your slope \(m\).

Worked Examples

Example 1 — Positive Slope

Find the slope of the line through \((1, 3)\) and \((4, 9)\).

Step 1 — Label the points.
\((x_1, y_1) = (1, 3)\)  and  \((x_2, y_2) = (4, 9)\)
Steps 2–4 — Apply the formula.
\(m = \dfrac{9 - 3}{4 - 1} = \dfrac{6}{3} = 2\)

The slope is \(2\). For every 1 unit you move right, the line rises 2 units.
Example 2 — Negative Slope

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

Steps 1–4 — Apply the formula.
\(m = \dfrac{1 - 7}{5 - 2} = \dfrac{-6}{3} = -2\)

The slope is \(-2\). The line goes downhill — for every 1 unit right, it drops 2 units.
Example 3 — Zero Slope

Find the slope of the line through \((-3, 4)\) and \((5, 4)\).

Steps 1–4 — Apply the formula.
\(m = \dfrac{4 - 4}{5 - (-3)} = \dfrac{0}{8} = 0\)

The slope is \(0\). Both points have the same \(y\)-value, so the line is perfectly horizontal. A slope of zero always means a horizontal line.
Example 4 — Undefined Slope

Find the slope of the line through \((3, 1)\) and \((3, 8)\).

Steps 1–4 — Apply the formula.
\(m = \dfrac{8 - 1}{3 - 3} = \dfrac{7}{0}\)

The slope is undefined. Division by zero is undefined in math. This happens whenever both points have the same \(x\)-value — the line is perfectly vertical.

The Four Types of Slope at a Glance

Positive Slope

Line goes up from left to right. \(m > 0\)

Negative Slope

Line goes down from left to right. \(m < 0\)

Zero Slope

Horizontal line. \(m = 0\)

Undefined Slope

Vertical line. Slope does not exist.

What to Do with Slope Next

Once you have the slope, you can write the equation of the line using point-slope form:

\[y - y_1 = m(x - x_1)\]

Plug in your slope and either of the two original points, then simplify into slope-intercept form \(y = mx + b\). This is one of the most used skills in all of Algebra I and II.

Common Mistakes to Avoid

Subtracting in opposite orders. The most common slope mistake: subtracting \(y\)-values as \(y_2 - y_1\) but then subtracting \(x\)-values as \(x_1 - x_2\) (reversed). Always subtract in the same order — second point minus first point — in both numerator and denominator.

Confusing zero slope with undefined slope. "Zero slope" (horizontal line, \(m = 0\)) is not the same as "no slope" (vertical line, undefined). A horizontal line has a slope of exactly zero. A vertical line has a slope that does not exist.

Putting the \(x\) difference on top. Slope is always \(\dfrac{\text{rise}}{\text{run}} = \dfrac{\Delta y}{\Delta x}\). The \(y\) values go on top, the \(x\) values on the bottom. Flipping it gives you the reciprocal of the slope, which is a completely different value.

Not simplifying the fraction. \(\dfrac{4}{6}\) and \(\dfrac{2}{3}\) are the same slope, but your answer should always be in simplest form.

Still Fuzzy on Slope?

A 30-minute session clears up slope, point-slope form, and slope-intercept form for good. Book a free consultation and get started today.

Book Free Consultation Try Practice Problems