COC

Free Engineering Tool

Gradient Calculator

Calculate gradient, percentage grade, slope ratio, and incline angle from rise and run, work backward to find a missing rise or run, or find the slope and equation of a line from two coordinate points — instantly, with every formula shown.

✓ Five calculators in one   ✓ Automatic unit conversion   ✓ Works on mobile

Gradient & Slope Calculator

Enter a valid rise value
Enter a valid run value (> 0)
Enter a valid gradient value
Enter a valid run value (> 0)
Enter a valid rise value
Enter a valid, non-zero gradient
Enter a valid rise value
Enter a valid run value (> 0)

Point A

Point B

Enter valid coordinates for both points (X₁ ≠ X₂)
Rise Run

What Is a Gradient Calculator?

Gradient describes how steep a surface or a line is — the amount of vertical change relative to horizontal change. In mathematics, engineering, and everyday language it goes by several overlapping names: gradient, slope, incline, and grade. They all describe the same underlying idea, but the terms carry slightly different connotations depending on context. "Slope" is the term most common in mathematics and coordinate geometry. "Gradient" and "grade" are more common in civil engineering, road design, and surveying, often expressed as a percentage. "Incline" typically refers to the physical angled surface itself, described by its angle or grade. Regardless of the word used, the underlying formula is the same: Gradient = Rise ÷ Run, where rise is the vertical change and run is the horizontal distance over which that change happens.

Accurate gradient calculations matter because small errors compound into real engineering consequences. A road built slightly steeper than intended can violate safety standards for vehicle braking distance. A wheelchair ramp that exceeds accessibility guidelines becomes unsafe or non-compliant. A roof pitch calculated incorrectly affects drainage, material requirements, and structural load. Because gradient can be expressed multiple ways — as a decimal slope, a percentage grade, a ratio like 1:12, or an angle in degrees — converting reliably between these formats is just as important as calculating the raw number in the first place.

This calculator covers the full set of gradient-related conversions engineers, builders, and students actually need. The core Gradient Calculator takes a rise and run and returns the gradient as a decimal, a percentage grade, a slope ratio (1:n), an incline angle in degrees, and an automatic classification (flat ground, road, driveway, wheelchair ramp, hill, or steep slope) based on standard engineering grade bands. The Rise Calculator and Run Calculator solve the formula in reverse — given a gradient and one of the two distances, they find the missing value, which is exactly the calculation needed when you know a target grade and need to know how much elevation change fits over a given horizontal distance, or vice versa. The Angle Calculator converts rise and run directly into an incline angle in both degrees and radians alongside the percentage grade. And the Line Equation Calculator takes two coordinate points and returns the line's slope, its full equation in y = mx + b form, the y-intercept, and the straight-line distance between the points — the standard toolkit for coordinate geometry problems.

Every mode updates live as you type, supports unit conversion across millimeters, centimeters, meters, kilometers, inches, feet, and yards for rise and run values, and shows the formula used behind each result. That combination of flexibility and transparency makes this tool useful for civil and structural engineers checking road or drainage grades, architects and builders working out roof pitch or ramp compliance, surveyors converting field measurements into standard grade figures, and students and teachers working through coordinate geometry and trigonometry problems involving slope and angle.

The Complete Guide to Gradient and Slope

Everything engineers, builders, surveyors, and students ask about how gradient, grade, and slope actually work.

What is gradient?

Gradient is a measure of steepness — the ratio of vertical change (rise) to horizontal change (run) between two points on a line or surface. It can be expressed as a decimal, a percentage, a ratio, or an angle, and all four are simply different ways of communicating the same underlying steepness.

The gradient formula

Gradient = Rise ÷ Run. A rise of 5 meters over a run of 20 meters gives a gradient of 0.25 — meaning the surface climbs a quarter of a meter for every meter of horizontal distance covered.

Understanding rise and run

Rise is the vertical distance between two points — how much height is gained or lost. Run is the horizontal distance between those same two points, measured along the flat, unangled direction. Rise and run must be measured in the same units before dividing one by the other, which is why unit conversion is built into this calculator's Gradient, Rise, Run, and Angle modes.

Percentage grade explained

Percentage grade is the decimal gradient multiplied by 100: Grade = (Rise ÷ Run) × 100. A gradient of 0.25 becomes a 25% grade. Percentage grade is the standard way road signs, ramp specifications, and many engineering documents express steepness, since it reads more intuitively than a small decimal.

