Mathsโฑ 4 min read

How to Calculate Slope, Gradient and Rate of Change

Slope is the foundation of linear algebra, graphs, and real-world engineering. Here's how to calculate it from two points, what positive and negative slopes mean, and practical applications.

Slope โ€” also called gradient in the UK โ€” is one of the most fundamental concepts in mathematics. It measures steepness and direction of a line, and it underlies everything from roof pitches to economic models.

The Core Formula

Slope (m) = Rise รท Run = (yโ‚‚ โˆ’ yโ‚) รท (xโ‚‚ โˆ’ xโ‚) = Change in y รท Change in x Where (xโ‚, yโ‚) and (xโ‚‚, yโ‚‚) are two points on the line.

Worked Example

A line passes through points (2, 3) and (6, 11). What is the slope?

m = (11 โˆ’ 3) รท (6 โˆ’ 2) = 8 รท 4 = 2 For every 1 unit you move right, the line rises 2 units.

What Different Slope Values Mean

Slope ValueLine DirectionExample
Positive (e.g. +2)Rises left to rightRevenue growing over time
Negative (e.g. โˆ’3)Falls left to rightWeight decreasing on a diet
Zero (0)Perfectly horizontalConstant temperature
UndefinedPerfectly verticalInstantaneous change
Fraction (e.g. 0.5)Gentle riseShallow ramp
Large (e.g. 10)Steep riseNear-vertical cliff

The Equation of a Line

Once you have the slope and one point, you can write the full equation of the line in slope-intercept form:

y = mx + c m = slope c = y-intercept (where the line crosses the y-axis) To find c: substitute a known point (x, y) and solve Example: m = 2, point (2, 3) 3 = 2(2) + c โ†’ c = 3 โˆ’ 4 = โˆ’1 Equation: y = 2x โˆ’ 1

Gradient in Real-World Applications

Road and roof gradients: In construction, gradient is expressed as a ratio (1:20 means 1 unit rise per 20 units horizontal) or as a percentage.

Gradient % = (Rise รท Run) ร— 100 A 1:20 slope = (1 รท 20) ร— 100 = 5% A steep road at 1:8 = 12.5%

Finance: The slope of a price chart between two dates is literally the rate of change โ€” pounds per day, percentage per week. A steeper positive slope means faster growth.

Physics: On a velocity-time graph, slope = acceleration. On a distance-time graph, slope = speed.

Medicine: On a growth chart, the slope of a child's weight-for-age curve tells a paediatrician whether growth is accelerating, steady, or faltering.

Parallel and Perpendicular Lines

Parallel lines: same slope (mโ‚ = mโ‚‚) Perpendicular lines: slopes multiply to โˆ’1 mโ‚‚ = โˆ’1 รท mโ‚ Example: slope 3 โ†’ perpendicular slope = โˆ’1/3
๐Ÿ“
Try it yourself โ€” free
Slope Calculator ยท no sign-up, instant results
Open Slope Calculator โ†’
โ† All Articles