Crayonbird
Menu

Maths

What is slope in maths, and how do you find it?

Quick answer

Slope (called gradient in the UK) measures how steep a line is. It is the rise divided by the run, m = (y₂ − y₁) ÷ (x₂ − x₁), and it can be positive, negative, zero or undefined.

Ages 12–16Secondary

In one sentence

Slope tells you how steep a line is: how far it goes up (or down) for every step it goes across.

Explained

Imagine riding a bike up a hill. A gentle hill rises a little for every metre you ride forward. A steep hill rises a lot. Slope puts a number on that steepness. In the United States it is called slope and written with the letter m; in the UK and Australia it is usually called the gradient.

  • mountain
  • bike
  • ruler
A steep hill has a big slope; a flat road has a slope of zero.

The rule is rise over run. The rise is the change in height (the change in y). The run is the change across (the change in x). Divide one by the other:

m = rise ÷ run = (y₂ − y₁) ÷ (x₂ − x₁)

You only need two points on a straight line to find its slope, and it does not matter which two you pick: a straight line is equally steep everywhere. That is exactly what makes it straight.

There are four kinds of slope:

  • Positive slope: the line goes up from left to right, like walking uphill.
  • Negative slope: the line goes down from left to right, like walking downhill.
  • Zero slope: the line is flat (horizontal). There is no rise at all.
  • Undefined slope: the line is vertical. The run is zero, and you cannot divide by zero.

Slope is also a rate of change. If a graph shows distance against time, the slope is the speed. If it shows cost against the number of tickets, the slope is the price of one ticket. That is why slope matters far beyond the maths lesson: it describes how fast one thing changes when another changes. It connects to coordinates, to line graphs and to writing the equation of a line.

Examples

Points Rise (change in y) Run (change in x) Slope
(0, 0) and (2, 6) 6 − 0 = 6 2 − 0 = 2 3
(1, 5) and (4, −1) −1 − 5 = −6 4 − 1 = 3 −2
(−2, 3) and (6, 3) 3 − 3 = 0 8 0 (horizontal)
(4, 1) and (4, 9) 8 0 undefined (vertical)
(−3, −4) and (1, −2) 2 4 1/2

Worked example: a taxi charges a fixed fee plus a price per mile. A 2-mile ride costs $9 and a 6-mile ride costs $17. The slope is (17 − 9) ÷ (6 − 2) = 8 ÷ 4 = 2, so each mile costs $2.

Common mistakes

  • Putting run over rise. Fix: say "rise over run" out loud, y on top, x underneath.
  • Mixing up the order of the points. If you start with y₂ on top, you must start with x₂ underneath. (8 − 2) ÷ (3 − 1) is right; (8 − 2) ÷ (1 − 3) gives the wrong sign.
  • Losing a minus sign. Subtracting a negative is adding: 3 − (−5) = 8. Write the brackets in.
  • Thinking a vertical line has slope 0. Fix: horizontal is zero (no rise); vertical is undefined (no run).

Step by step

Step by step

  1. Pick two pointsChoose two points on the line, ideally where it crosses the grid exactly, and label them (x₁, y₁) and (x₂, y₂).
  2. Find the riseSubtract the y-values: y₂ − y₁.
  3. Find the runSubtract the x-values in the same order: x₂ − x₁.
  4. DivideSlope m = rise ÷ run. Simplify the fraction if you can.
  5. Check the signDoes the line go up from left to right? Then the slope should be positive. Downhill means negative.

From an equation: if the equation is in slope-intercept form, y = mx + b, the slope is the number in front of x and b is where the line crosses the y-axis. If it is not, rearrange it first. For 2x + 3y = 12, subtract 2x and divide by 3 to get y = −⅔x + 4, so the slope is −⅔.

Practice questions

Find the slope