Slope ratio explained

Slope ratio expresses gradient as "1 unit of rise for every n units of run," written 1:n, where n = Run ÷ Rise. A gradient of 0.05 (a 5% grade) corresponds to a ratio of 1:20 — for every 20 units traveled horizontally, the surface rises 1 unit. Ratio notation is especially common in ramp, drainage, and railway specifications.

Incline angle explained

The incline angle is the angle, in degrees or radians, that the sloped surface makes with the horizontal, calculated as Angle = arctan(Rise ÷ Run). Unlike gradient or grade, which scale linearly with steepness, angle is a trigonometric function of the ratio, which is why a doubling of percentage grade does not correspond to a doubling of angle — a distinction that matters when precise angle values are required, such as in structural calculations.

Coordinate geometry and line slope

In coordinate geometry, the slope of a line through two points (x₁, y₁) and (x₂, y₂) is calculated the same way as gradient: m = (y₂ − y₁) ÷ (x₂ − x₁). This slope value, combined with either point, defines the line's full equation in slope-intercept form, y = mx + b, where b is the y-intercept — the point where the line crosses the y-axis.

Finding the line equation and y-intercept

Once the slope m is known, the y-intercept is found by rearranging the line equation: b = y₁ − m × x₁, using either known point. Together, m and b fully describe the line, letting you predict the y-value for any x-value along it, or vice versa.

Civil engineering applications

Civil engineers use gradient calculations constantly — for road design, drainage systems, retaining wall planning, and site grading. Getting the grade right affects water runoff behavior, vehicle safety, and long-term structural stability, making gradient one of the most frequently checked figures in civil engineering documentation.

Road design and grade standards

Road gradients are typically kept low — often in the 2–5% range for standard roads — to maintain safe braking distances and vehicle traction, with steeper grades reserved for specific terrain-driven situations and subject to stricter design standards.

Railway design and gradient limits

Railways operate under much stricter gradient limits than roads, since trains have significantly longer braking distances and lower traction relative to their mass. Railway gradients are frequently expressed as a ratio (such as 1:100) rather than a percentage, reflecting the engineering tradition of the field.

Roof pitch calculations

Roof pitch is a specialized application of the same rise-over-run principle, often expressed as "rise per 12 units of run" in construction contexts (e.g., a "4-in-12" roof). Converting a roof pitch into a percentage grade or an angle uses exactly the same formulas as any other gradient calculation.

Wheelchair ramp design

Accessibility standards typically require wheelchair ramp grades to stay within a maximum percentage — commonly around 8% or a 1:12 ratio, depending on the applicable code — making gradient calculation a compliance-critical step in ramp design, not just a convenience.

Surveying applications

Surveyors regularly calculate gradient from field elevation and distance measurements to document slope for land grading, drainage planning, and construction site preparation, converting raw rise and run measurements into the percentage or ratio format required by project specifications.

Landscaping and drainage systems

Landscape designers use gradient calculations to ensure water drains away from structures rather than pooling against them, typically targeting a gentle, consistent grade across graded soil or hardscaping. Drainage systems more broadly rely on maintaining a minimum gradient along pipe runs to keep water flowing by gravity alone.

Construction planning

Beyond roads and ramps, gradient calculations inform foundation excavation, retaining wall batter angles, and site leveling plans — anywhere a construction project needs a precise, documented steepness figure rather than a rough visual estimate.

Common mistakes in gradient calculations

The most frequent error is confusing slope (a linear ratio) with angle (a trigonometric function of that ratio) — they are related but not proportional, so treating a doubled percentage grade as a doubled angle is incorrect. Mixing decimal slope and percentage grade without converting, using mismatched units for rise and run, entering a zero run value (which makes gradient undefined), reversing coordinate point order in line slope calculations, and rounding intermediate values too early are the other common sources of error.

Professional tips for accurate gradient work

Always convert rise and run to matching units before dividing. Keep decimal, percentage, and ratio forms clearly labeled in any documentation, since mixing them silently is a common source of miscommunication on a project. When precise angle values matter, calculate directly from rise and run using arctan rather than approximating from a percentage grade table. And for line slope work, double-check which point was labeled first, since reversing point order flips the sign of both the numerator and denominator — though the resulting slope value stays correct as long as the reversal is applied consistently to both.

