Skip to the formula

Gradient formula: m = (y₂ − y₁) / (x₂ − x₁)

The gradient formula is gradient m = (y₂ − y₁) / (x₂ − x₁).

What each letter means

When to use it

To find how steep a line is from two points on it, before writing its equation y − y₁ = m(x − x₁).

Worked example

Find the gradient of the line through \((-1,4)\) and \((3,-8)\), and the gradient of a line perpendicular to it.

  1. \(m=\dfrac{-8-4}{3-(-1)}=\dfrac{-12}{4}\)
  2. Perpendicular gradient \(=-\dfrac{1}{m}\)

Answer: \(m=-3\); perpendicular gradient \(\tfrac13\)

Common mistake

Putting the x difference on top. Gradient is rise over run: change in y ÷ change in x.

On your course

CourseIn the exam
AA SLIn the IB formula booklet
AI SLIn the IB formula booklet
AA HLIn the IB formula booklet
AI HLIn the IB formula booklet

From our own IB Maths formula sheets, in our words. The IB gives its booklet to schools, so we checked against our own copy: your teacher has the official one. Official: IB DP Mathematics page.

Practise and revise

Gradient formula formula card: gradient m = (y₂ − y₁) / (x₂ − x₁). IB Math Revision
Gradient formula formula card. Download the card (PNG) to save or print it.

Questions

What is the gradient formula?

The gradient formula is gradient m = (y₂ − y₁) / (x₂ − x₁). m: the gradient (slope) of the line; (x₁, y₁), (x₂, y₂): two points on the line.

Is the gradient formula given in the exam?

AA SL: in the IB formula booklet. AI SL: in the IB formula booklet. AA HL: in the IB formula booklet. AI HL: in the IB formula booklet. This comes from our own IB Maths formula sheets; your teacher has the official booklet.

What are the gradients of parallel and perpendicular lines?

Parallel lines have equal gradients. Perpendicular gradients multiply to −1, so a line perpendicular to gradient m has gradient −1/m.

Our own wording, examples and card, checked by IB Math Revision. Not produced or endorsed by the International Baccalaureate Organization.