Slope (Gradient) of a Line: Rise Over Run Explained
What slope measures, how to calculate it from a graph or two points, what positive, negative, zero and undefined slopes look like, and why slope is the idea calculus is built on.
Some hills are gentle and some are steep. To compare them with a number, measure how far you climb for each step you take forwards. That ratio, rise over run, is the slope.
Drag the two points below and watch the slope triangle change.
Calculating slope from two points
Label one point and the other .
Subtract in the same order top and bottom. gives the right size but the wrong sign.
It does not matter which point you call the first. Swapping them flips the sign of both the rise and the run, and the slope stays the same.
What the number tells you
A positive slope climbs from left to right. A negative slope falls. The bigger the number (ignoring its sign), the steeper the line.
Steeper lines have bigger slopes; falling lines have negative slopes.
A horizontal line has slope : no rise at all. A vertical line has undefined slope, because its run is and you cannot divide by zero.
Slope is a rate
Slope means "change in per unit change in ". If is time in hours and is distance in km, the slope is a speed in km per hour. If is items and is cost, the slope is the price per item. Slope is a unit rate you can see.
A straight line has the same slope everywhere. A curve does not, and calculus is the study of how to measure the slope of a curve at a single point. That slope is called the derivative.
Parallel and perpendicular
Parallel lines rise at the same rate, so they have equal slopes. Perpendicular lines have slopes that multiply to : if one has slope , a line at right angles to it has slope .
Common questions
- Is slope the same as gradient?
Yes. "Slope" is more common in the US and "gradient" in the UK, but they mean the same: rise divided by run.
- What is the slope of a vertical line?
It is undefined. A vertical line has a run of , and division by zero has no answer.
The Slope lesson has worked examples and unlimited practice that adapts to you.