What is the Gradient?
The gradient of a line is a mathematical measure of its steepness — how much a line rises or falls as you move horizontally along it. You have probably asked yourself, looking at a mountain slope or a road: "How steep is that?" The gradient gives you a precise numerical answer.
The gradient is identical to the slope of a line, and the two terms are used interchangeably in mathematics. The word "gradient" is more common in British English and physics, while "slope" is the preferred term in American English and algebra classes.
Gradient Definition
Informally, the gradient tells you how fast a line rises or falls. Think of it as a number assigned to a hill or a road:
- Positive gradient — the line goes uphill (left to right). The larger the number, the steeper the climb.
- Negative gradient — the line goes downhill (left to right). The more negative, the steeper the descent.
- Zero gradient — the line is perfectly horizontal; no rise or fall.
- Undefined gradient — the line is perfectly vertical; it is impossible to assign a finite number (division by zero).
Gradient Formula
To calculate the gradient between two points (x₁, y₁) and (x₂, y₂), use the rise-over-run formula:
gradient = rise / run = (y₂ − y₁) / (x₂ − x₁)
- Rise — the vertical change between the two points: y₂ − y₁
- Run — the horizontal change between the two points: x₂ − x₁
The result is a dimensionless ratio. When the coordinates carry a physical unit (meters, feet, etc.), the unit cancels out and the gradient remains a pure number.
How to Use This Gradient Calculator
- Choose your measurement system — Metric (mm, cm, m, km) or US/Imperial (in, ft, yd, mi) — and select the unit for your coordinates.
- Enter the coordinates of the first point: x₁ and y₁.
- Enter the coordinates of the second point: x₂ and y₂.
- Click Calculate Gradient. The calculator instantly shows the gradient, rise, run, angle in degrees, and percentage grade.
Example: Points (−2, 1) and (3, 11).
Rise = 11 − 1 = 10 | Run = 3 − (−2) = 5 | Gradient = 10 / 5 = 2
Measurement Systems Supported
Metric System
- mm — millimeters
- cm — centimeters
- m — meters
- km — kilometers
US / Imperial System
- in — inches
- ft — feet
- yd — yards
- mi — miles
Because gradient is a dimensionless ratio (rise ÷ run), the numerical value is the same regardless of which unit you choose, as long as both coordinates use the same unit. The unit selection labels your coordinates for clarity.
Common Misconceptions and Mistakes
- Gradient = Slope = Rise over Run. These three concepts describe exactly the same thing. Do not be confused by different names in different textbooks or countries.
- Order of points matters for direction, not magnitude. Swapping (x₁, y₁) and (x₂, y₂) changes the sign of the gradient but not its absolute value.
- A vertical line has no gradient (run = 0, division by zero). This calculator will warn you if you enter two points with the same x-coordinate.
- A gradient of 2 is not "twice as steep" as a gradient of 1 in a visually intuitive sense. The steepness depends on the arctangent relationship: gradient 2 corresponds to about 63.4°, while gradient 1 corresponds to 45°.
- Percentage grade is simply gradient × 100. A road with a 6% grade has a gradient of 0.06 — it rises 6 meters for every 100 meters of horizontal distance.
FAQs
What is the difference between gradient and slope?
There is no mathematical difference. Both equal (y₂ − y₁) / (x₂ − x₁). "Slope" is the standard US term; "gradient" is widely used in the UK, Australia, and in physics.
What does a gradient of 0 mean?
A gradient of 0 means the line is perfectly horizontal — it neither rises nor falls. The equation of such a line is y = constant.
What does a negative gradient mean?
A negative gradient means the line falls as you move from left to right. For example, a ski slope descending from left to right has a negative gradient.
How do I find the gradient of a curve?
This calculator finds the gradient of a straight line through two points. For curved functions, you need the derivative (calculus). Use the Average Rate of Change Calculator for non-linear functions.
What is percentage grade?
Percentage grade = gradient × 100. It is commonly used for roads, ramps, and railways. A 5% grade means the road rises 5 units for every 100 units of horizontal distance.
Can gradient be greater than 1?
Yes. A gradient greater than 1 means the rise is larger than the run — the line is steeper than 45°. A gradient of 1 corresponds to exactly 45°.