Slope is rise over run
Slope tells you how much a line goes up or down for each step to the right. The up or down part is the rise. The sideways part is the run. Divide the rise by the run and you have the slope.
With two points you can measure both. The rise is the difference in the y-values and the run is the difference in the x-values. That gives the slope formula, which every textbook writes the same way.
Formula notes
m = (y2 - y1) / (x2 - x1)
The four steps
Here's the method with the points (2, 1) and (6, 9). Call the first one point 1 and the second one point 2. It doesn't matter which you pick, as long as you stick with it.
The rise is 9 - 1 = 8. The run is 6 - 2 = 4. The slope is 8 / 4 = 2. Simplify the fraction if you can, and you're done. A slope of 2 means the line climbs 2 units for every 1 unit to the right.
Working with negative numbers
Most wrong answers come from minus signs. Take (-2, -3) and (4, 1). The rise is 1 - (-3), which is 1 + 3 = 4. The run is 4 - (-2), which is 4 + 2 = 6. The slope is 4/6, which simplifies to 2/3.
Write the subtraction out with parentheses before you simplify. Subtracting a negative is adding, and it's easy to drop that second minus sign when you work in your head. If you want to double check, our slope calculator shows the rise and run it used along with the answer.
Working with fractions and decimals
The method doesn't change. For (0.5, 1) and (2.5, 4), the rise is 3 and the run is 2, so the slope is 3/2, or 1.5.
Keep the answer as a fraction if you're going to use it to write an equation. A slope of 2/3 written as 0.67 is already rounded, and that small error grows when you use it to find an intercept. Teachers usually want the fraction anyway.
Mistakes that flip or break the answer
Mixing the order is the big one. If you do y2 - y1 on top but x1 - x2 on the bottom, you get the right size with the wrong sign. Swapping both is fine, because the two sign changes cancel out.
Putting x on top is the other classic. Slope is change in y over change in x, never the other way around. A quick way to remember it: you have to rise before you can run.
- Subtracting in a different order on the top and bottom
- Putting the x difference on top
- Losing a minus sign when subtracting a negative
- Rounding the slope before writing the equation
When the answer is zero or undefined
If the two y-values match, the rise is 0 and so is the slope. The line is flat, and its equation is y = that value. Points (1, 5) and (7, 5) sit on y = 5.
If the two x-values match, the run is 0. You can't divide by zero, so the slope is undefined and the line is vertical. Points (-4, 2) and (-4, 9) sit on x = -4. Don't call this slope infinite or zero. Undefined is the right word.
Once you have the slope, you're one step away from the full equation. Plug the slope and either point into y - y1 = m(x - x1), then solve for y if you want slope intercept form. With (-2, -3) and slope 2/3, that's y = (2/3)x - 5/3.
Frequently asked questions
Does it matter which point is first?
No. Swapping the points changes the sign of both the rise and the run, and the two sign changes cancel out. You get the same slope either way.
What does a slope of 2/3 mean?
The line goes up 2 units for every 3 units it moves to the right. A negative slope like -2/3 goes down 2 for every 3 to the right.
Can a slope be a fraction?
Yes, and it often is. Keep it as a simplified fraction, like 2/3, rather than a rounded decimal when you use it in an equation.
What is the slope between (1, 5) and (7, 5)?
Zero. The rise is 5 - 5 = 0, so the line through those points is horizontal: y = 5.
Is the slope the same anywhere on a straight line?
Yes. Any two points on the same straight line give the same slope. That's what makes it a straight line.
References
These sources support the method or guidance used for Slope Calculator. Verify time-sensitive rules at the source.
Try the calculator
Open Slope Calculator, enter your scenario, and compare its supporting rows with this guide's method and checks.
