How to Find Slope on a Graph
To find the slope on a graph, pick two points where the line crosses a corner of the grid, read their values off the axes, and divide the change in y by the change in x. That is rise divided by run. In the graph above the line goes from (1, 1) to (3, 5), so the rise is 4, the run is 2, and the slope is 2. Counting squares gives the same answer only when one square is worth the same amount on both axes. Reading the values off the axes always works.
The method, in three steps
Slope tells you how much the line climbs for each step you take to the right. The whole method is three steps, and the third one is just arithmetic.
- Pick two distinct points on the line where it passes exactly through a corner of the grid, so both coordinates are values you can read rather than estimate.
- Read each point off the axes. Go straight down to the horizontal axis for x, and straight across to the vertical axis for y.
- Divide the change in y by the change in x. Subtract the two y values, subtract the two x values in the same order, and divide.
slope = (y2 − y1) ÷ (x2 − x1)
Using the two points from the diagram, (1, 1) and (3, 5), the rise is 5 − 1 = 4 and the run is 3 − 1 = 2. So the slope is 4 ÷ 2 = 2. The line climbs 2 units of height for every 1 unit you move to the right.
Step 2 is the one that decides whether your answer is right, and it is easy to skip. The next section is about what happens when it is.
Counting squares against reading the axes
Most people are taught to count squares. Put a finger on one point, count across, count up, and divide. When one square is worth the same amount going up as it is going across, that works perfectly, and it is quick. The two scales cancel in the division, so a grid of five-unit squares gives the right slope just as a grid of one-unit squares does.
The trouble is that it is a habit rather than a method, and it breaks the moment the grid is scaled. Sally Jordan, who researches assessment at the Open University, recorded exactly this in student work. Faced with a graph whose rise was 160 km, students gave the rise as 16, because sixteen was the number of squares. Their answer came out as 0.57 where the correct slope was 5.7 km/s. A factor of ten, from a method that felt reliable.
The same study noted a second version of the mistake: measuring the rise and the run with a ruler, in centimetres, instead of reading the axes. Jordan’s own suggestion for where the habit comes from is the analogy teachers reach for, comparing the slope of a graph to the gradient of a road, where real physical lengths genuinely are what you measure.
Both diagrams on this page show an identical line in an identical position. Only the axis labels differ, and the slope differs by a factor of ten. Nothing about the picture warns you. The labels are the only thing that tells you which answer is right.
A quick habit that costs nothing. Before you count anything, look at two neighbouring numbers on each axis and work out what one square is worth going up, and what it is worth going across. If the two match, count squares freely. If they differ, read the values instead.
The full version, if you want it: the slope is the squares up multiplied by the y units per square, divided by the squares across multiplied by the x units per square. When the two unit values are equal they cancel, which is why plain counting works in that case and only in that case.
Which two points to pick
On any line that is not vertical, any two points with different x values give the same slope, which is what makes a line a line. Two copies of the same point give 0 divided by 0, which settles nothing, and two points stacked vertically give a run of 0, which is the undefined case rather than a shared slope. That is a real freedom, and it is also where a common frustration starts.
The frustration sounds like this: the same line keeps producing different slopes. Someone reads one pair of points and gets 5, reads another pair and gets 5.33, and concludes that they have misunderstood something fundamental. Usually they have not. They have picked a point that sits between gridlines and estimated its coordinates, and a small misreading of a coordinate turns into a visible change in the answer.
So the rule is not about which points are allowed, it is about which points you can actually read:
- Choose points where the line crosses a corner of the grid. Both coordinates can then be read exactly off the axes rather than judged by eye. They will not always be whole numbers, since gridlines can stand for halves or tens, but they will be values the graph actually states.
- Spread them out. Two points far apart are more forgiving of a slightly thick pencil line than two points side by side.
- Do not use a point unless the line passes through it. A point near the line is not on the line, and it will not give the line’s slope.
If a line genuinely never passes through a corner of the grid, you are being asked to estimate, and your answer will be an estimate. That is a normal situation on a graph of measured data, and the honest response is to say roughly what the slope is rather than to report a decimal you cannot support.
Getting the minus sign right
A falling line has a negative slope, and it is worth being precise about what “falling” means, because a popular shortcut for it is wrong.
To see the sign, look from left to right. This is not a reading habit borrowed from language. On the standard coordinate plane x increases to the right, so moving rightward is what “as x increases” means. If y goes up as you move right, the slope is positive. If it goes down, the slope is negative. This is a way of predicting the sign before you calculate, not a rule about which point to start the arithmetic from.
The minus sign is not about walking backwards, and it does not come from the direction you happen to count in. It comes from subtraction. If the second y value is smaller than the first, the rise is a negative number, and a negative divided by a positive is negative.
You can prove to yourself that the counting direction does not matter, and it is worth doing once. Take (1, 5) and (3, 1). Going one way, the rise is 1 − 5 = −4 and the run is 3 − 1 = 2, giving −4 ÷ 2 = −2. Going the other way, the rise is 5 − 1 = 4 and the run is 1 − 3 = −2, giving 4 ÷ −2 = −2. Same answer.
What matters is consistency. Whichever point you call the first one, use it first for both subtractions. Mixing the order in one and not the other is what turns a correct slope into its own negative, and it is easy to do once the arithmetic starts.
When the two axes use different scales
Graphs are frequently drawn with one unit on the x axis taking a different amount of space from one unit on the y axis. If the x values run 1, 2, 3 while the y values run 100, 200, 300, drawing both at the same scale would need a very tall sheet of paper.
Students notice this and ask a good question about it, which comes up on mathematics forums in almost these words: are we not distorting the graph, and are we not therefore drawing the wrong picture? The answers given usually address whether it is legitimate to draw that way. They rarely address the part that matters when you are reading a slope back off the page.
Here is that part. Changing the display scale does not change the slope you calculate from the axis values, and it does change the angle drawn on the page. Those two facts sit together and only one of them is about the mathematics.
- The slope is safe. It is computed from the values on the axes, and stretching the paper does not change what those values are.
- The apparent steepness is not. The same relationship can be drawn to look gentle or dramatic by choosing the scale, which is why a chart can mislead without containing a single wrong number.
- So never judge a slope by eye across two different graphs. Comparing how steep two lines look is only meaningful when both graphs use the same scales.
This is the same lesson as the counting-squares problem, arriving from a different direction. The picture is a way of displaying the numbers. When the picture and the axes disagree, the axes are right.
What the slope actually measures
On a bare grid with x and y and nothing else, a slope of 2 is simply the number 2. But a graph in a science lesson, a lab report or a news article has labelled axes, and then the slope carries units. Those units are often the reason the graph was drawn at all.
The units follow the division. Slope is y divided by x, so the units are the y units per one x unit.
| Vertical axis | Horizontal axis | The slope is |
|---|---|---|
| Distance (m) | Time (s) | Speed, in m/s |
| Speed (m/s) | Time (s) | Acceleration, in m/s² |
| Cost ($) | Items bought | Price per item, in $ per item |
| Height (cm) | Age (years) | Growth rate, in cm per year |
This question is asked repeatedly in physics help forums by students who have worked out a slope correctly and then been told to state its units. The answer they are given is the one above: on a force against mass graph the slope comes out in newtons per kilogram, which reduces to metres per second squared, which is an acceleration. The slope is not a decoration on the graph. It is the quantity the experiment was measuring.
Once you can see the graph this way, “find the slope” stops being an exercise and starts being a reading. A steeper distance against time line is something moving faster. If you want to work from a list of values instead of a picture, the method is the same two subtractions, and it is set out on how to find slope from a table. To draw the line first and read it afterwards, start with the slope graph page.
Frequently asked questions
Do you find slope on a graph by counting squares?
Only when one square is worth the same amount on both axes. It does not have to be one unit. If every square is five units in both directions, the two fives cancel in the division and counting squares gives the correct slope.
It fails when the two scales differ. If a square is 10 units up but 1 unit across, counting gives an answer ten times too small. Research at the Open University recorded students reporting a rise of 16 when the graph showed a rise of 160 km, producing 0.57 instead of 5.7 km/s. Check what one square is worth on each axis before you count, and read the axis values whenever the two do not match.
Which two points should I choose on the line?
Any two points with different x values, as far as the mathematics is concerned. In practice, choose two where the line passes exactly through a crossing of the gridlines, so you can read the coordinates off the axes instead of estimating them.
Spreading them apart helps as well. Two points close together leave less room for a small misreading, since the same error is being divided by a smaller run.
Why do I get a different slope from the same line?
A straight line has one slope, so two different answers mean one of the readings is off. The usual cause is a point that was estimated rather than read: a coordinate guessed as 3.25 when the line actually passes through 3.2 will shift the result noticeably.
The other cause is a point that is not on the line at all, only near it. Redo the calculation with two points that sit on grid corners, and the disagreement normally disappears.
How do I know whether the slope is negative?
Follow the line from left to right. If it goes downhill, the slope is negative. If it goes uphill, the slope is positive.
Left to right is the direction to look because x increases to the right, so it is the direction in which the question “what happens to y as x grows” is being asked. That is a way of seeing the sign, not a rule for the arithmetic. You may start the calculation from either point: reversing them flips the sign of both the rise and the run, and the two flips cancel. The sign goes wrong only if you reverse the order for one subtraction and not the other.
Does it matter which point I use first?
No, as long as you keep the same order in both subtractions. With (1, 5) and (3, 1), taking them one way gives −4 ÷ 2 = −2, and the other way gives 4 ÷ −2 = −2.
What does change the answer is subtracting the y values in one order and the x values in the other. That produces the correct number with the wrong sign.
Do both axes have to use the same scale?
No, and they often do not, particularly when the two quantities have very different sizes. Drawing x in ones and y in hundreds is normal practice, not an error.
It does mean the angle you see is a product of the scale you chose. The computed slope is unaffected, because it comes from the values on the axes. Judging steepness by eye across two graphs is only fair when both use the same scales.
Does a slope have units?
On a plain x and y grid, no. The slope is a number.
On a graph with labelled axes, yes, and the units are the vertical units divided by the horizontal units. Distance in metres against time in seconds gives a slope in metres per second, which is a speed. Force against mass gives newtons per kilogram, which simplifies to metres per second squared, an acceleration. The units are how you tell what the slope has measured.
How do I find the slope of a horizontal or vertical line on a graph?
A horizontal line has a slope of zero. Every point sits at the same height, so the rise between any two of them is 0, and 0 divided by the run is 0.
A vertical line has an undefined slope. Every point sits at the same x value, so the run is 0, and dividing by zero does not produce a number. These are the two cases where the picture tells you the answer immediately and no arithmetic is needed.