Maths explained · Years 8 to 10

How to find the gradient of a line

Gradient is how steep a line is. You can find it from two points, by counting on a graph, or straight from the equation. Here’s each method with an example, a calculator that shows the working, and practice questions with answers.

Quick answer

Gradient = rise ÷ run. From two points, m = (y₂ − y₁) ÷ (x₂ − x₁). From an equation, rearrange to y = mx + c and read off m. Uphill lines have a positive gradient, downhill lines a negative one, horizontal lines 0, and vertical lines are undefined.

Stuck on a gradient question?

Snap it. Tuterly shows a detailed worked solution, then gives fresh questions on the same skill until you can do it on your own. Years 7 to 10.

Coming soon on iPhone. Android soon after.

Launch price: 50% off until 31 March 2027. $17.99 $8.99 a week or $59.99 $29.99 a month.

We'll email you when Tuterly launches, plus occasional maths tips and offers. Unsubscribe any time. See our privacy policy.

Free to download · 7-day free trial on monthly · Years 7 to 10 maths · On iPhone. Android coming soon

What gradient means

m=riserunm = \frac{\text{rise}}{\text{run}}
  • Positive gradient: the line goes up from left to right.
  • Negative gradient: it goes down from left to right.
  • Zero: a horizontal line.
  • Undefined: a vertical line (you can't divide by a run of 0).

The bigger the number (ignoring the sign), the steeper the line.

From two points

m=y2−y1x2−x1m = \frac{y_2 - y_1}{x_2 - x_1}

Worked example

Find the gradient of the line through (1,2)(1, 2) and (4,8)(4, 8).

m=8−24−1=63=2m = \frac{8 - 2}{4 - 1} = \frac{6}{3} = 2

It doesn't matter which point you call the first, as long as you keep the xx and yy from the same point together.

Gradient calculator (with working)

Enter two points. You’ll get the gradient, the equation of the line, the midpoint and the distance between them, with every step.

Gradient m = 2 · y = 2x

  1. Gradient formula: m=riserun=y2−y1x2−x1m = \dfrac{\text{rise}}{\text{run}} = \dfrac{y_2 - y_1}{x_2 - x_1}
  2. Substitute: m=8−24−1=63m = \dfrac{8 - 2}{4 - 1} = \dfrac{6}{3}
  3. Simplify: m=2m = 2
  4. Find the y-intercept: y=mx+cy = mx + c, so 2=2×1+c2 = 2 \times 1 + c, giving c=0c = 0
  5. Equation of the line: y=2xy = 2x
  6. Midpoint: (x1+x22,y1+y22)=(52,5)\left(\dfrac{x_1 + x_2}{2}, \dfrac{y_1 + y_2}{2}\right) = \left(\frac{5}{2}, 5\right)
  7. Distance: d=(x2−x1)2+(y2−y1)2=32+62=35≈6.71d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} = \sqrt{3^2 + 6^2} = 3\sqrt{5} \approx 6.71

Enter two points the line passes through, like (1, 2) and (4, 8).

From a graph

Pick two points where the line crosses grid corners exactly. Count the rise (up is positive, down is negative), then the run (left to right), and divide.

If the line goes down 3 squares for every 2 across, the gradient is −32=−32\dfrac{-3}{2} = -\dfrac{3}{2}.

From an equation

In y=mx+cy = mx + c, mm is the gradient and cc is the y-intercept.

  • y=3x−2y = 3x - 2: gradient 33.
  • 2x+y=52x + y = 5: rearrange to y=−2x+5y = -2x + 5, so the gradient is −2-2.

Always get yy on its own first.

Parallel and perpendicular lines (Year 10)

  • Parallel lines have the same gradient.
  • Perpendicular lines have gradients that multiply to −1-1: m1×m2=−1m_1 \times m_2 = -1. Flip the fraction and change the sign. Perpendicular to m=3m = 3 is m=−13m = -\dfrac{1}{3}.

Practice questions with answers

Try each one before you open the answer.

  1. Find the gradient through (2,3)(2, 3) and (6,11)(6, 11).

    Show the answer

    m=11−36−2=84=2m = \dfrac{11 - 3}{6 - 2} = \dfrac{8}{4} = 2

  2. Find the gradient through (−1,4)(-1, 4) and (3,−4)(3, -4).

    Show the answer

    m=−4−43−(−1)=−84=−2m = \dfrac{-4 - 4}{3 - (-1)} = \dfrac{-8}{4} = -2

  3. Find the gradient through (1,−2)(1, -2) and (5,0)(5, 0).

    Show the answer

    m=0−(−2)5−1=24=12m = \dfrac{0 - (-2)}{5 - 1} = \dfrac{2}{4} = \dfrac{1}{2}

  4. Find the gradient through (0,5)(0, 5) and (4,5)(4, 5).

    Show the answer

    m=04=0m = \dfrac{0}{4} = 0 (a horizontal line)

  5. What is the gradient of y=−4x+7y = -4x + 7?

    Show the answer

    −4-4

  6. What is the gradient of 3x+2y=63x + 2y = 6?

    Show the answer

    Rearrange: y=−32x+3y = -\dfrac{3}{2}x + 3, so m=−32m = -\dfrac{3}{2}

  7. A line is perpendicular to one with gradient 23\dfrac{2}{3}. What is its gradient?

    Show the answer

    The negative reciprocal: −32-\dfrac{3}{2}

Gradient by year level

Following the Victorian Curriculum 2.0. Schools sequence topics differently, so check your course.

Year 8

Linear equations and graphs

Linear graphs and gradient as rise over run.

Year 9

Coordinate geometry

The gradient formula, midpoint and distance between two points.

Year 10

Coordinate geometry

Equations of lines, parallel and perpendicular gradients.

Gradient: common questions

What is the gradient of a line?

How steep the line is: how far it goes up (the rise) for every 1 unit it goes across (the run). Gradient = rise ÷ run.

What's the formula for gradient?

m = (y₂ − y₁) ÷ (x₂ − x₁), using any two points (x₁, y₁) and (x₂, y₂) on the line.

How do I find the gradient from an equation?

Rearrange it to y = mx + c. The number in front of x is the gradient. For y = 3x − 2, the gradient is 3.

What's the gradient of a horizontal or vertical line?

A horizontal line has gradient 0. A vertical line's gradient is undefined, because the run is 0.

What year level learns gradient?

In the Victorian Curriculum 2.0, gradient comes in with linear graphs in Year 8, the gradient formula and coordinate geometry in Year 9, and parallel and perpendicular lines in Year 10.

Tuterly · Years 7 to 10 maths

Got a gradient question wrong in homework?

Snap it with Tuterly. You’ll see every step of the working, then get fresh questions on the same skill until it’s mastered. Built for the Australian Curriculum by Bayside Academics.

Coming soon on iPhone. Android soon after.

Launch price: 50% off until 31 March 2027. $17.99 $8.99 a week or $59.99 $29.99 a month.

We'll email you when Tuterly launches, plus occasional maths tips and offers. Unsubscribe any time. See our privacy policy.

Free to download · 7-day free trial on monthly · Years 7 to 10 maths · On iPhone. Android coming soon
Or try it free now with your own question →