Gradient Formula (Slope) | How to Find the Gradient

Gradient Formula (Slope)

The gradient (also called the slope) tells you how steep a line is and whether it rises or falls. A positive gradient means the line goes up as x increases. A negative gradient means it goes down.


๐Ÿ“Œ Gradient (Slope) Formula

For two points (xโ‚, yโ‚) and (xโ‚‚, yโ‚‚), the gradient is:

m = (yโ‚‚ โˆ’ yโ‚) / (xโ‚‚ โˆ’ xโ‚)

  • m is the gradient (slope)
  • yโ‚‚ โˆ’ yโ‚ is the change in y (โ€œriseโ€)
  • xโ‚‚ โˆ’ xโ‚ is the change in x (โ€œrunโ€)

How to find the gradient (step-by-step)

  1. Pick two points on the line: (xโ‚, yโ‚) and (xโ‚‚, yโ‚‚).
  2. Subtract the y-values: yโ‚‚ โˆ’ yโ‚.
  3. Subtract the x-values: xโ‚‚ โˆ’ xโ‚.
  4. Divide: (yโ‚‚ โˆ’ yโ‚) รท (xโ‚‚ โˆ’ xโ‚).
  5. Simplify your fraction if possible.

๐Ÿงฎ Example 1: Gradient between two points

Find the gradient between (2, 3) and (8, 15).

  1. Use: m = (yโ‚‚ โˆ’ yโ‚) / (xโ‚‚ โˆ’ xโ‚)
  2. Substitute: m = (15 โˆ’ 3) / (8 โˆ’ 2)
  3. Calculate: m = 12 / 6 = 2

So the gradient is 2 (the line rises 2 units for every 1 unit across).


๐Ÿงฎ Example 2: Negative gradient

Find the gradient between (1, 10) and (5, 2).

  1. m = (2 โˆ’ 10) / (5 โˆ’ 1)
  2. m = โˆ’8 / 4 = โˆ’2

So the gradient is โˆ’2 (the line falls as x increases).


Gradient from a linear equation

If a line is written in the form:

y = mx + c

  • m is the gradient
  • c is the y-intercept (where the line crosses the y-axis)

Example: For y = 3x โˆ’ 5, the gradient is 3.


Special cases

  • Horizontal line: gradient = 0 (y doesnโ€™t change).
  • Vertical line: gradient is undefined (division by zero because xโ‚‚ โˆ’ xโ‚ = 0).

Common mistakes to avoid

  • Mixing up the order of points (keep the same order in top and bottom).
  • Forgetting the negative sign when the line slopes downward.
  • Trying to find a gradient for a vertical line (itโ€™s undefined).
  • Rounding too early (simplify fractions first).

Related pages

  • Equation of a straight line
  • Distance formula
  • Midpoint formula
  • Graphing linear equations

Disclaimer: This page is provided for general educational reference only. While care has been taken to present accurate formulas and examples, results may vary depending on rounding and input precision. This content does not replace professional educational, engineering, or technical advice.