Calculating Slope from Two Points
You do not need a graph to find the slope of a line — two points are enough. If a line passes through and , the slope formula turns those four numbers into the slope in one fraction.
The formula is : the difference of the -values on top, the difference of the -values on the bottom. It is rise over run written with subtraction — the top is the rise between the points, the bottom is the run. One rule keeps it honest: subtract in the same order on top and bottom.
How the formula works
Label one point and the other . The slope is .
The subtraction measures how far the line rises between the two points, and measures how far it runs. So the formula is not something new — it is the rise-over-run idea, computed from coordinates instead of counted on a grid.
The graph shows the line through and . The horizontal dashed step is the run and the vertical dashed step is the rise.
Keep the order consistent
Whichever point you call second must come first in both subtractions. Computing on top but on the bottom flips the sign of the answer — the single most common slope mistake.
It does not matter which point you label first. Using and : one order gives , and the other gives . Both signs flip together, so the slope survives.
Watch the negatives
Negative coordinates put double signs into the fraction, and subtracting a negative becomes addition: . Write the substitution out with parentheses before simplifying anything.
A slope of is also worth recognizing on sight: if both points have the same -value, the top of the fraction is and the line is horizontal.
Worked examples
Example 1: positive slope
Find the slope of the line through and .
Answer:
Example 2: negative slope
Find the slope of the line through and .
Answer:
Example 3: a horizontal line
Find the slope of the line through and .
Answer:
Try one yourself
Common questions
Does it matter which point I call ?
No — as long as you keep the order the same on top and bottom. Swap both and the two sign changes cancel. Mix the orders and your slope comes out with the wrong sign.
What if the bottom of the fraction is 0?
Then the two points have the same -value and the line through them is vertical. Division by zero is not allowed, so a vertical line has an undefined slope — that is different from a slope of .
What if the answer is a fraction?
Leave it as a reduced fraction. A slope of is a perfectly good answer: it means the line rises for every it runs.
How is this the same as rise over run?
The top, , is exactly the rise between the two points, and the bottom, , is exactly the run. The formula just does the counting with subtraction.
Want the video version?
Allday Everyday Math has video lessons, practice, and an AI tutor for every topic, Pre-Algebra through Algebra 2.