Roof pitch and slope calculator: angle, grade and rise over run

Angle, percent grade and roof pitch (x in 12) from rise and run or from any one of them, with the sloped length and rafter factor.

Drafted with AI writing toolsUpdated Checked examples: 8

Negative for a downhill slope
Try
Angle
°
Angle: 26.5651 °
Maximum decimal places: 4; Nearest, ties away from zero
Grade
50%
Roof pitch
6:12
Ratio (rise : run)
1 : 2
Rise per unit of run
0.5
Rafter length factor
1.118034
Slope length
13.4164cm

This slope rises 0.5 for every 1 of run: 26.57° from horizontal, a 50 % grade, or a 6/12 roof pitch. Its sloped length is 13.4164 cm.

Slope profile, to scale

l = 12 cmh = 6 cm26.57°6:12 · 50 %
How it's calculated S
  1. Symbols

    h is the rise, l the horizontal run, g the percent grade, p the rise per 12 of run and f the rafter factor.

  2. Slope

    m=hl=612=0.5m = \frac{h}{l} = \frac{6}{12} = 0.5
  3. Angle

    θ=arctan⁡m=arctan⁡0.5=26.565051∘\theta = \arctan m = \arctan 0.5 = 26.565051^\circ
  4. Grade and pitch

    g=100m=50 %,p=12m=6:12g = 100m = 50\,\%,\qquad p = 12m = 6 :12
  5. Rafter factor

    1+m2=1+0.52=1.118034\sqrt{1 + m^2} = \sqrt{1 + 0.5^2} = 1.118034

    Multiply a horizontal run by this to get the sloped length.

  6. Slope length

    h2+l2=12×1.118034=13.416408 cm\sqrt{h^2 + l^2} = 12 \times 1.118034 = 13.416408\,\text{cm}

About the roof pitch and slope calculator

Every way of stating a slope comes from one ratio, m = rise ÷ run. The angle from horizontal is arctan m, the percent grade is 100m, the roof pitch is 12m (units of rise per 12 of run), and the rafter factor √(1 + m²) turns a horizontal run into the sloped length. Enter a rise and run, or any one of the other forms, and the rest follow.

The default rise of 6 over a run of 12 is a 6/12 roof: 26.57°, a 50% grade and a rafter factor of 1.1180, so 12 cm of run needs 13.4164 cm of rafter. Ramps and roads use the same numbers: the general maximum running slope in §405.2 of the US 2010 ADA Standards, 1:12, is an 8.33% grade, or 4.76°.

Percent grade is not an angle: a 100% grade is 45°, and a vertical face has no finite grade or pitch, so angles must lie between −90° and 90°. A negative rise describes a downhill slope.

How to convert roof pitch to degrees

A roof pitch of x/12 is a slope of m = x/12, and its angle is arctan m. A 6/12 roof has m = 0.5, so its angle is arctan 0.5 ≈ 26.57° and its grade is 50%. The same rise ÷ run ratio describes ramps, roads and the slope of a line.

Slope, angle, grade and pitch formulas

All four are ways of writing one ratio, m = rise/run, with the run measured horizontally:

QuantityFormula from slope mMeaning
Slopem = rise/runVertical change per horizontal unit
Angle θθ = arctan(m)Degrees from horizontal
Grade100m percentRise per 100 horizontal units
Roof pitch12m :12Rise per 12 horizontal units
Length factorsqrt(1+m²)Sloped length per horizontal unit

To go back from an angle, use m = tan θ. A 30° roof has m = tan 30° ≈ 0.5774, a pitch of about 6.93/12 and a 57.7% grade.

Common roof pitches in degrees

Each line gives the angle, the percent grade and the rafter length factor:

  • 2/12: 9.46°, 16.7%, 1.014
  • 3/12: 14.04°, 25%, 1.031
  • 4/12: 18.43°, 33.3%, 1.054
  • 5/12: 22.62°, 41.7%, 1.083
  • 6/12: 26.57°, 50%, 1.118
  • 7/12: 30.26°, 58.3%, 1.158
  • 8/12: 33.69°, 66.7%, 1.202
  • 9/12: 36.87°, 75%, 1.250
  • 10/12: 39.81°, 83.3%, 1.302
  • 12/12: 45°, 100%, 1.414

Rafter length from the run

Multiply the horizontal run by the length factor √(1 + m²). At 8/12 the factor is about 1.2019, so 10 ft of run needs a rafter about 12.02 ft long, before any overhang.

On a symmetrical gable roof, the run on each side is half the span: a building 24 ft wide has 12 ft of run per side.

Slope formula for two points

For a line through (x₁, y₁) and (x₂, y₂), m = (y₂ − y₁)/(x₂ − x₁), the rise divided by the run. From (3, −2) to (8, 1), the rise is 3 and the run is 5, so m = 0.6: a 60% grade at about 30.963757°, or a 7.2/12 pitch.

OpenStax's linear-functions lesson derives this formula. For the equation of the line as well, use the coordinate geometry calculator.

Checked slope examples

Values are rounded to six decimal places.