How the Calculator Works

Four steps from raw measurements to a complete, formula-transparent answer.

1

Enter Measurements

Type in rise, run, a known gradient, or two coordinate points, depending on the mode you select.

2

Choose a Calculator Mode

Pick Gradient, Rise, Run, Angle, or Line Equation — each mode shows only the fields it needs.

3

Automatic Calculations

The calculator converts units to a consistent internal scale and applies the correct formula instantly.

4

Review the Results

See gradient, grade, ratio, angle, or a full line equation, along with an engineering classification and the formula used.

Gradient Formulas

The five equations behind every calculation on this page.

Gradient

Gradient = Rise ÷ Run

Example: 5m rise over 20m run = 0.25 gradient.

Percentage Grade

Grade = (Rise ÷ Run) × 100

A 0.25 gradient is a 25% grade.

Incline Angle

Angle = arctan(Rise ÷ Run)

Trigonometric conversion from ratio to degrees or radians.

Line Equation

y = mx + b

m = slope, b = y-intercept, found from two known points.

Distance Between Two Points

Distance = √((x₂ − x₁)² + (y₂ − y₁)²)

Standard Euclidean distance formula, used alongside slope in coordinate geometry problems.

Step-by-Step Examples

Eight worked examples across common gradient and slope scenarios.

Example 1 — Road Gradient

Rise = 4 m, Run = 100 m Gradient = 4 ÷ 100 = 0.04 Grade = 0.04 × 100 = 4%

Example 2 — Roof Pitch

Rise = 4 units, Run = 12 units ("4-in-12" pitch) Gradient = 4 ÷ 12 = 0.333 Angle = arctan(0.333) ≈ 18.43°

Example 3 — Wheelchair Ramp

Rise = 1 m, Run = 12 m Gradient = 1 ÷ 12 = 0.0833 Grade = 8.33% (within common 1:12 accessibility standard)

Example 4 — Building Foundation

Rise = 0.3 m, Run = 15 m Gradient = 0.3 ÷ 15 = 0.02 Grade = 2% (standard drainage slope away from foundation)

Example 5 — Railway Slope

Gradient = 0.01 (a 1:100 railway gradient) Run = 500 m Rise = 0.01 × 500 = 5 m

Example 6 — Coordinate Geometry

Point A = (1, 2), Point B = (4, 8) Slope m = (8 − 2) ÷ (4 − 1) = 6 ÷ 3 = 2 y-intercept b = 2 − (2 × 1) = 0 Line Equation: y = 2x

Example 7 — Surveying Measurement

Rise = 12 m, Run = 60 m Gradient = 12 ÷ 60 = 0.20 Ratio = 1 : (60 ÷ 12) = 1:5

Example 8 — Civil Engineering Grade Check

Rise = 20 m, Run = 100 m Gradient = 20 ÷ 100 = 0.20 Grade = 20% — classified as a steep hill grade

Quick Reference Tables

Common gradients, grade-to-angle conversions, and typical engineering use cases.

Gradient Reference

RiseRunGradientGrade
1200.055%
2200.1010%
5200.2525%
10500.2020%
201000.2020%

Grade vs. Angle

GradeAngle
2%1.15°
5%2.86°
8%4.57°
10%5.71°
15%8.53°
20%11.31°

Engineering Uses by Grade

GradeApplication
0–2%Flat Ground
2–5%Roads
5–8%Driveways
8–12%Wheelchair Ramps
12–20%Hills
20%+Steep Slopes

Benefits of Using This Calculator

Why engineers, builders, and students rely on a dedicated gradient tool.

Instant Calculations

Every mode updates live as you type — no page reloads, no manual trigonometry.

📐

Accurate Engineering Formulas

Standard gradient, grade, ratio, and angle formulas applied precisely to your inputs.

🧮

Multiple Calculation Modes

Gradient, Rise, Run, Angle, and Line Equation calculators in one place.

🔁

Unit Conversion

Mix millimeters, meters, feet, and more — the calculator converts everything internally.

📱

Mobile-Friendly Design

Every field and result card is fully responsive across phones, tablets, and desktops.

🏗️

Construction-Ready Results

Grade classifications map directly onto real road, ramp, and drainage design standards.

Practical Applications

