How to Find Slope From a Table
To find the slope from a table, pick two rows, subtract the two y values, subtract the two x values in the same order, and divide. In the table above, going from the first row to the second, y goes up by 6 and x goes up by 2, so the slope is 6 ÷ 2 = 3. Before you trust that answer, check the other pairs of rows give the same one. If they do not, the table is not a straight line and it has no single slope.
The method, in three steps
A table is just a list of points. The first column gives the x values and the second gives the y values, so the first row of the table above is the point (1, 5) and the second is (3, 11).
- Take any two rows that hold different points. In particular their x values must differ.
- Subtract the y values, then subtract the x values in the same order. Second row minus first row, for both.
- Divide the y answer by the x answer.
slope = (y2 − y1) ÷ (x2 − x1)
Using rows one and two: the y values give 11 − 5 = 6, and the x values give 3 − 1 = 2. So the slope is 6 ÷ 2 = 3.
Keeping the order the same in both subtractions is the part to be careful with. If you do second minus first for y, do second minus first for x as well. Swapping one and not the other gives you the right number with a minus sign in front of it.
First check that the table is a straight line
This is an easy step to skip, and it is the one that explains why practice questions come back marked wrong.
A table of numbers is not automatically a straight line. If it is not, the formula still works between any two rows, and what it gives you is the average rate of change over that stretch. What the table does not have is one constant slope describing the whole relationship.
The check takes a few seconds. Work out the slope between rows one and two, then between rows two and three, then rows three and four. If you get the same answer every time, the table is a straight line and that answer is its slope. If the answers differ, it is not.
| Table A | Slope between rows | Table B | Slope between rows |
|---|---|---|---|
| (1, 5) | – | (1, 2) | – |
| (3, 11) | 6 ÷ 2 = 3 | (2, 4) | 2 ÷ 1 = 2 |
| (5, 17) | 6 ÷ 2 = 3 | (3, 8) | 4 ÷ 1 = 4 |
| (7, 23) | 6 ÷ 2 = 3 | (4, 16) | 8 ÷ 1 = 8 |
Table B is doubling, and its points do not sit on one straight line. Each of its three numbers is still a real average rate of change over its own interval. What it does not have is a single slope, so if a question asks for one, the honest answer is that the relationship is not linear.
Why this explains the marked-wrong answers. On a straight-line table, any two rows you choose give the same slope, so there is no wrong pick. If your answer keeps coming out wrong when you choose rows at random, common causes include subtracting in mismatched order, dividing the x change by the y change instead of the other way round, copying a value across wrongly, and the table not being linear in the first place, in which case no single choice was ever going to be right.
One worked example with a negative and a fraction
Slopes are not always tidy whole numbers going upward, so here is the same method on a table that falls, and whose slope is a fraction.
| x | y |
|---|---|
| 1 | 7 |
| 4 | 5 |
| 7 | 3 |
- Change in y: 5 − 7 = −2
- Change in x: 4 − 1 = 3
- Slope: −2 ÷ 3 = −2/3
- Check the next pair: (3 − 5) ÷ (7 − 4) = −2 ÷ 3 = −2/3, the same, so the table is linear
The minus sign came from the subtraction, not from anything extra you have to remember. And a slope of −2/3 is a perfectly ordinary answer: it means y drops by 2 every time x rises by 3.
When the x values jump unevenly
Tables are often built so that x steps up by the same amount each row, 1, 2, 3, 4 or 0, 5, 10, 15. That is a convenience, not a requirement, and it causes a common misunderstanding worth clearing up.
Unevenly spaced x values do not mean the table is not a straight line. This misunderstanding also turns up in tutoring answers online, where an uneven gap in the x column gets treated as proof that the relationship is not linear.
Look at this table: x runs 1, 2, 5, 9 and y runs 5, 8, 17, 29. The x gaps are 1, 3 and 4, all different. But the slopes are 3 ÷ 1 = 3, then 9 ÷ 3 = 3, then 12 ÷ 4 = 3. Every pair gives 3, so it is a perfectly straight line with a slope of 3.
The test is whether the ratio stays the same, not whether the x steps do. Even spacing is helpful only because it lets you compare the y column by eye: if x goes up by the same amount each time, you can look at the y column alone and see whether it is climbing steadily.
The pattern behind the shortcut. When x climbs by the same step every row and y does too, the relationship has to be a straight line, and the slope is simply the y step divided by the x step. That is what makes the evenly spaced table so quick to read: in the table at the top of this page, x steps by 2 and y steps by 6, and 6 ÷ 2 = 3 without touching the formula.
Which two rows to pick
Once you know the table is a straight line that is not vertical, the answer is genuinely relaxing: any two rows with different x values will do, and they all give the same slope. That is what being a straight line means. The x values have to differ because a table whose x column never changes is a vertical line, and that has no slope to share out.
Two small pieces of advice, neither of them a rule:
- Pick rows whose numbers are easy to subtract. Two whole numbers beat two decimals, and rows next to each other are usually the simplest.
- Do not use the same point twice. Subtracting a point from itself gives 0 ÷ 0, which is undefined and tells you nothing about the slope. If a table happens to print the same point on two rows, those two rows count as one for this purpose.
If you want to double check an answer, work it out again with a different pair of rows. On a straight-line table you will get the same number, and on a table that is not a line you will not, which tells you something useful either way.
A shortcut that does not work
One suggestion comes up again and again in comment threads on this topic: divide the y intercept by the x intercept and you have the slope. It sounds plausible, and it is wrong, but it is wrong in an interesting and consistent way that is worth knowing.
Take y = 3x − 6. The y intercept is −6. The x intercept is 2. Dividing gives −6 ÷ 2 = −3, while the actual slope is 3.
It does not fail at random. It gives the slope with the sign flipped, every time. For a line written as y = mx + b, the y intercept is b and the x intercept is −b ÷ m, so dividing one by the other cancels the b and leaves −m. This holds for any sloping line that does not pass through the origin. A horizontal line leaves you without a single x intercept to divide by, and a line through the origin has both intercepts at 0, so the division means nothing in those two cases.
So if you have already done it, you do not need to start again. Flip the sign and you have the slope. It is still simpler to take two rows and subtract, and that method does not need the table to contain either intercept.
If any of this felt like it started a step too late, what is slope sets out what the number itself is measuring before any table or formula appears.
Frequently asked questions
How do you find the slope from a table in one sentence?
Take two rows, subtract the y values, subtract the x values in the same order, and divide the first answer by the second.
With the rows (1, 5) and (3, 11), that is 11 − 5 = 6 for the y values, 3 − 1 = 2 for the x values, and 6 ÷ 2 = 3.
Which two rows should I choose?
If the table is a straight line and its x values are not all the same, any two rows with different x values give the same slope, so pick whichever two have the friendliest numbers.
If picking at random keeps getting marked wrong, check two things. First, that you subtracted in the same order for x as for y. Second, that the table really is a straight line, because if it is not there is no single slope to find.
How do I know if a table is linear?
Work out the slope between each pair of neighbouring rows. If every pair gives the same answer, the table is linear and that answer is the slope.
If the answers differ, the points do not sit on one straight line, so the table has no single constant slope. A table going 2, 4, 8, 16 while x goes 1, 2, 3, 4 is doubling rather than climbing steadily. Each pair of rows still has its own average rate of change, but no one number describes the whole table.
Do the x values have to go up by the same amount?
No. A table with x values of 1, 2, 5 and 9 can be a perfectly straight line. Uneven gaps in the x column are not evidence that the relationship is not linear.
What matters is that the ratio of the y change to the x change is the same for every pair. Evenly spaced x values simply make that easier to spot, because then you can watch the y column on its own.
Can I divide the y intercept by the x intercept to get the slope?
No, but it fails in a predictable way. Dividing the y intercept by the x intercept gives the slope with the sign flipped.
For y = mx + b the y intercept is b and the x intercept is −b ÷ m, so the division cancels b and leaves −m. On y = 3x − 6 it gives −3 when the slope is 3. It breaks down entirely for a horizontal line, which gives you no single x intercept to divide by, and for a line through the origin, where both intercepts are 0. Subtracting two rows is quicker anyway, and works whether or not the intercepts appear in the table.
What does it mean if the slope comes out as zero?
It means the y column never changes. Every row has the same y value, so the top of the fraction is 0 and the slope is 0. That is a horizontal line, and zero is a real answer.
That case has its own page, zero slope, which covers where it turns up and how it differs from the opposite case: a table where the x column never changes, where the bottom of the fraction is 0 and the slope is undefined rather than zero.
How do I get the whole equation from the table, not just the slope?
Find the slope first, then find b by putting one row back into y = mx + b.
With a slope of 3 and the row (1, 5): 5 = 3 × 1 + b, so b = 2 and the equation is y = 3x + 2. Any row from the table gives the same b, which is another way to check your slope was right.