CalculatorPlus

Maths New Zealand

Gradient Calculator

Gradient means two things in New Zealand โ€” the slope of a line in maths, and the steepness of a road or roof on site. This handles both: coordinate geometry with the line equation, or a physical rise and run in percent, ratio and degrees.

Free, no signup Runs in your browser

Gradient of

Gradient

โ€”

As a percentage

โ€”

As a ratio

โ€”

As an angle

โ€”

Line equation

โ€”

How do you calculate gradient?

Divide the change in y by the change in x: m = (yโ‚‚ โˆ’ yโ‚) รท (xโ‚‚ โˆ’ xโ‚). For a physical slope that is rise divided by run. A rise of 1 metre over 12 metres gives a gradient of 0.0833, which is 8.33%, a 1-in-12 ratio, or 4.76 degrees.

Two meanings, one calculation

In NCEA coordinate geometry, gradient is the m in y = mx + c. It can be negative, it can exceed one, and it is usually left as a fraction. Parallel lines share a gradient; perpendicular lines have gradients that multiply to โˆ’1.

On a road, a roof or a drain, gradient means steepness and is quoted as a percentage or a ratio. A 1-in-12 ramp, an 8% road grade, a 15-degree roof pitch โ€” all the same idea, three conventions.

The calculator handles both because the same division does the work either way. What changes is which output you read.

The one genuine trap in the physical case is the run. It is a horizontal distance, so a tape laid along a sloping surface gives a longer figure and reports the gradient as gentler than it really is.

Reading the ratio form

Ratio is the standard on New Zealand sites for drainage and access work, and it is the form that causes the most confusion.

1 in 12 means one unit of rise for every twelve of horizontal run. Bigger second number, gentler slope. So 1 in 20 is flatter than 1 in 12, and a specification setting a maximum of 1 in 12 is satisfied by 1 in 20 but not by 1 in 8.

When a specification and a site measurement disagree, converting both to percentages usually settles it faster than arguing about ratios.

How this is calculated

One division, then four ways of writing the result โ€” plus the line equation when you are working in coordinates.

  • gradient m = (yโ‚‚ โˆ’ yโ‚) รท (xโ‚‚ โˆ’ xโ‚) โ€” or rise รท run
  • percentage = m ร— 100
  • ratio = 1 : (1 รท m)
  • angle in degrees = arctan(m) ร— 180 รท ฯ€
  • line equation: y = mx + c, where c = yโ‚ โˆ’ m ร— xโ‚
  • perpendicular gradient = โˆ’1 รท m

The two readings of the word are the same arithmetic with different conventions attached. In coordinate geometry a gradient is usually left as a fraction or a decimal and can be negative, meaning the line falls left to right. On site it is almost always quoted as a percentage or a ratio, and the sign is dropped because everyone knows which way water runs.

The ratio form is the one that reads backwards: a larger second number means a gentler slope. 1 in 20 is flatter than 1 in 12, which is the opposite of how every other measure on this page behaves.

A worked example: a line through two points

A line passing through (2, 3) and (8, 12).

  1. Change in y โ€” 12 โˆ’ 39
  2. Change in x โ€” 8 โˆ’ 26
  3. Gradient โ€” 9 รท 61.5
  4. Intercept โ€” 3 โˆ’ 1.5 ร— 20
  5. Line equationy = 1.5x
  6. As an angle56.31ยฐ

A gradient of 1.5, so the line is y = 1.5x and rises at 56.31 degrees.

A gradient of 1.5 is a 150% grade in physical terms โ€” far steeper than anything you would build. Coordinate gradients are routinely larger than one; physical ones rarely are.

What this calculator does not do

  • Assumes a straight line or a constant slope between the two points
  • A vertical line has no defined gradient โ€” the run is zero
  • Percentage and degrees only agree near zero; neither is a shortcut for the other
  • Does not check any building or roading standard

Common questions

How do you find the gradient between two points?

Divide the change in y by the change in x: m = (yโ‚‚ โˆ’ yโ‚) รท (xโ‚‚ โˆ’ xโ‚). Through (2, 3) and (8, 12) that is 9 รท 6 = 1.5.

What does a 1 in 12 gradient mean?

One unit of rise for every twelve of horizontal run โ€” about 8.33%, or 4.76 degrees. A larger second number means a gentler slope, so 1 in 20 is flatter than 1 in 12.

How do I convert a gradient to degrees?

Take the arctangent of the gradient. A gradient of 0.0833 is arctan(0.0833) = 4.76 degrees. Percentage and degrees only track each other closely below about 10%.

What is the gradient of a perpendicular line?

The negative reciprocal. If a line has gradient 1.5, any line perpendicular to it has gradient โˆ’1 รท 1.5, which is โˆ’0.667. The two multiply to โˆ’1.

Can a gradient be negative?

In coordinate geometry, yes โ€” it means the line falls from left to right. For a physical slope the sign is usually dropped, since the direction of fall is obvious on site.

Where these numbers come from

Method last reviewed 2026-10-28 This calculator uses fixed rules rather than rates that change, and its method is re-checked against the sources above at least once a year. Out of date? Tell us and we will fix it.

New Zealand · Maths

More maths tools

See all 8 calculators in this section