How to Find the Gradient of a Straight Line

The gradient of a straight line measures how steep a line is, and it is one of the most important skills in IGCSE Maths. This page covers the rise over run method, the gradient formula (the change in y divided by the change in x), positive and negative gradients, zero and undefined gradients, and the rule for parallel lines. Fully worked examples show every step clearly, and the interactive practice rooms below cover graph-reading questions, coordinate pair problems, and missing-coordinate challenges, all auto-marked with instant feedback.

Prior Knowledge You will need to be comfortable plotting coordinates and reading values from a graph. If you need a refresher, review Plotting Straight Line Graphs before continuing.

What is gradient?

The gradient of a straight line measures how steep it is; specifically, how much the line rises (or falls) for every unit it moves to the right. A steeper line has a larger gradient. We always use the letter m for gradient.

The key idea is the rise over run ratio:

Gradient formula \[ \begin{aligned} m &= \frac{\text{rise}}{\text{run}} \\ &= \frac{y_2 - y_1}{x_2 - x_1} \end{aligned} \]

where \((x_1,\, y_1)\) and \((x_2,\, y_2)\) are any two points on the line.

Important: be consistent; always subtract in the same order (point 2 minus point 1) for both the numerator and the denominator.

Types of gradient

Positive gradient run rise

Line goes up left to right. m > 0

Negative gradient run fall

Line goes down left to right. m < 0

Zero gradient

Horizontal line. m = 0

Undefined gradient

Vertical line. Gradient is undefined (division by zero)

Parallel lines

Two straight lines are parallel if and only if they have the same gradient. They never cross, no matter how far they are extended.

Worked examples

Example 1: Gradient using rise and run

Find the gradient of the line that passes through \((1,\,2)\) and \((5,\,10)\).

Step 1: Identify two clear points

\((x_1, y_1) = (1, 2)\) and \((x_2, y_2) = (5, 10)\).

Step 2: Calculate rise and run

\[ \begin{aligned} \text{rise} &= 10 - 2 \\ &= 8 \\ \text{run} &= 5 - 1 \\ &= 4 \end{aligned} \]

Step 3: Divide

\[ \begin{aligned} m &= \frac{8}{4} \\ &= 2 \end{aligned} \]

What's happening?

Pick any two points the line passes through and read off their coordinates.

Subtract the \(y\)-values (rise) and the \(x\)-values (run) in the same order.

The gradient is 2. Positive, so the line slopes upward.

Example 2: Gradient from two coordinates

Find the gradient of the line joining \(A(-3,\,7)\) and \(B(3,\,-5)\).

Step 1: Label the points

\((x_1, y_1) = (-3, 7)\) and \((x_2, y_2) = (3, -5)\).

Step 2: Apply the formula

\[ \begin{aligned} m &= \frac{-5 - 7}{3 - (-3)} \\ &= \frac{-12}{6} \\ &= -2 \end{aligned} \]

What's happening?

Assign each point as point 1 or point 2 (either way round works, as long as you are consistent).

The gradient is −2. Negative, so the line slopes downward.

Example 3: Parallel lines

Line \(L_1\) passes through \((0, 3)\) and \((4, 11)\). Line \(L_2\) passes through \((-2, 1)\) and \((2, 9)\). Are they parallel?

Gradient of \(L_1\):

\[ \begin{aligned} m_1 &= \frac{11-3}{4-0} \\ &= \frac{8}{4} \\ &= 2 \end{aligned} \]

Gradient of \(L_2\):

\[ \begin{aligned} m_2 &= \frac{9-1}{2-(-2)} \\ &= \frac{8}{4} \\ &= 2 \end{aligned} \]

What's happening?

Calculate the gradient of each line separately using the formula.

Both gradients equal 2, so yes, the lines are parallel.

Example 4: Real-world gradient

A cycle path rises 6 m in height over a horizontal distance of 150 m. Find the gradient of the path.

Step 1: Identify rise and run

Rise = 6 m, run = 150 m.

Step 2: Calculate

\[ \begin{aligned} m &= \frac{6}{150} \\ &= 0.04 \end{aligned} \]

What's happening?

The vertical change (rise) and horizontal change (run) are given directly in the question.

The gradient is 0.04, meaning the path rises 4 cm for every metre travelled horizontally.

Key Points

  • Gradient = rise รท run. Always divide vertical change by horizontal change.
  • Subtract in the same order: \(\dfrac{y_2-y_1}{x_2-x_1}\), not a mix.
  • A positive gradient slopes up; negative slopes down.
  • Horizontal line: \(m = 0\). Vertical line: gradient is undefined.
  • Parallel lines always have equal gradients.

Common Pitfalls

  • Flipping rise and run: always put the y-change on top.
  • Inconsistent subtraction order: if you do \(y_2 - y_1\) on top, you must do \(x_2 - x_1\) on the bottom.
  • Sign errors with negatives: subtracting a negative adds, e.g. \(3-(-5) = 8\), not \(-2\).
  • Confusing zero and undefined: horizontal is zero, vertical is undefined.
โ‡ฉ Jump to Practice Questions โ‡ฉ

Confident with gradient? The next step is using it inside the equation of a line. Head to the Equation of a Straight Line when you're ready.

Next: Equation of a Straight Line โ†’

Gradient: Practice Room

Practise finding the gradient of a straight line across five graded rooms. Enter your answer as a whole number, a decimal, or a fraction (e.g. 3, -2, 0.5, -1/3).

โœ“ Correct 0
โœ— Re-attempts 0
๐Ÿ”ฅ Streak 0
๐Ÿ† Best 0

Room 1: rise and run given directly  |  Room 2: read the gradient from a graph  |  Room 3: gradient from two coordinate pairs  |  Room 4: negative coordinates & fractional gradients  |  Room 5: find the missing coordinate