Shed Roof Calculator

How we build and test

Enter the width and length of the building, the pitch and the overhangs of a single-slope roof to get the rafter length, the rise from the low wall to the high wall, the roof angle, the number of rafters and the roof area. A single-slope shed roof is also called a lean-to roof.

Outside of the low wall to outside of the high wall, measured level.

in 12
in

Measured level, out from the wall.

in

Measured level, out from the wall.

The side the rafters are spaced along.

in
$

Rafter length

Enter the building width, the length and the roof pitch.

What this calculator does

  • Rafter length for a lean-to or shed roof from width, pitch and overhangs
  • Rise, roof angle, number of rafters and the stock length to buy
  • Roof area in square feet and squares, and rafter cost from your price per board

How to use the shed roof calculator

  1. Enter the building width the rafters span, measured level from the outside of the low wall to the outside of the high wall. For a lean-to against a house, measure from the house wall to the outside of the outer wall.
  2. Enter the pitch as inches of rise per 12 in of run.
  3. Enter the overhang at each end, measured level. Use 0 at the high end of a lean-to that butts into a wall.
  4. Enter the building length, the rake overhang and the rafter spacing.

Formulas

Pitch factor = √(1 + (pitch ÷ 12)²)
Rise = building width × pitch ÷ 12
Rafter length = (building width + high overhang + low overhang) × pitch factor
Roof angle = arctan(pitch ÷ 12)
Rafters = building length (in) ÷ spacing (in), rounded up, + 1
Roof area = rafter length × (building length + 2 × rake overhang)

The pitch factor is the sloping length for each foot of level run, from the right triangle made by the run, the rise and the rafter. The rafter length is measured along the top edge from the plumb cut at one end to the plumb cut at the other. The rise is how much higher the top of the high wall sits than the top of the low wall when both get the same seat cut.

Worked example: a 12 × 16 ft shed with a 4 in 12 roof

  1. Pitch factor: √(1 + (4 ÷ 12)²) = √1.1111 = 1.0541. The angle is arctan(4 ÷ 12) = 18.4°.
  2. Rise: 12 × 4 ÷ 12 = 4 ft, so the high wall is 48 in taller than the low wall.
  3. Rafter between the wall outsides: 12 × 1.0541 = 12.65 ft, or 12 ft 7 13/16 in.
  4. Rafter with both 12 in overhangs: (12 + 1 + 1) × 1.0541 = 14.76 ft, or 14 ft 9 1/16 in. Buy 16 ft boards.
  5. Rafters: 192 ÷ 16 = 12, plus 1 = 13 rafters, plus 2 fly rafters for the rake overhangs.
  6. Roof area: 14.76 × (16 + 1) = 251 ft², or 2.51 squares.

Rise and rafter length for a 12 ft wide building

Pitch Angle Rise Rafter, wall to wall
1 in 12 4.8° 12 in 12 ft 0 1/2 in
2 in 12 9.5° 24 in 12 ft 2 in
3 in 12 14.0° 36 in 12 ft 4 7/16 in
4 in 12 18.4° 48 in 12 ft 7 13/16 in
5 in 12 22.6° 60 in 13 ft 0 in
6 in 12 26.6° 72 in 13 ft 5 in

The lengths are without overhangs. Add the overhang times the pitch factor at each end.

Pitch, roofing and rafter size

The roofing sets the lowest pitch you can use. Under IRC section R905.2.2, asphalt shingles may only go on slopes of 2 in 12 or steeper, and from 2 in 12 up to 4 in 12 they need a double layer of underlayment. Metal panels and membrane roofing can go lower, each to the minimum slope in the code and the product instructions.

This calculator gives lengths and counts. It does not size the rafters. The depth and spacing a rafter needs for its span depend on the lumber grade and on the snow and roof loads where you live, and come from the rafter span tables in chapter 8 of the IRC (section R802.4.1, which measures the span along the level run of the rafter), your local code or an engineer. A lean-to fixed to a house also needs a properly fastened and flashed ledger.

Questions

How do I calculate rafter length for a shed roof?

Add the overhangs to the building width to get the total level run, then multiply by the pitch factor. For a 12 ft wide shed with 12 in overhangs at 4 in 12: 14 × 1.0541 = 14.76 ft, or 14 ft 9 1/16 in.

How much taller should the high wall be on a shed roof?

Multiply the building width in feet by the pitch. A 12 ft wide shed at 4 in 12 needs the high wall 12 × 4 = 48 in taller than the low wall.

What is the minimum pitch for a shed roof?

It depends on the roofing. Asphalt shingles need 2 in 12 or steeper. Many metal panel and membrane systems are rated for lower slopes, so check the instructions for the product you plan to use.

Sources

  1. 2021 International Residential Code, Chapter 9 Roof Assemblies, Section R905.2.2 Slope, International Code Council.
    Used for: asphalt shingles only on roof slopes of 2:12 or greater, with double underlayment required from 2:12 up to 4:12.
  2. 2021 International Residential Code, Chapter 8 Roof-Ceiling Construction, Section R802.4.1 Rafter size, International Code Council.
    Used for: rafters sized from the span tables R802.4.1(1) through R802.4.1(8), with the span measured along the horizontal projection of the rafter.

Related calculators