Skip to content
SPM Tuition
Coordinates, graphs and gradients

How to calculate a straight-line gradient

Your gradient has the right size but the wrong sign, or the subtraction is mixed up.

The gradient of a straight line measures its steepness. It equals the change in y divided by the change in x between any two points on the line.

How do you calculate it?

Pick two points (x1, y1) and (x2, y2). The gradient is (y2 − y1) ÷ (x2 − x1).

Use the points in the same order on top and bottom. It does not matter which point you call first, only that you keep the order.

Worked example

A line passes through P(2, 5) and Q(6, 13). This is a worked example.

Change in y: 13 − 5 = 8. Change in x: 6 − 2 = 4. Gradient = 8 ÷ 4 = 2.

The direction check agrees. Going from P to Q, x rises and y rises, so the line goes uphill and the gradient is positive.

Now a downhill line through R(−1, 7) and S(3, −1). Change in y: −1 − 7 = −8. Change in x: 3 − (−1) = 4. Gradient = −8 ÷ 4 = −2.

As x increases from −1 to 3, y drops from 7 to −1, so the line goes downhill and a negative gradient is correct.

What does the common mistake look like?

A student calculates the gradient through P and Q as (5 − 13) ÷ (6 − 2) = −8 ÷ 4 = −2. The top used P first and the bottom used Q first, so the order was mixed. The uphill line was given a downhill gradient.

The direction check catches it in seconds: the line rises from left to right, so a negative answer cannot be right. The fix is to write the points as (x1, y1) and (x2, y2) first, then fill both the top and bottom from the same labels.

Steps to follow

  1. Label your two points as (x1, y1) and (x2, y2).
  2. Work out y2 − y1 for the top and x2 − x1 for the bottom, in that order.
  3. Divide, then check the sign: uphill is positive and downhill is negative.

Self-check

Find the gradient of the line through T(−2, 1) and U(4, 10), and say whether it slopes uphill or downhill.

Answer

Change in y: 10 − 1 = 9. Change in x: 4 − (−2) = 6.

Gradient = 9 ÷ 6 = 1.5. As x increases from −2 to 4, y increases from 1 to 10, so the line slopes uphill, and a positive gradient is correct. Note that subtracting −2 becomes adding 2.

Where to go next

Once you can find a gradient, learn to say what it means with reading an intercept in context. Signs matter here, so revisit adding and subtracting negative numbers if they slip. The motion-graph explorer shows gradients as speed, and the hub lists the other skills.

Common questions

What does the gradient of a line tell me?

It tells you how steep the line is and in which direction. A gradient of 2 means y rises by 2 for every 1 step in x. A negative gradient means y falls as x increases.

Does it matter which point I use first?

Only that you stay consistent. Take y2 − y1 and x2 − x1 from the same two points in the same order. Mixing the order gives the right size with the wrong sign.

How is the gradient used in Physics?

On a distance-time graph the gradient is speed, and on a velocity-time graph it is acceleration. Reading the gradient with its unit, for example m/s, is a skill that Physics questions test directly.

Students usually stumble on which point goes first. A teacher can catch that habit in your own graph questions and link it to Physics, where gradient means speed or acceleration.

  • Online one-to-one lessons for your child with an experienced teacher.
  • Your first class is a one-hour trial, from RM50. The fee is agreed before you book.
  • Happy with the teacher? Continue with lessons of about 1.5 hours. If not, ask for another teacher.