The Slope Formula
Slope measures how steep a line is — how much the line goes up or down each time you move one unit to the right. A slope of means the line climbs units for every unit right. A slope of means it drops half a unit for every unit right.
If you know two points on a line, you can compute its slope directly with the slope formula: . No graph needed — just two subtractions and a division. This one formula shows up everywhere in Algebra 1, so it's worth making automatic.
The formula, piece by piece
Call your two points and . The slope is — the change in on top, the change in on the bottom.
The top, , tells you how far the line moved vertically between the two points. The bottom, , tells you how far it moved horizontally. Dividing gives the vertical change per one unit of horizontal change — that's the intuition people call rise over run, but the formula itself is always .
In the graph below, the line passes through and . Between those points, changed by while changed by , so .
Keep the order consistent
It does not matter which point you call — but once you choose, you must subtract in the same order on top and bottom. If you write on top, the bottom must be , not . Mixing the order flips the sign of your answer, and a wrong sign means a line that tilts the wrong way.
Negative coordinates are where most slope mistakes happen. Subtracting a negative becomes addition: with points and , the bottom is , not . Write out the substitution with parentheses before simplifying anything.
Zero slope and undefined slope
If the two points have the same -value, the top of the formula is , so the slope is — a horizontal line. Zero slope is a perfectly good slope: the line is flat, not missing.
If the two points have the same -value, the bottom of the formula is , and dividing by zero is not allowed — the slope is undefined. That's a vertical line. Keep these two straight: horizontal means slope , vertical means no slope at all.
Worked examples
Example 1: two positive points
Find the slope of the line through and .
Answer:
Example 2: negative coordinates
Find the slope of the line through and .
Answer:
Example 3: a fraction answer
Find the slope of the line through and .
Answer:
Example 4: either point can go first
Find the slope of the line through and , both ways.
Answer: either way — the order only has to be consistent
Try one yourself
Common questions
Does it matter which point I call ?
No — either point can go first. What matters is consistency: subtract the points in the same order on top and bottom. If comes first on top, must come first on the bottom.
What if I get on the top or the bottom?
A on top means the slope is and the line is horizontal. A on the bottom means the slope is undefined and the line is vertical, because dividing by zero is not allowed.
Should I leave the slope as a fraction?
Yes, reduced. A slope like should be written . Fractions are often more useful than decimals here, because the top and bottom tell you exactly how to step along the line when graphing.
Want the video version?
Allday Everyday Math has video lessons, practice, and an AI tutor for every topic, Pre-Algebra through Algebra 2.