Gradient of a Line - Definition & Formula

#Geometry
TL;DR
The gradient of a line measures its steepness and direction: it is the change in yy divided by the change in xx, and it is exactly the mm in the equation y=mx+cy = mx + c. "Gradient" is the British term for what is called slope elsewhere - they mean the same thing. This guide gives the formula, six examples, and the mistakes that flip or fumble the value.
BT
Bhanzu TeamLast updated on July 21, 20267 min read

What Is The Gradient Of A Line?

The gradient of a line is a number that tells you two things at once: how steep the line is and which way it slants. It is defined as the change in the yy-coordinate divided by the change in the xx-coordinate between any two points on the line:

m=y2−y1x2−x1=ΔyΔxm = \frac{y_2 - y_1}{x_2 - x_1} = \frac{\Delta y}{\Delta x}

The letter mm stands for the gradient. "Gradient" is simply the British and Commonwealth name for what is called the "slope" in the United States - the two words describe the identical idea. So the slope of a line and the gradient of a line are the same quantity, computed the same way.

The gradient's most useful home is inside the equation of a straight line:

y=mx+cy = mx + c

Here mm is the gradient and cc is the yy-intercept (where the line crosses the vertical axis). Read off the number multiplying xx, and you have the gradient without any calculation.

A gradient can be positive, negative, zero, or undefined. A positive gradient rises left to right; a negative gradient falls; a horizontal line has gradient 00; a vertical line has an undefined gradient (its run is zero, so you would divide by zero).

Examples Of Gradient Of A Line

These examples build from reading mm off an equation to finding it from two points and from a graph. Each problem statement is bold; the steps are plain.

Example 1

What is the gradient of the line y=3x+5y = 3x + 5?

The equation is already in the form y=mx+cy = mx + c. The gradient is the coefficient of xx.

Here that coefficient is 33.

Final answer: the gradient is m=3m = 3.

Example 2

Find the gradient of the line through the points (2,3)(2, 3) and (6,11)(6, 11).

Your first instinct might be to divide the run by the rise - "xx over yy" - because xx is usually named first. Let's see where that leads.

Writing x2−x1y2−y1=6−211−3=48=12\dfrac{x_2 - x_1}{y_2 - y_1} = \dfrac{6-2}{11-3} = \dfrac{4}{8} = \dfrac{1}{2} gives a gentle-looking gradient. But the line rises 88 for a run of only 44, so it is clearly steep - a gradient under 11 cannot be right.

The gradient is rise over run, yy on top:

m=y2−y1x2−x1=11−36−2=84=2m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{11 - 3}{6 - 2} = \frac{8}{4} = 2

A gradient of 22 matches a line that climbs faster than it moves sideways, which fixes the flipped version.

Final answer: the gradient is m=2m = 2.

Example 3

A line passes through (1,5)(1, 5) and (4,−4)(4, -4). Find its gradient.

m=−4−54−1=−93=−3m = \frac{-4 - 5}{4 - 1} = \frac{-9}{3} = -3

Final answer: the gradient is m=−3m = -3, so the line falls three units for every one unit right.

Example 4

Rewrite 2y=6x+102y = 6x + 10 in the form y=mx+cy = mx + c and state the gradient.

The equation is not yet solved for yy, so divide every term by 22:

y=3x+5y = 3x + 5

Now it is in y=mx+cy = mx + c form, and the coefficient of xx is 33.

Final answer: the gradient is m=3m = 3. (Reading mm before rearranging would have wrongly given 66.)

Example 5

A road rises 33 m over a horizontal distance of 1212 m. What is its gradient?

Gradient is rise over run:

m=riserun=312=14=0.25m = \frac{\text{rise}}{\text{run}} = \frac{3}{12} = \frac{1}{4} = 0.25

Final answer: the gradient is 14\dfrac{1}{4}, often written as "11 in 44" on road and railway signs.

Example 6

What is the gradient of a horizontal line, and of a vertical line?

A horizontal line has no vertical change: Δy=0\Delta y = 0, so m=0Δx=0m = \dfrac{0}{\Delta x} = 0.

A vertical line has no horizontal change: Δx=0\Delta x = 0, so m=Δy0m = \dfrac{\Delta y}{0}, which is undefined (you cannot divide by zero).

Final answer: horizontal gradient =0= 0; vertical gradient is undefined.

Why The Gradient Matters: "A Single Number For Steepness and Direction"

