How to Find the Slope
The slope of a line tells you how steep the line is and whether it goes up or down. On this page you will find the slope from the rise and the run, then from two points on the line, and you can drag two points on a graph to see the slope change.
In this lesson, you will learn
- how to find the slope when the rise and the run are known, and what the slope means
- where the slope formula m = (y2 − y1) ÷ (x2 − x1) comes from
- how to find the slope from two points, even with negative coordinates
- how to tell positive, negative, zero and undefined slopes apart
How to Find the Slope When the Rise and the Run Are Known
Here is how to find the slope. We saw in the lesson about what is slope that slope is a measure of how steep a line is and the steepness of the line can be measured with the slope formula you see above.
Let's illustrate this with some examples:
For the graph above, we see that the rise is 2 and the run is 4, so slope = 24.
Slope = 12 after simplification.
What is the meaning of 12?
Since 12 is positive, you are going uphill. Now, suppose the unit is a yard.
1 is the rise and 2 is the run. This means that every time you go up 1 yard, you go across or horizontally 2 yards.
This situation is not very steep. However, take a look at the following:
Here, the rise is 8 and the run or horizontal distance is 2.
So, slope = 82 = 4.
4 = 41. Suppose again that the unit is a yard. This means that each time you go 4 yards straight up, you only go 1 yard horizontally.
This situation is very steep because you go up a lot more compared to going horizontally.
The rise and the run have the same unit, so the units cancel. A slope is just a number, with no unit: a slope of 4 means 4 units up for every 1 unit across.
A ramp rises 3 feet over a run of 12 feet. What is the slope of the ramp?
Show answer
14. Slope = 312 = 14. The ramp goes up 1 foot for every 4 feet across.
How to Find the Slope When We Don't Know the Rise and the Run
If we graph the slope on the coordinate system, we will be able to derive another useful formula.
Let us then try to put a slope of 4 as in the previous example on the coordinate system.
To graph a slope of 4, put a rise of 8 anywhere you wish. Then, put a run of 2. Here we go!
Draw the slope (in red).
If we remove everything in blue (rise and run), you are left with just the slope of the line.
Then, label the two endpoints with their respective coordinates.
The two coordinates (4, 9) and (2, 1) can be used to get a slope of 4.
Notice that 9 − 1 = 8 and 9 and 1 represent y-coordinates. Since we cannot call both coordinates y, we can call one y1 and call the other y2.
Let y1 = 9
Let y2 = 1
Therefore, 9 − 1 = y1 − y2 = 8 = rise
Notice also by the same token that 4 − 2 = 2 and 4 and 2 represent x-coordinates. Since we cannot call both coordinates x, we can call one x1 and call the other x2.
Let x1 = 4
Let x2 = 2
Therefore, 4 − 2 = x1 − x2 = 2 = run
We can see then that y1 − y2 = rise and x1 − x2 = run.
The formula becomes:
Above, we found the rise as y1 − y2 and the run as x1 − x2. The formula is usually written the other way, as y2 − y1 over x2 − x1. Both orders give the same slope, as long as you subtract in the same order on the top and on the bottom. Example 2 below shows this.
So, if the rise and the run are not given, but you know at least two points, use the formula right above.
Find the slope of the line through (1, 2) and (3, 8).
Show answer
3. m = 8 − 23 − 1 = 62 = 3.
Examples: How to Find the Slope When Points Are Given
1) (8, 8) and (4, 4)
Let (x1, y1) = (8, 8) and (x2, y2) = (4, 4)
y1 − y2x1 − x2 = 8 − 48 − 4 = 44 = 1
Since 1 is positive, the line goes up as you move from left to right.
2) (1, −5) and (2, −10)
Let (x1, y1) = (1, −5) and (x2, y2) = (2, −10)
y1 − y2x1 − x2 = −5 − (−10)1 − 2 = −5 + 10−1 = 5−1 = −5
Since −5 is negative, the line goes down as you move from left to right.
Notice that
y2 − y1x2 − x1 = −10 − (−5)2 − 1 = −10 + 51 = −51 = −5
In general,
- Label the points: (x1, y1) = (−2, 3) and (x2, y2) = (4, −1).
- Rise: y2 − y1 = −1 − 3 = −4.
- Run: x2 − x1 = 4 − (−2) = 4 + 2 = 6.
- Divide and simplify: m = −46 = −23.
The slope is −23. The line goes down 2 units for every 3 units to the right.
Subtracting in a different order on the top and on the bottom, like (y2 − y1) ÷ (x1 − x2). With (−2, 3) and (4, −1), that gives −4 ÷ (−6) = 23, which has the wrong sign. Start with the same point on the top and on the bottom.
Find the slope of the line through (0, 5) and (2, 1).
Show answer
−2. m = 1 − 52 − 0 = −42 = −2. The line goes down from left to right.
Now you don't have to wonder anymore about how to find the slope!
Interactive Slope Explorer: Drag the Points
Drag the purple and blue points. They snap to whole numbers, and the rise, the run and the slope update as you move them. You can also click a point and move it with the arrow keys.
Point 1
Point 2
Slope formula
m = y2 − y1x2 − x1
Calculation
Result
Slope =
The four kinds of slope
- Positive slopeThe line goes up as you move from left to right. Example: m = 2.
- Negative slopeThe line goes down as you move from left to right. Example: m = −12.
- Zero slopeThe line is horizontal. The rise is 0, so m = 0 ÷ run = 0.
- Undefined slopeThe line is vertical. The run is 0, and you cannot divide by 0.
Saying that a vertical line has a slope of 0. A vertical line has a run of 0, and division by 0 is not possible, so its slope is undefined. It is a horizontal line that has a slope of 0. Learn more in undefined slope.
What is the slope of the line through (−3, 2) and (4, 2)?
Show answer
0. m = 2 − 24 − (−3) = 07 = 0. Both points have the same y-coordinate, so the line is horizontal.
Summary
- Slope = riserun: the vertical change divided by the horizontal change.
- A slope is a number with no unit. A slope of 12 means up 1 for every 2 across; a slope of 4 is much steeper.
- With two points, use m = y2 − y1x2 − x1. Subtract in the same order on the top and on the bottom.
- Put negative numbers in brackets when you subtract them: 4 − (−2) = 6.
- A positive slope goes up from left to right, a negative slope goes down, a horizontal line has a slope of 0, and a vertical line has an undefined slope.
Test Yourself: Interactive 10-Question Quiz
Find the slope in each question. Type a whole number like 3 or −2, a fraction like 2/3, or the word undefined. Every answer is explained, and each time you play you get new questions.
Quiz complete!
Keep learning