A gable roof is just pairs of identical boards leaning against a ridge. Get one of them right and the others are copies. This guide explains the words, shows how the rafter size is chosen, and walks through laying out, cutting and raising the rafters for a standard 8x10 gable shed. The shed designer does the same math for any size and pitch.
Rise, run and pitch
- Pitch is written as rise over 12: a 6/12 roof climbs 6 inches for every 12 inches it runs across. It is also the number you set on a speed square.
- Run is the horizontal distance a rafter covers. On a gable shed it is half the width, less half the thickness of the ridge board.
- Plumb cuts are the vertical cuts at the ridge and at the tail. They are square to the ground, not to the board.
- The birdsmouth is the notch where the rafter sits on the wall: a flat seat cut that rests on the top plate and a vertical heel cut against the outside of the wall.
- The tail is the part that hangs past the wall to form the overhang.
Steeper roofs shed water and snow faster and look taller; flatter roofs need less lumber. The shed roof pitch guide has the full chart, the minimum pitch for shingles and metal, and a calculator. For the 8x10, here is how pitch changes the rafter:
| Pitch | Plumb angle | Heel cut | Edge length | Board needed |
|---|---|---|---|---|
| 4/12 | 18.4° | 1-3/16" | 56-1/8" | 57-15/16" |
| 5/12 | 22.6° | 1-7/16" | 57-11/16" | 60" |
| 6/12 | 26.6° | 1-3/4" | 59-9/16" | 62-5/16" |
How big the rafters must be
Rafter size depends on the horizontal span, the spacing and the snow load where you live. The designer checks every roof with the reference design values for Spruce-Pine-Fir No. 2 lumber (875 psi in bending, a stiffness of 1,400,000 psi) under your snow load plus 10 psf of dead load, and it keeps both the bending stress and the sag inside the limits. The sag limit is the span divided by 180, the figure the model code allows for rafters steeper than 3/12 with no ceiling attached. On a lean-to at 3/12 or flatter the code falls back to the span divided by 240, and the designer uses that stricter limit there. On the 8x10 the rafter spans 47-1/4" horizontally, and a 2x6 at 16 inches on center is good for about 11' 11-1/8" at 30 psf of snow.
| Rafter | Spacing | 20 psf snow | 30 psf snow | 50 psf snow |
|---|---|---|---|---|
| 2x6 | 16" OC | 13' 9" | 11' 11" | 9' 8" |
| 2x6 | 24" OC | 11' 2" | 9' 8" | 7' 11" |
| 2x8 | 16" OC | 17' 5" | 15' 1" | 12' 3" |
| 2x8 | 24" OC | 14' 2" | 12' 3" | 10' |
| 2x10 | 16" OC | 21' 3" | 18' 5" | 15' |
| 2x10 | 24" OC | 17' 4" | 15' | 12' 3" |
How close is that to the code? The 2021 International Residential Code measures rafter spans the same way, along the horizontal, and has tables for Spruce-Pine-Fir No. 2 at 30 and 50 psf of ground snow load with 10 psf of dead load and no ceiling attached (Tables R802.4.1(3) and R802.4.1(5)). In every 2x6, 2x8 and 2x10 cell above, at 30 and 50 psf, the designer's number is the same as the code table or up to an inch shorter, never longer. The code has no 20 psf snow table to compare with.
Lay out a pattern rafter
Measure along the top edge of the board. Because the ridge cut and the tail cut are both plumb, the distance between them along the edge is the horizontal run divided by the cosine of the roof angle. For the 8x10 the run from the face of the ridge to the end of the tail is 53-1/4", and that comes to 59-9/16" along the edge. Each plumb cut adds a little length across the board, which is why a 2x6 needs 62-5/16" of lumber.
The seat of the birdsmouth is as wide as the wall, 3-1/2", which gives a heel cut 1-3/4" deep at 6/12. The designer warns you when the heel passes one third of the rafter depth, a common framing rule of thumb; on a 2x6 that is 1-13/16", so this one is fine. The model code's own test is different: on a rafter with an overhang, at least 3-1/2 inches of rafter has to remain above the notch, and the overhang cannot run more than 24 inches (2021 IRC, section R802.7.1.1). A 2x6 with a 1-3/4" heel leaves more than that.
The tail is 6-11/16" along the edge for a 6 inch horizontal overhang.
Cut and raise the roof
- Pick the pitch and rafter size. Choose the roof pitch, then check the rafter size against the horizontal span and your snow load before you buy lumber.
- Choose a straight board for the pattern. Sight down the boards and pick the straightest one. Mark the crown, the edge that bows up, and keep it on top.
- Mark and cut the ridge plumb cut. Set a speed square to the pitch on the top edge and draw the plumb line at the ridge end, then cut it.
- Measure to the heel and mark the birdsmouth. Measure the length along the edge from the ridge cut to the heel plumb line, draw it, then mark the seat cut square to it across the width of the wall plate.
- Mark and cut the tail. Measure the tail length past the heel line and draw a second plumb line for the tail cut.
- Test the pattern on both walls. Hold the pattern and a scrap ridge block in place on both sides of the shed. Adjust the pattern, not the building.
- Trace and cut the rest. Trace the pattern on the remaining boards, crowns up, and cut them all the same way.
- Raise the ridge and the rafters. Set the end rafter pairs with the ridge board between them, check the ridge for level and the gable ends for plumb, then fill in the rafters on layout and fasten the ties and connectors.
The 8x10 takes 18 rafters, 9 pairs at 16 inches on center, on a 2x8 ridge board 10' long. The ridge board is one size deeper than the rafters so the whole plumb cut bears against it. The model code sets the minimum: a ridge board at least 1 inch nominal thick and no shallower than the cut end of the rafter. A 12x16 needs 26 rafters, each 86-3/8" along the edge from 89-1/8" of 2x6.
Ties and connectors
A ridge board does not hold the roof up by itself. It is the rafter ties, joining each pair of rafters at the top of the walls, that stop the rafters from pushing the walls apart. The model code says the same thing: the roof needs continuous ties across the building, and without them the ridge has to be a beam designed to carry the roof. The designer adds a 2x4 tie at every rafter pair, 9 ties at 96" for the 8x10, with the ends cut to the roof slope. They are ties, not floor joists: if you want storage up there, frame it as a loft, as the shed loft guide explains.
The designer also lists a metal rafter-to-plate connector, often called a hurricane tie, at every bearing. The model code asks every roof to resist wind uplift, and it allows plain toe-nailing (for example three 16d box or three 10d common nails per rafter) only when the uplift on each rafter is 200 lb or less, or where the wind speed is 115 mph or less and the roof meets a short list of other conditions, including a 5/12 or steeper pitch (2021 IRC, section R802.11). A connector at every rafter takes that question off the table.
Lean-to rafters
A lean-to roof has one slope, so every rafter is a single board that runs from the tall front wall to the short back wall, with a birdsmouth at each end. There is no ridge and no thrust, so no ties. For a 10 ft wide, 8 ft deep lean-to at 3/12, each rafter is 111-5/16" along the edge, cut from 112-11/16" of 2x6, with 7/8" heel cuts, and the back wall comes out at 6' 2".
Next, sheath the roof, add drip edge and underlayment, and shingle or panel it. The wall framing guide covers the gable end studs that go in once the rafters are up.
Questions people ask
Work out the pitch and the horizontal run, cut one pattern rafter with the ridge plumb cut, the birdsmouth and the tail, test it on the building, then trace it onto every other board. Our shed designer gives you the lengths and cut depths for your size.
16 inches on center is the designer's default, and 7/16 inch OSB or 1/2 inch plywood covers it easily. 24 inches works too if the rafters are sized for it: in the model code's sheathing table, a 7/16 inch panel with a 24/16 span rating spans 24 inches on a roof with or without edge clips, for up to 40 psf of live load, and a 1/2 inch 32/16 panel spans 28 inches without them.
2x6 for most sheds. A 2x4 can carry the load on a small shed, but the model code only lets you notch the overhang of a rafter if at least 3-1/2 inches of rafter is left, and a 2x4 is only 3-1/2 inches deep. A 2x6 also leaves room for insulation. Our designer starts every roof at 2x6 and steps up from there when the span needs it.
On a small shed with a short span, the lumber itself can be strong enough: by the same calculation we use, a Spruce-Pine-Fir No. 2 2x4 at 16 inches on center spans about 8' 1" under a 30 psf snow load. The catch is the birdsmouth. With an overhang, the 2021 International Residential Code (section R802.7.1.1) wants at least 3-1/2 inches of rafter left above a notch on the tail, and a 2x4 is only 3-1/2 inches deep, so a notched 2x4 with an overhang does not meet it. Check with your building department before you rely on 2x4 rafters.
It depends on the species, grade, spacing and snow load. For Spruce-Pine-Fir No. 2 at 16 inches on center with a 30 psf snow load and 10 psf dead load, our bending and deflection check gives about 8' 1" of horizontal span, and the 2021 International Residential Code table for a 30 psf ground snow load gives 8 ft 2 in for the same lumber and spacing. Your local span table is the one that counts.
We do not have price data that settles it. Cutting your own rafters lets you start the same day with lumber from the yard. Trusses come built to size from the maker and save the cutting, but they have to be ordered and delivered. Compare a local truss quote with the rafter lumber on your materials list.
Sources
The figures in this guide that do not come from our own shed designer were checked against these 6 pages and documents. The date shows when we read each one.
- International Code Council2021 International Residential Code, Chapter 3: Building PlanningRead
- International Code Council2021 International Residential Code, Chapter 5: FloorsRead
- International Code Council2021 International Residential Code, Chapter 6: Wall ConstructionRead
- International Code Council2021 International Residential Code, Chapter 8: Roof-Ceiling ConstructionRead
- Southern Pine Inspection BureauNominal Vs Actual Lumber SizesRead
- STRUCTURE magazineRobust Lumber Specifications on Construction DocumentsRead