The gradient began as a practical measurement long before it became algebra: the grade of a road, the pitch of a roof, the rise of a railway. Engineers needed one number that said how hard a climb was, and "rise over run" delivered it. That is the substance behind y=mx+cy = mx + c - the mm is a real physical steepness, not just a letter.

  • Safety limits. Wheelchair-access ramps are capped near a gradient of 11 in 1212; roads and railways post maximum gradients so vehicles can brake and climb safely. The number sets the rule.

  • Rates of change. In any straight-line graph - distance against time, cost against quantity - the gradient is the rate: speed, price per unit, litres per minute. Reading mm reads the rate directly.

  • Comparing lines instantly. Two lines with gradients 22 and 55 can be ranked for steepness at a glance; the larger ∣m∣|m| is the steeper line, whichever way it points.

When a railway is surveyed, the ruling gradient decides everything from how long a train needs to brake to whether a locomotive can haul its load up the incline at all. A miscalculated gradient is not a rounding error - it can mean a train that cannot make the hill. The gradient turns "how steep?" from a vague impression into a number a rule can be written around.

Common Mistakes With the Gradient of a Line

These errors show up the moment the equation is not already tidy, or the points are given out of order.

Mistake 1: Reading m before rearranging the equation

Where it slips in: Grabbing the number in front of xx while the equation is not yet in y=mx+cy = mx + c form.

Don't do this: Looking at 2y=6x+102y = 6x + 10 and calling the gradient 66.

The correct way: Solve for yy first. Dividing by 22 gives y=3x+5y = 3x + 5, so the true gradient is 33. The memorizer who has learned "mm is the number by xx" but skips the rearrangement reads the wrong coefficient.

Mistake 2: Dividing run by rise (flipping the fraction)

Where it slips in: Putting Δx\Delta x on top and Δy\Delta y on the bottom.

Don't do this: Computing x2−x1y2−y1\dfrac{x_2 - x_1}{y_2 - y_1}, which is the reciprocal of the gradient.

The correct way: Gradient is rise over run, ΔyΔx\dfrac{\Delta y}{\Delta x}, with the yy-change on top. The second-guesser who is unsure which goes on top can sanity-check against the graph: a steep line must give a gradient bigger than 11.

Mistake 3: Treating gradient and slope as different things

Where it slips in: Meeting "gradient" in a British textbook and "slope" in an American one and assuming they are separate topics.

Don't do this: Learning two formulas for what you think are two ideas.

The correct way: They are the same quantity with two names. "Gradient" is the UK term, "slope" the US term; both equal ΔyΔx\dfrac{\Delta y}{\Delta x} and both are the mm in y=mx+cy = mx + c.

Conclusion

  • The gradient of a line is ΔyΔx\dfrac{\Delta y}{\Delta x} - its steepness and direction in one number.

  • It is exactly the mm in y=mx+cy = mx + c; read off the coefficient of xx once the equation is in that form.

  • Gradient (UK) and slope (US) are the same thing, computed identically.

  • A gradient can be positive (rising), negative (falling), zero (horizontal), or undefined (vertical).

  • Rise goes on top, run on the bottom - flipping the fraction gives the reciprocal, not the gradient.

Practise What You Have Learned

Work through these to test your understanding: state the gradient of y=−4x+7y = -4x + 7 (Answer to Question 1: −4-4); find the gradient through (0,1)(0, 1) and (5,16)(5, 16) (Answer to Question 2: 33); and rewrite 3y=9x−63y = 9x - 6 as y=mx+cy = mx + c and give its gradient. To take this further with a teacher, explore Bhanzu's geometry tutor, high school math tutor, or math tutoring. Want to see the gradient change live as you tilt a line? Book a free demo class.

Read More

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

Is gradient the same as slope?
Yes. "Gradient" is the term used in the UK and Commonwealth countries, and "slope" is used in the US, but they are the identical quantity: the change in yy divided by the change in xx, and the mm in y=mx+cy = mx + c.
What does the m in y = mx + c stand for?
mm is the gradient of the line — its steepness and direction. The cc is the yy-intercept, the value of yy where the line crosses the vertical axis.
Can the gradient of a line be negative?
Yes. A negative gradient means the line falls from left to right — as xx increases, yy decreases. A positive gradient rises, a zero gradient is horizontal, and a vertical line has an undefined gradient.
How do I find the gradient from two points?
Use m=y2−y1x2−x1m = \dfrac{y_2 - y_1}{x_2 - x_1}. Subtract the yy-coordinates for the top and the xx-coordinates for the bottom, keeping the same point first in both. For (1,2)(1, 2) and (3,8)(3, 8), m=8−23−1=3m = \dfrac{8 - 2}{3 - 1} = 3.
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →