Calculate slope length from rise, horizontal run, angle, percent grade, or pitch, and reverse-solve rise, run, and angle with common length units.

Vertical height difference. Enter a negative number for a drop; zero is level.

Optional settings

Length of Slope Formula and Calculator Guide

The length of slope is the straight diagonal distance along a right-triangle model. H is signed vertical rise or drop, R is nonnegative horizontal run, and LOS is nonnegative slope length. For positive run, S = H/R is the signed ratio used in the formulas. In the calculator, select degrees, percent grade or pitch rise per 12 and enter that format directly. OpenStax describes the underlying right-triangle relationships.

Variables

Variable Meaning Units and Input Convention
H Signed vertical rise or drop Positive uphill, negative downhill; select its length unit
S Signed rise/run ratio H/R Formula value; the input field instead uses selected degrees, grade or pitch
R Horizontal run Nonnegative distance; positive where division by run is required
LOS Straight slope length Nonnegative diagonal distance; mixed input units are converted consistently

Core Formulas

S = (H) / (R)
R = (H) / (S)
LOS = √(H² + R²)
LOS = √(H² + ((H) / (S))²)
LOS = |H|√(1 + (1) / (S²)) (S ≠ 0)

Common Slope Conversions

Match the selected input format rather than entering a raw ratio in every slope field. For example, enter 25 with Percent grade selected, not 0.25. The ratio S = 0.25 is the corresponding formula value. Pitch is signed rise per 12 units of horizontal run; a run:rise description must first be interpreted in that direction:

Given Description Calculator Entry Corresponding Ratio S
25% grade Select Percent grade; enter 25 S = 25/100 = 0.25
4:1 run:rise Select Percent grade; enter 25, or pitch 3 S = 1/4 = 0.25
2:1 run:rise Select Percent grade; enter 50, or pitch 6 S = 1/2 = 0.50
1:1 uphill slope Select Percent grade; enter 100, or pitch 12 S = 1.00
45° uphill angle Select Angle (degrees); enter 45 S = tan(45°) = 1; grade = 100%
S = (grade %) / (100)
S = tan(θ)

How to Use the Calculator

  1. Select slope length, rise (height), horizontal run or angle, then choose one of its three known-pair methods.
  2. Enter the visible required measurements with their individual ft, in, yd, m, cm or mm units. For a slope input, select degrees, grade or pitch and retain its sign.
  3. If slope length and run do not determine the sign of rise, select uphill or downhill. Choose output units and optional 0–6 decimal places; the default is 4.
  4. Read the calculated length, rise/drop, run, angle, grade, pitch and direction. Grade and pitch are undefined for vertical geometry with zero run.

Examples

Example 1: A slope rises 3 m with a 25% grade. Select the rise-and-slope method and enter 25 in Percent grade mode. The formula ratio is 0.25; the length below is shown rounded to two decimal places.

S = (25) / (100) = 0.25
R = (3) / (0.25) = 12 m
LOS = √(3² + 12²) = √(153) ≈ 12.37 m

Example 2: A slope rises 8 ft and is described as 2:1 run:rise. This is a 50% grade or pitch 6 per 12. Select the corresponding format and enter 50 or 6; the formula ratio is 0.5. The length below is rounded to two decimal places.

S = (1) / (2) = 0.5
R = (8) / (0.5) = 16 ft
LOS = √(8² + 16²) = √(320) ≈ 17.89 ft

Quick Checks

  • LOS is at least |H| and at least R. For vertical geometry, R = 0 and LOS = |H|. For level geometry, H = 0 and LOS = R.
  • Smaller |S| means a flatter slope. For a fixed nonzero |H|, decreasing the nonzero slope magnitude increases run and slope length.
  • Larger |S| means a steeper slope. For fixed nonzero |H|, slope length approaches |H| as the slope magnitude increases.
  • Zero slope can describe a level segment. Known positive run or length can determine that geometry. Zero rise together with zero angle alone cannot determine run or length; division by S is unavailable when S = 0.

Common Input Mistakes

Mistake Why It Causes Problems Correct Entry or Interpretation
Using 0.25 for a 25% grade input Percent grade and dimensionless ratio use different numerical values Select Percent grade and enter 25
Treating run:rise as rise/run The order of the two components is reversed For 2:1 run:rise, enter 50% grade or pitch 6 per 12
Ignoring the unit beside a field Equal numeric values can represent different distances Select each actual input unit; conversion is automatic
Confusing signed rise with slope length Rise/drop is vertical and signed; diagonal length is nonnegative Use the known-pair method and a separate direction choice when needed

Where This Calculation Is Useful

  • Roof layouts and rafter planning
  • Road, driveway, and ramp design
  • Landscaping and retaining wall grading
  • Drainage swales and ditch geometry
  • Earthwork and embankment takeoffs

FAQ

Is slope ratio the same as percent grade?
Not exactly. Percent grade is the slope ratio multiplied by 100.

grade % = 100S

What if my slope is given as an angle?
Select Angle (degrees) and enter the signed angle from horizontal directly. The corresponding internal ratio is S = tan(θ) when run is positive. Grade is 100S and pitch is 12S.

S = tan(θ)

Can I calculate horizontal run too?
Yes. Use any supported known pair. With nonzero rise and nonzero slope, R = H/S requires compatible signs and positive run. A zero-rise, zero-angle pair alone is underdetermined. Length with rise or angle can determine level or vertical limiting cases where the chosen method permits them.

R = (H) / (S)