The Basic Formula for Slope
Slope measures how steep a line is. It tells you how much a line goes up or down for every unit it moves to the right. To find the slope between two points, you subtract the y-coordinates, subtract the x-coordinates, and divide the first result by the second.
The formula is: slope = (y₂ − y₁) ÷ (x₂ − x₁). The two points are (x₁, y₁) and (x₂, y₂). The order matters — you must subtract the first point from the second point consistently in both the numerator and denominator.
A positive slope means the line goes upward from left to right. A negative slope means it goes downward. A slope of zero means the line is flat. If the denominator equals zero, the line is vertical and has no defined slope.
Key Takeaways
- Slope is calculated by dividing the change in y-values by the change in x-values: (y₂ − y₁) ÷ (x₂ − x₁).
- Positive slopes rise from left to right, negative slopes fall, and zero slopes are horizontal lines.
- The order of your points matters — always subtract the first point's coordinates from the second point's coordinates.
- A vertical line has undefined slope because you cannot divide by zero when the x-values are the same.
- Slope tells you the rate of change — how many units up or down the line moves for each unit to the right.
Step-by-Step Calculation with an Example
Let's work through a concrete example. Suppose you have two points: (2, 3) and (5, 9). First, identify which point is point 1 and which is point 2. It does not matter which you choose, but be consistent. Let's say (2, 3) is point 1 and (5, 9) is point 2.
Next, find the change in y-values: y₂ − y₁ = 9 − 3 = 6. Then find the change in x-values: x₂ − x₁ = 5 − 2 = 3. Finally, divide: slope = 6 ÷ 3 = 2. This means for every 1 unit the line moves to the right, it rises 2 units.
If you had reversed the points and used (5, 9) as point 1 and (2, 3) as point 2, you would get: (3 − 9) ÷ (2 − 5) = −6 ÷ −3 = 2. The slope is the same because both the numerator and denominator flip sign, which cancels out.
Handling Negative Slopes and Fractions
Negative slopes occur when one point is higher and to the left, and the other is lower and to the right. For example, with points (1, 8) and (4, 2): slope = (2 − 8) ÷ (4 − 1) = −6 ÷ 3 = −2. This line falls 2 units for every 1 unit it moves right.
Many slopes are not whole numbers. If your points are (0, 1) and (3, 5), the slope is (5 − 1) ÷ (3 − 0) = 4 ÷ 3, which you can leave as a fraction or convert to a decimal (approximately 1.33). Fractions are often preferred in mathematics because they are exact.
When you get a fraction, simplify it if possible. For instance, if your calculation gives you 8 ÷ 4, reduce it to 2. If it gives you 6 ÷ 9, reduce it to 2 ÷ 3.
Recognizing Special Cases
A horizontal line has a slope of zero. This happens when both points have the same y-coordinate. For example, (2, 5) and (7, 5) give slope = (5 − 5) ÷ (7 − 2) = 0 ÷ 5 = 0. The line does not rise or fall at all.
A vertical line has undefined slope. This occurs when both points have the same x-coordinate. For example, (3, 1) and (3, 8) give slope = (8 − 1) ÷ (3 − 3) = 7 ÷ 0, which is undefined because you cannot divide by zero. In this case, you say the slope is "undefined" rather than giving a number.
Using Slope in Real-World Contexts
Slope appears in many practical situations. If you are tracking elevation on a hiking trail, slope tells you how steep the climb is. If you are analyzing sales data over time, slope shows whether sales are increasing or decreasing and how fast. If you are building a ramp, slope determines whether it meets safety codes.
In all these cases, the calculation is the same: measure two points, find the vertical change, find the horizontal change, and divide. The units matter — if your vertical change is in feet and your horizontal change is in miles, your slope will be in feet per mile, which is a valid measurement.
Common Mistakes to Avoid
The most frequent error is reversing the subtraction. Remember: you must subtract the first point's value from the second point's value in both the numerator and denominator. If you subtract y₁ from y₂ in the top, you must subtract x₁ from x₂ in the bottom — not the other way around.
Another common mistake is forgetting to simplify fractions. If your slope is 10 ÷ 5, write it as 2, not as the unsimplified fraction. This makes it easier to interpret and compare slopes.
Do not confuse slope with the y-intercept (where the line crosses the y-axis). Slope and y-intercept are different properties of a line. Slope tells you the steepness; the y-intercept tells you where the line starts on the vertical axis.
Frequently Asked Questions
What does a slope of 1 mean?
A slope of 1 means the line rises 1 unit for every 1 unit it moves to the right. The line makes a 45-degree angle with the horizontal. A slope of 2 means it rises twice as fast, and a slope of 0.5 means it rises half as fast.
Can slope be a decimal?
Yes. If your calculation gives you 5 ÷ 2, you can express it as the fraction 5/2 or as the decimal 2.5. Both are correct. Fractions are exact, while decimals are sometimes rounded, so fractions are preferred in mathematics.
What if my two points have the same coordinates?
If both points are identical, you cannot calculate a meaningful slope because the denominator will be zero. You need two different points to define a line. Make sure you are reading your coordinates correctly.
Does the order of the points change the slope?
No. Whether you call (2, 3) point 1 and (5, 9) point 2, or vice versa, you get the same slope. The numerator and denominator both flip sign if you reverse the order, so the result stays the same.
How is slope different from angle?
Slope is the ratio of vertical change to horizontal change. Angle is measured in degrees. You can convert between them using trigonometry, but they are not the same thing. A slope of 1 equals a 45-degree angle, but a slope of 2 does not equal a 2-degree angle.