Real situations across engineering, construction, and education where gradient calculations matter.

  • Civil engineering — check road, drainage, and site grading figures against design standards.
  • Structural engineering — calculate slope angles for structural load and stability analysis.
  • Architecture — determine roof pitch and site grading for building plans.
  • Construction — verify grade compliance during excavation and site preparation.
  • Surveying — convert field elevation and distance readings into standard grade figures.
  • Road construction — plan and verify gradients against safety and design codes.
  • Railway engineering — check track gradients against strict railway-specific limits.
  • Landscaping — grade soil and hardscaping for proper water drainage away from structures.
  • Drainage design — maintain minimum gradient along pipe runs for gravity flow.
  • Roof pitch calculations — convert a rise-per-run roof pitch into grade or angle for material planning.
  • Wheelchair accessibility — verify ramp grade against accessibility standards before construction.
  • Mathematics education & DIY projects — work through slope, angle, and line equation problems step by step.
A B

Common Mistakes

Avoid these errors when calculating gradient, grade, or slope.

Confusing slope with angle

Slope is a linear ratio; angle is a trigonometric function of that ratio — doubling one does not double the other.

Mixing decimal slope and percentage grade

Treating a 0.2 gradient the same as a 0.2% grade is a factor-of-100 error — keep the two forms clearly distinguished.

Incorrect unit conversions

Dividing a rise in meters by a run in feet without converting first produces a meaningless gradient.

Using zero run values

A run of zero makes gradient mathematically undefined (division by zero) — a vertical line has no defined slope in this form.

Wrong coordinate order

Swapping which point is "point 1" and which is "point 2" without consistency changes the sign of intermediate values, though the final slope should stay correct if applied consistently.

Ignoring sign conventions

A negative rise (downhill) or negative slope carries meaning — dropping the sign loses information about direction.

Excessive rounding

Rounding rise, run, or intermediate ratios too early compounds small errors into a noticeably wrong final grade or angle.

Incorrect ratio interpretation

Misreading a 1:20 ratio as "20% grade" instead of the correct 5% is a common and easily avoidable mistake.

Frequently Asked Questions

Fifteen common questions about gradient, slope, and grade, answered directly.

What is a gradient?

A measure of steepness — the ratio of vertical rise to horizontal run between two points on a line or surface.

How do I calculate gradient?

Divide rise by run: Gradient = Rise ÷ Run. For example, a 5m rise over a 20m run gives a gradient of 0.25.

What is rise and run?

Rise is the vertical change between two points; run is the horizontal distance between those same points, measured in matching units.

What is percentage grade?

The decimal gradient expressed as a percentage: Grade = (Rise ÷ Run) × 100. A 0.25 gradient equals a 25% grade.

What is slope ratio?

Gradient expressed as 1:n, where n = Run ÷ Rise — for example, a 5% grade is a 1:20 ratio.

How is gradient different from angle?

Gradient is a linear ratio; angle is the trigonometric arctan of that ratio, so the two don't scale together proportionally.

What is a good road gradient?

Standard roads are typically designed in the 2–5% range for safe braking and traction, though this varies by road type and local design standards.

How do engineers use gradient?

For road and railway design, drainage planning, roof pitch, ramp accessibility compliance, and general site grading across civil and structural projects.

How do I calculate line slope?

Use m = (y₂ − y₁) ÷ (x₂ − x₁) for two points (x₁,y₁) and (x₂,y₂) — the same core formula as gradient.

Can I calculate roof pitch?

Yes — enter the roof's rise and run (such as 4 and 12 for a "4-in-12" pitch) into the Gradient or Angle Calculator mode.

Does this calculator support unit conversion?

Yes — rise and run can be entered in millimeters, centimeters, meters, kilometers, inches, feet, or yards, converted automatically.

Is this calculator accurate?

Yes — it applies standard gradient, percentage grade, ratio, angle, and line-equation formulas directly, with the formula shown alongside every result.

Is it free to use?

Yes, all five calculator modes are completely free with no sign-up required.

Does it work on mobile?

Yes — the layout and all input fields are fully responsive across phones, tablets, and desktops.

Why should I use this Gradient Calculator?

It removes unit-conversion and trigonometry errors, handles five related calculation types in one place, and shows the formula used for full transparency.

Calculate Gradient Instantly

Calculate slopes, incline angles, percentage grades, coordinate geometry, and engineering measurements using the calculator above.