ExampleSlope mAngle °Grade %Pitch :12
default rise/run0.526.565051506
two-point differences0.630.963757607.2
downhill 3-4-5-0.75-36.869898-75-9
flat0000
mixed feet/inches14510012
one in twelve0.0833334.7636428.3333331

The downhill row drops 3 over a run of 4. Its minus sign records the descent, while the length along the slope stays a positive 5. The mixed-units row is a rise of 1 ft over 12 in, equal lengths, so it is 45°.

One in twelve is the general maximum running slope for a ramp under §405.2 of the 2010 ADA Standards: an 8.33% grade, about 4.76°.

A flat line has slope 0 and a length factor of 1. A vertical face has zero run, so its slope, grade and pitch are undefined; angles must stay strictly between −90° and 90°.

Common mistakes

  • Reading percent grade as degrees. A 50% grade is 26.57°, and 100% is 45°, not 90°.
  • Measuring the run along the roof. Pitch uses horizontal run. On an 8/12 roof, 8 divided by the 14.42 sloped length gives 0.5547, the sine of the angle, not the slope.
  • Using the full span as the run. Halve the width of a symmetrical gable roof first.
  • Mixing units. Convert rise and run to one unit before dividing; 1 ft over 12 in is 1:1, not 1:12.

Starting from rise and run, angle, grade or pitch

  • Rise and run: rise is negative for a downhill slope, and run must be greater than zero.
  • Angle, percent grade or pitch: any one of them gives all the others.
  • Sloped length needs an actual run, so it appears only when you start from rise and run.

Worked examples

Rise 6, run 12 (a 6/12 roof)

I know the
Rise and run
Rise
6 cm
Run (horizontal distance)
12 cm
Show results in
Centimetres (cm)
Angle
26.565051 °
Grade
50%
Roof pitch
6 :12
Ratio (rise : run)
1 : 2
Rafter length factor
1.118034
Slope length
13.416408 cm

Checked against: Independent calculation

45°

I know the
Angle
Angle from horizontal
45 °
Grade
100%
Roof pitch
12 :12
Ratio (rise : run)
1 : 1
Rafter length factor
1.414214

Checked against: tan 45° = 1

8 % road grade

I know the
Percent grade
Grade
8%
Angle
4.573921 °
Roof pitch
0.96 :12
Ratio (rise : run)
1 : 12.5

Checked against: degrees(atan(0.08)); 12 × 0.08; 1/0.08

4/12 roof pitch

I know the
Roof pitch
Pitch
4 :12
Angle
18.434949 °
Grade
33.333333%
Rafter length factor
1.054093

Checked against: degrees(atan(4/12)), sqrt(1 + 1/9)

Questions

How do you convert percent grade to degrees?

Take the arctangent of the grade divided by 100: θ = arctan(grade/100). An 8% road grade is arctan 0.08 = 4.57°, and a 100% grade is 45°, not 90°. The reverse is grade = 100 × tan θ, so a 30° slope is a 57.7% grade.

What angle is a 6/12 roof pitch?

26.57°. A pitch of x/12 means x units of rise for every 12 of run, so the angle is arctan(x/12): 4/12 is 18.43°, 6/12 is 26.57°, 8/12 is 33.69° and 12/12 is 45°. The rafter factor for 6/12 is √1.25 = 1.118, so 12 ft of horizontal run needs 13.42 ft of rafter before any overhang.

What is the maximum slope for a wheelchair ramp?

The general maximum running slope under the US 2010 ADA Standards (§405.2) is 1:12: one unit of rise for every 12 of run, an 8.33% grade or 4.76°. Each ramp run may rise at most 30 in (§405.6), so a 30 in rise needs at least 30 ft of horizontal run. Section 405.2 permits limited steeper slopes at existing sites where space is constrained: up to 1:10 for a rise of at most 6 in, or up to 1:8 for a rise of at most 3 in. Slope alone does not establish compliance; landings, width, cross slope and other requirements also apply. Other jurisdictions have their own building codes.

How do you calculate rise over run?

Divide the vertical rise by the horizontal run, both in the same unit: m = rise/run. A roof that rises 6 in over 12 in of run has m = 0.5. Measure the run horizontally, not along the surface: the sloped length here is 13.42 in, and dividing by it gives 0.447, the sine of the angle rather than the slope.

About this calculator

m=hl,θ=arctan⁡m,g=100m %p=12m:12,f=1+m2\begin{gathered} m = \frac{h}{l},\quad \theta = \arctan m,\quad g = 100m\,\% \\[6pt] p = 12m :12,\quad f = \sqrt{1 + m^2} \end{gathered}

Sources

  1. OpenStax College Algebra 2e, §4.1 — slope as rise over run
  2. US Access Board, ADA Standards §405.2 — ramp slope 1:12 (8.33 %)

Checked against references

This calculator includes 8 worked examples with independently sourced answers. They run in the test suite, and you can run them here too.

Put this calculator on your site

Paste this where you want the calculator to appear. It is free to use, it stays in step with corrections made here, and the credit line below it links back so your readers can find the full version.

Height
Preview the embed

Keep the credit line. It is the only condition, and it is what keeps these calculators free.