Slope Calculator Guide: Rise, Run, and Gradient Explained
A slope tells you how steep something is. A road sign warning of a steep hill, a roof pitch, a ramp for wheelchair access, and a line on a graph all describe the same idea: how much something rises or falls for a given horizontal distance. In mathematics, slope is defined precisely as rise divided by run, the vertical change divided by the horizontal change between two points.
The Slope Calculator computes slope from two points, and often gives the angle and the equation of the line as well. This guide explains what slope means, how to calculate it by hand, what different values tell you, and how to avoid the common errors that catch learners out.
The slope formula
Given two points, call them (x1, y1) and (x2, y2). The slope, usually written as m, is m equals (y2 minus y1) divided by (x2 minus x1). The top of the fraction is the vertical change, or rise, and the bottom is the horizontal change, or run. The order matters within each pair: subtract the first point's coordinates from the second point's coordinates consistently, and the result is the same whichever point you call first, as long as you are consistent.
A positive slope means the line rises as you move from left to right. A negative slope means it falls as you move from left to right. A slope of zero means the line is horizontal, with no rise at all. An undefined slope belongs to a vertical line, where the run is zero and division by zero is impossible. These four cases cover every straight line, and recognising them at a glance is a useful skill.
Slope also connects to angle. A slope of 1 corresponds to an angle of 45 degrees, because the rise equals the run. A slope of 2 is steeper, at about 63 degrees, while a slope of 0.5 is gentler, at about 27 degrees. You do not need to memorise these angles, but knowing that slope 1 means 45 degrees gives you a mental benchmark for judging steepness.
Reading slope in the real world
In everyday language, slope is often given as a percentage, called gradient. A road gradient of 10 percent means the road rises 10 metres for every 100 metres of horizontal distance, which is a slope of 0.1. Accessibility guidelines use similar ratios: a ramp with a slope of 1 in 12 rises 1 unit for every 12 units of run, which is a slope of about 0.083, or about 8.3 percent. The same mathematics describes all of these, just expressed differently.
On a graph, slope has a meaning tied to whatever is plotted. On a distance-time graph, the slope is speed: a steeper line means faster movement. On a cost graph, the slope might be the price per unit. This is why slope matters beyond geometry class. Whenever two quantities change together at a steady rate, the slope of the line joining them is that rate, and comparing slopes means comparing rates.
Worked example: slope between two points
Find the slope of the line through the points (3, 2) and (7, 10). First, compute the rise: y2 minus y1 equals 10 minus 2, which is 8. Next, compute the run: x2 minus x1 equals 7 minus 3, which is 4. Then divide: 8 divided by 4 equals 2. The slope is therefore 2.
Check the result by reversing the point order. Using (7, 10) as the first point and (3, 2) as the second: rise equals 2 minus 10, which is negative 8, and run equals 3 minus 7, which is negative 4. Dividing negative 8 by negative 4 gives 2 again, confirming the answer. The line rises 2 units for every 1 unit of run, so it is steep, and its angle is about 63 degrees.
As a further check, the equation of the line can be found from the slope and one point. Using y equals m times x plus b, with m equal to 2 and the point (3, 2): 2 equals 2 times 3 plus b, so 2 equals 6 plus b, giving b equals negative 4. The equation is y equals 2x minus 4. Testing the other point: 2 times 7 minus 4 equals 10, which matches, so the line is confirmed.
Common mistakes to avoid
The most common mistake is subtracting inconsistently, for example computing y2 minus y1 on top but x1 minus x2 on the bottom. That flips the sign of the answer. Always subtract in the same order on top and bottom. Another common mistake is swapping rise and run, dividing horizontal change by vertical change, which gives the reciprocal of the slope instead of the slope itself.
Students also sometimes describe a vertical line as having a slope of zero. It does not: a horizontal line has slope zero, while a vertical line has undefined slope, because its run is zero. Remembering "zero slope is flat, undefined slope is straight up" keeps the two cases apart.
Finally, watch out for scale. On a graph where the axes use different scales, a line can look steeper or gentler than its slope suggests. The slope is computed from the coordinate values, not from how the line looks on the page, so always calculate from the numbers.
Related tools and next steps
Slope connects naturally to coordinate geometry. The Midpoint Calculator finds the point halfway between two points on the same line, and the Area Calculator helps when a slope problem involves the area under or around a shape. For a related explainer on midpoints, see the guide on Midpoint Calculator.
Practise with a few pairs of points until the formula feels automatic: pick two points, compute rise and run, divide, and check by reversing the order. Then try describing slopes in the world around you, from a staircase to a hillside to a graph in a news article. Once you see slope as a rate — how much one thing changes when another changes by one unit — you will start noticing it everywhere.