Try each one, then check your answer.

  1. Find the slope through (2, 3) and (4, 11).
    Show answer
    (11 − 3) ÷ (4 − 2) = 8 ÷ 2 = 4
  2. Find the slope through (0, 5) and (5, 0).
    Show answer
    (0 − 5) ÷ (5 − 0) = −5 ÷ 5 = −1
  3. Find the slope through (−1, 2) and (3, 4).
    Show answer
    (4 − 2) ÷ (3 − (−1)) = 2 ÷ 4 = 1/2
  4. Find the slope through (3, −2) and (3, 7).
    Show answer
    The run is 3 − 3 = 0, so the slope is undefined (a vertical line).
  5. Find the slope through (−4, 6) and (2, 6).
    Show answer
    The rise is 0, so the slope is 0 (a horizontal line).
  6. What is the slope of y = 5x − 2?
    Show answer
    5 (the number in front of x)
  7. What is the slope of y = 7 − 3x?
    Show answer
    Rewrite as y = −3x + 7: the slope is −3.
  8. What is the slope of 4x + 2y = 10?
    Show answer
    2y = −4x + 10, so y = −2x + 5: the slope is −2.
  9. A line has slope 3 and passes through (0, −1). Write its equation.
    Show answer
    y = 3x − 1
  10. A line through (1, 4) has slope 2. Write its equation.
    Show answer
    4 = 2(1) + b, so b = 2: y = 2x + 2
  11. Write the equation of the line through (2, 1) and (6, 9).
    Show answer
    Slope = 8 ÷ 4 = 2; 1 = 2(2) + b, so b = −3: y = 2x − 3
  12. Is the line through (1, 1) and (4, 7) parallel to y = 2x + 9?
    Show answer
    Its slope is 6 ÷ 3 = 2, the same as y = 2x + 9, so yes, they are parallel.
  13. What slope is perpendicular to a slope of 3/4?
    Show answer
    Flip and change the sign: −4/3
  14. Do the points (0, 1), (2, 5) and (5, 11) lie on one straight line?
    Show answer
    Slopes: 4 ÷ 2 = 2 and 6 ÷ 3 = 2. They are equal, so yes.

Word problems

Slope in real life

Try each one, then check your answer.

  1. A plant is 4 cm tall on day 2 and 10 cm tall on day 5. How fast is it growing?
    Show answer
    (10 − 4) ÷ (5 − 2) = 6 ÷ 3 = 2 cm per day
  2. A phone plan costs $25 for 1 GB and $40 for 4 GB. What does each extra gigabyte cost?
    Show answer
    (40 − 25) ÷ (4 − 1) = 15 ÷ 3 = $5 per GB
  3. A ramp rises 1 m over a horizontal distance of 12 m. What is its slope?
    Show answer
    1 ÷ 12 ≈ 0.083 (often written 1:12, a common limit for wheelchair ramps)
  4. A water tank holds 200 litres at 8:00 and 140 litres at 11:00. What is the slope, and what does it mean?
    Show answer
    (140 − 200) ÷ 3 = −20 litres per hour: the tank is emptying at 20 litres an hour.
  5. A cyclist is 3 km from home after 10 minutes and 9 km from home after 30 minutes. What is her average speed in km per minute?
    Show answer
    (9 − 3) ÷ (30 − 10) = 6 ÷ 20 = 0.3 km per minute (18 km/h)

Questions people ask

What is the slope formula?

m = (y₂ − y₁) ÷ (x₂ − x₁). It is the change in y divided by the change in x between any two points on a line.

How do you find the slope from a graph?

Pick two points where the line crosses the grid exactly. Count the squares up or down (the rise) and the squares across (the run), then divide rise by run. Going down means the rise is negative.

What is slope-intercept form?

It is the equation y = mx + b, where m is the slope and b is the y-intercept (where the line crosses the y-axis). y = 2x + 3 has slope 2 and crosses the y-axis at 3.

Is slope the same as gradient?

Yes. "Slope" is the usual word in the US and Canada; "gradient" is used in the UK, Ireland, Australia and New Zealand. The formula is the same.

Why is the slope of a vertical line undefined?

On a vertical line the x-value never changes, so the run is 0. Rise ÷ 0 has no answer, because you cannot divide by zero.

What does a negative slope mean?

The line goes down from left to right: as x increases, y decreases. In real life it means something is falling, like the water in a draining tank.

Quick quiz

Slope (gradient)

Check what you know with 5 quick questions.

Question 1 of 5

A line goes through (1, 2) and (3, 8). What is its slope?

Practise it

Try it

All Algebra sheets

Practise it step by step in a full course: Grade 9 Maths

For grown-ups

Coordinates

Coordinates are a pair of numbers that give an exact position on a grid, like (3, 5). The first number is how far across (x) and the second is how far up (y).

Maths · Ages 8–14

Equations

An equation says two things are equal, using an = sign, like 2x + 1 = 9. Solving it means finding the value of the letter that makes it true, here x = 4.

Maths · Ages 10–16

Line graphs

A line graph shows how something changes over time. Points are plotted on a grid and joined by a line, so you can see rises, falls and patterns at a glance.

Maths · Ages 9–14

Algebra

Algebra is maths that uses letters, like x or n, to stand for numbers we don't know yet or numbers that can change. For example, if n + 3 = 10, then n = 7.

Maths · Ages 10–16

Functions (maths)

A function is a rule that gives exactly one output for each input. In f(x) = 2x + 3, the input 4 gives the output 2 × 4 + 3 = 11.

Maths · Ages 12–16

x-intercepts and y-intercepts

The y-intercept is where a graph crosses the y-axis: put x = 0. An x-intercept is where it crosses the x-axis: put y = 0. For y = 2x − 6 they are (0, −6) and (3, 0).

Maths · Ages 12–16

Back to the Learning Wiki