In depth · 18 min read
Slope: what it means and how to find it
What slope really measures, how to find it from two points, an equation or a graph, why vertical lines have undefined slope, and how slope shows up as a rate, an angle and a percent grade.
Slope is a rate
Here is the one sentence to hold on to: slope tells you how much \(y\) changes when \(x\) goes up by \(1\).
A line with slope \(4\) climbs \(4\) units for every unit you move to the right. A line with slope \(-\frac{1}{3}\) drops a third of a unit for every unit to the right. Every formula on this page is just a way of measuring that one number.
That is also why slope matters outside a math class. Whenever one quantity changes at a steady pace compared to another (miles per hour, dollars per month, feet of climb per mile of road) you are looking at a slope.
Rise over run
To measure the slope between two points on a line, walk from the first point to the second. The vertical part of the walk is the rise; the horizontal part is the run.
The letter \(m\) for slope is a tradition in American textbooks; nobody is quite sure where it came from. The symbol \(\Delta\) (capital delta) means "change in", so \(\Delta y\) is read "change in \(y\)".
Why does it not matter which two points of the line you pick? Any two points on a line form a right triangle with the line as the slanted side, and all of those triangles are similar: double the run and the rise doubles too. The ratio never changes, so slope belongs to the line itself, not to the points you happened to choose.
Four kinds of slope
Reading a graph from left to right, like a sentence:
- positive slope: the line goes uphill;
- negative slope: the line goes downhill;
- zero slope: the line is flat (horizontal), \(y = k\);
- undefined slope: the line is vertical, \(x = k\).
How steep the line is depends on the absolute value \(|m|\), not on the sign. A line with slope \(-5\) is steeper than a line with slope \(2\), because \(|-5| = 5 > 2\). Slope \(1\) is a handy benchmark: it is the line \(y = x\), tilted at exactly \(45°\). Anything with \(|m| > 1\) is steeper than that; anything with \(|m| < 1\) is flatter.
Why vertical lines have undefined slope
Take \((4, 1)\) and \((4, 6)\). The line through them is vertical, and the formula gives
Division by zero has no answer, so the slope is undefined. In words: slope asks "how much does \(y\) change per step to the right?", and on a vertical line you cannot take a single step to the right.
Reading slope from an equation
Slope-intercept form
In \(y = mx + b\) the slope is the coefficient of \(x\), as long as \(y\) is by itself on the left. In \(y = -2x + 7\) the slope is \(-2\); in \(y = \frac{x}{5} + 1\) it is \(\frac{1}{5}\); in \(y = 9\) it is \(0\).
Standard form
For a line in standard form \(Ax + By = C\) with \(B \neq 0\), you can skip the algebra:
If \(B = 0\), the equation is \(Ax = C\), a vertical line, and the formula breaks down exactly when it should.
Reading slope from a graph
On graph paper:
- pick two points where the line crosses the grid exactly at a corner;
- count the run from the left point to the right point;
- count the rise on the same trip (up is positive, down is negative);
- divide rise by run.
It works in reverse too. To draw a line with slope \(\frac{3}{4}\) through a point, start at the point, go \(4\) right and \(3\) up, and mark a second point. For slope \(-\frac{3}{4}\), go \(4\) right and \(3\) down. A whole number like \(2\) is just \(\frac{2}{1}\): \(1\) right, \(2\) up.
Slope as a rate of change
When \(x\) and \(y\) are real quantities with units, the slope gets units too: units of \(y\) per unit of \(x\). That is why it is so often called the rate of change.
| What \(y\) measures | What \(x\) measures | The slope is |
|---|---|---|
| distance in miles | time in hours | speed, in miles per hour |
| cost in dollars | miles driven | price per mile |
| water in gallons | time in minutes | flow rate, in gallons per minute |
| height in feet | horizontal distance in feet | the grade of a road or ramp |
Rate of change is also the doorway to calculus. The derivative of a function at a point is the slope of the tangent line there: a rate of change at a single instant instead of over an interval.
Slope as a percent: roads, ramps and roofs
Builders and engineers describe slope in their own ways, but it is always rise over run.
Road grade is slope written as a percent. A \(6\%\) grade means \(m = 0.06\): the road climbs \(6\) feet for every \(100\) feet of horizontal distance.
Wheelchair ramps in the United States follow the ADA standards, which limit a ramp to a slope of \(1\) in \(12\), about \(8.3\%\). To climb a porch \(30\) inches high, the ramp needs a run of at least \(30 \cdot 12 = 360\) inches, which is \(30\) feet. Slope decides how much space you need.
Roof pitch is given as rise per \(12\) inches of run. A "\(6\) in \(12\)" roof rises \(6\) inches for every \(12\) inches across, so its slope is \(\frac{6}{12} = \frac{1}{2}\).
Slope and angle
The slope of a line is also connected to the angle \(\theta\) that the line makes with the positive \(x\)-axis. In the rise-run triangle, rise is the side opposite \(\theta\) and run is the side adjacent to it, and opposite over adjacent is the tangent.
| \(\theta\) | \(0°\) | \(30°\) | \(45°\) | \(60°\) | \(120°\) | \(135°\) |
|---|---|---|---|---|---|---|
| \(m = \tan\theta\) | \(0\) | \(\frac{\sqrt{3}}{3}\) | \(1\) | \(\sqrt{3}\) | \(-\sqrt{3}\) | \(-1\) |
This also explains vertical lines once more: they sit at \(90°\), and \(\tan 90°\) is undefined.
Parallel and perpendicular lines
Slope lets you compare two lines without drawing them.
Perpendicular slopes are negative reciprocals: flip the fraction and change the sign. Perpendicular to slope \(\frac{5}{2}\) is \(-\frac{2}{5}\); perpendicular to slope \(-4\) is \(\frac{1}{4}\). The one exception is the pair horizontal and vertical: they are perpendicular, but the vertical one has no slope to multiply.
Are three points on one line?
Three points are collinear when the slope from the first to the second equals the slope from the second to the third.
Common mistakes
Frequently asked questions
Can slope be a fraction or a decimal?
Yes. Fractions are usually more useful, because \(\frac{2}{3}\) reads directly as "right \(3\), up \(2\)", while \(0.666\ldots\) does not.
Is slope the same as steepness?
Almost. Steepness is the size of the slope, \(|m|\). The sign adds the direction: uphill or downhill.
Does slope depend on the units?
The number does. If the same road is graphed with \(x\) in miles and \(y\) in feet, the slope comes out \(5{,}280\) times bigger than with both in feet. In real problems, always write the units of the slope, like "\(2.5\) dollars per mile".
How do I get the equation of a line once I know the slope?
You need one point \((x_1, y_1)\) on the line; then \(y - y_1 = m(x - x_1)\). The full method is in the lesson on slope and equations of lines.
Practice problems
Quick check
Which line has an undefined slope?
\(x = 4\) is a vertical line: the run between any two of its points is \(0\).
Quick check
A line drops \(3\) units for every \(5\) units it moves to the right. What is its slope?
Rise over run: the rise is \(-3\) (a drop) and the run is \(5\).
Spotted a mistake or a step that isn't clear? Let me know