How to find the slope of a line from two points
Slope tells you how steep a line is: how far it goes up (or down) for every step to the right. People call it “rise over run”.
The slope formula
For two points and :
The top is the change in (the rise). The bottom is the change in (the run).
Example 1: a positive slope
Find the slope of the line through and .
The line goes up 2 for every 1 it moves to the right.
Example 2: negative numbers
Find the slope of the line through and .
Subtracting a negative is the step where most slips happen: . The slope is negative, so the line goes down from left to right.
Does it matter which point is first?
No, as long as you use the same order on the top and the bottom. Swapping the points in Example 1:
Same answer. What you cannot do is start with one point on top and the other point on the bottom.
Horizontal and vertical lines
Horizontal line. Through and :
A flat line has slope 0.
Vertical line. Through and :
You cannot divide by zero, so the slope of a vertical line is undefined.
What the number tells you
| Slope | The line |
|---|---|
| Positive | Goes up from left to right |
| Negative | Goes down from left to right |
| Zero | Is horizontal |
| Undefined | Is vertical |
| Bigger number (ignoring the sign) | Is steeper |
Common mistakes
- Putting x on top. Slope is change in over change in , not the other way round.
- Mixing the order, for example on top with underneath. This flips the sign.
- Dropping a negative sign when subtracting a negative coordinate.
- Calling a vertical line’s slope 0. Zero is for horizontal lines; vertical is undefined.
Practice problems
Check your answers with the slope calculator, which shows the same steps for any two points.
1. and
Answer
2. and
Answer
3. and
Answer
4. and
Answer
The x-values are the same, so the run is 0. The line is vertical and the slope is undefined.
5. and
Answer
. The line is horizontal.