Slope on a graph measures how steep a line is. It tells you how much the line rises or falls for every unit it moves horizontally, expressed as the ratio of vertical change to horizontal change between any two points. If a line climbs 3 units upward for every 2 units it moves to the right, its slope is 3/2.
Rise Over Run
The simplest way to think about slope is “rise over run.” The rise is how far the line moves up or down (the vertical change), and the run is how far it moves left or right (the horizontal change). Pick any two points on a straight line, count how many units you move vertically between them, then count how many units you move horizontally. Divide the first number by the second, and you have the slope.
A slope of 1/2, for example, means that for every 2 units you travel to the right along the line, the line rises 1 unit upward. A slope of 3 means the line climbs 3 units for every 1 unit to the right. The larger the number, the steeper the line.
The Slope Formula
When you have the coordinates of two points on a line, you can calculate the slope with a formula instead of counting on a graph. If your two points are (x₁, y₁) and (x₂, y₂), the slope is:
m = (y₂ – y₁) / (x₂ – x₁)
The letter “m” is the standard variable used for slope. All the formula does is subtract the y-values to get the rise and subtract the x-values to get the run, then divide. It doesn’t matter which point you label as “point 1” and which as “point 2,” as long as you’re consistent. If you flip the order of both subtractions, the negatives cancel out and you get the same answer.
Say you have the points (1, 2) and (5, 10). The rise is 10 – 2 = 8. The run is 5 – 1 = 4. So the slope is 8/4 = 2. That means the line goes up 2 units for every 1 unit it moves to the right.
Four Types of Slope
Every straight line on a graph falls into one of four categories based on its slope:
- Positive slope: The line goes up from left to right. The steeper the climb, the larger the positive number.
- Negative slope: The line goes down from left to right. A slope of -3 drops faster than a slope of -1.
- Zero slope: The line is perfectly horizontal. It doesn’t rise or fall at all, so the rise is 0, making the slope 0.
- Undefined slope: The line is perfectly vertical. The run is 0, and dividing by zero is impossible, so vertical lines have no defined slope.
A quick visual check: if the line tilts uphill as your eyes move from left to right, the slope is positive. If it tilts downhill, the slope is negative.
Slope in y = mx + b
The most common way to write the equation of a line is slope-intercept form: y = mx + b. In this equation, m is the slope and b is the y-intercept (the point where the line crosses the vertical axis). This format makes it easy to identify the slope at a glance without doing any calculation.
The reason m gives you the slope is straightforward. Every time x increases by 1, the value of y increases by m. If the equation is y = 4x + 1, each 1-unit step to the right raises y by 4, giving a slope of 4. If the equation is y = -2x + 5, each 1-unit step to the right drops y by 2, giving a slope of -2.
Slope as a Rate of Change
Outside of pure math class, slope shows up whenever you’re tracking how one quantity changes relative to another. If you graph distance on the y-axis and time on the x-axis, the slope of the line is your speed. A slope of 60 on that graph means you’re covering 60 miles per hour. If you graph the cost of apples on the y-axis and pounds of apples on the x-axis, the slope is the price per pound.
This is why slope is often described as a “rate of change.” It answers the question: for every one unit of change in the thing on the horizontal axis, how much does the thing on the vertical axis change? The units depend entirely on what the graph represents. On a temperature-over-time graph, the slope might be degrees per minute. On a savings-over-months graph, it could be dollars per month.
Slope on a Curved Graph
On a straight line, the slope is the same everywhere. Pick any two points and you’ll calculate the same number. Curves are different. The steepness of a curve changes from point to point, so it doesn’t have a single slope.
To find the slope at a specific point on a curve, you use the tangent line: an imaginary straight line that just barely touches the curve at that one point and matches the curve’s direction there. The slope of that tangent line is the slope of the curve at that point. In calculus, this value is called the derivative. For most graph-reading purposes, though, the key idea is simple: on a curve, slope is a local measurement that varies depending on where you look.
Parallel and Perpendicular Lines
Slope also tells you how lines relate to each other geometrically. Two lines are parallel (they never cross) if and only if they have the same slope but different y-intercepts. A line with a slope of 3 is parallel to every other line with a slope of 3, regardless of where it sits on the graph.
Two lines are perpendicular (they cross at a 90-degree angle) when their slopes are negative reciprocals of each other. That means you flip the fraction and change the sign. If one line has a slope of 4, a line perpendicular to it has a slope of -1/4. You can verify this by multiplying the two slopes together: perpendicular slopes always multiply to -1. The one exception is when a vertical line meets a horizontal line. The vertical line’s slope is undefined and the horizontal line’s slope is 0, but they still form a right angle.
Slope and Angles
There’s a direct link between a line’s slope and the angle it makes with the horizontal axis. The slope equals the tangent (the trigonometry function) of that angle. A line tilted at 45 degrees has a slope of 1, because tan(45°) = 1. A line at 60 degrees has a slope of about 1.73. As the angle approaches 90 degrees (a vertical line), the tangent value shoots toward infinity, which is why a vertical line’s slope is undefined. If you ever know the angle of a ramp, roof pitch, or incline, you can convert it to slope with this relationship.

