Start here
The slope formula, explained with two points
Understand why change in y is divided by change in x.
The slope of a nonvertical straight line tells you how much y changes for each unit change in x. If you know two distinct points on that line, you can find the slope without knowing its equation first.
The numerator is the vertical change, often called rise. The denominator is the horizontal change, or run. Use the same point order in both subtractions. The formula requires x₂ − x₁ ≠ 0.
Example: from (1, 2) to (5, 4)
- Identify x₁ = 1, y₁ = 2, x₂ = 5, y₂ = 4.
- Subtract y values: 4 − 2 = 2.
- Subtract x values: 5 − 1 = 4.
- Divide: m = 2/4 = 1/2.
A slope of 1/2 means that y increases by half a unit for every one unit increase in x. Equivalently, the line rises 1 unit while moving 2 units right.
Why reversing the points still works
Using the points in the opposite order gives (2 − 4)/(1 − 5) = -2/-4 = 1/2. Both changes reverse sign, so their quotient stays the same. Reversing only one subtraction changes the answer incorrectly.
Subtracting negative coordinates
For (-2, 4) and (4, 1), the rise is 1 − 4 = -3 and the run is 4 − (-2) = 6. The slope is -3/6 = -1/2. Parentheses around negative coordinates help keep the signs clear.
When the formula cannot give a number
If the x coordinates match but the y coordinates differ, the line is vertical and its slope is undefined. If both coordinates match, the two entries describe only one point and there is no unique line. These are different situations; see zero and undefined slope.
Try these points in the slope calculator to see the horizontal and vertical changes on a graph. Next, read slope-intercept form to turn the slope and a point into an equation.
Make the next step yours.
Try your own numbers in the calculator, or check your understanding with a short practice set.