Framing basics: rafter layout, hips and deck joists
Roofs and decks are framed from a few right triangles and one span table. Here is the layout logic behind each framing calculator, with worked examples.
Common rafters: one triangle, repeated
A common rafter runs at right angles from the wall plate to the ridge. Its level distance is the run — on a gable roof, half the building width measured across the outside of the wall plates, less half the ridge board’s thickness. The pitch is the rise for every 12 in of run, so a 6/12 roof climbs 6 in per foot. Multiply any level distance by the slope factor and you have the length along the slope; that works for the main rafter and for the overhang alike.
run = building width ÷ 2 − ½ ridge thickness slope factor = √(1 + (pitch ÷ 12)²) rafter line length = (run + overhang) × slope factor
The result is a line length along the top edge, not the board you buy. A plumb-cut tail reaches past the end of that line by the rafter depth × pitch ÷ 12, and you want about an inch more to square the factory end. That is why a rafter that measures a hair under 8 ft often needs a 10 ft board. Rafter length for a 12 ft shed at 4/12 walks through a backyard shed, and Rafter length for a 24 ft span at 6/12 pitch a two-car garage.
Birdsmouth and height above plate
Where the rafter sits on the wall it gets a birdsmouth: a level seat cut that bears on the top plate and a plumb heel cut against the outside of the wall. What stays above the heel, measured plumb at the wall line, is the height above plate (HAP). Keep the HAP identical on every rafter and the roof plane comes out flat; mark it on a pattern rafter and copy the pattern.
Two numbers keep the seat honest. The 2021 IRC draws the birdsmouth notch with a maximum depth of one quarter of the rafter depth, measured square to the rafter (Figure R802.7.1.1), and asks for at least 1½ in of bearing on wood (R802.6). A full-width seat on a 2×6 rafter at 6/12 cuts deeper than that quarter, so either shorten the seat or go to a 2×8 — the rafter length calculator checks it for you. The ridge board must be at least as deep as the rafter’s plumb cut (R802.3), which is deeper than the rafter itself on any pitched roof.
Hips, valleys and the 16.97 rule
On an equal-pitch hip roof the hips run at 45° across each corner. While a common rafter moves 12 in toward the ridge, the hip moves 12 in in both directions at once — √(12² + 12²) = 16.97 in of level run — and climbs the same rise. So you lay out a hip with 17 on the framing square (or the HIP-VAL scale on a speed square) where a common uses 12. The hip and valley rafter calculator gives the length, the cheek cuts and how far to drop the hip so the sheathing lies flat.
Hips and valleys are where roofs need real support. The IRC asks for hips and valleys to be braced at the ridge down to a bearing wall, or designed to carry that load (R802.4.3), and below a 3/12 pitch the ridge, hips and valleys have to be designed as beams (R802.4.4).
Jack rafters and the common difference
Jacks are the shortened commons that run from the wall plate up to the hip. Because they sit at a fixed spacing along the wall, each jack is longer than the last by the same amount — the common difference, which is the spacing × the slope factor. At 8/12 with jacks 16 in on center that is 16 × 1.202 = 19.23 in. Each jack is also shortened at the hip by half the hip’s thickness measured at 45°. The jack rafter calculator lists every cut length.
Deck joists: span is face to face
A deck joist span is the clear distance it bridges: from the face of the ledger (the board bolted to the house) to the face of the beam, or beam to beam. Anything past the beam is a cantilever, limited separately by the back span behind it. The 2021 IRC gives both in Table R507.6, by species group, joist size, spacing and load. How far can a 2x8 deck joist span and How far can a 2x10 deck joist span show where the common sizes land, and why the species on the grade stamp matters.
The decking sets the spacing too. Under Table R507.7, 5/4 wood decking laid square to the joists needs joists 16 in on center or closer (where each board crosses at least three joists), while 2 in wood decking allows 24 in; composite boards follow their label. Once the framing is settled, How many deck boards for a 12x16 deck counts the surface boards.
Deck stairs hang off the same frame
Stair stringers are cut from 2×12s and hang from the deck rim with sloped hangers or a hanger board; DCA 6 also limits a cut stringer to 6 ft of horizontal span and keeps them at most 18 in apart. The bottom bears on footings, not on a pad that isn’t founded below frost depth. How many steps for a 3 ft deck works one through, and the stair layout guide shows the marking.
A sensible order of work
- Measure what is really there — building width across the plates at both ends, deck height at the landing spot — rather than what the plan says.
- Work out the geometry: rafter, hip and jack lengths, or joist span and stair layout.
- Check the code limits for your edition and jurisdiction: span tables, notch limits, bearing, spacing.
- Cut one pattern piece, test it in place at both ends, then cut the rest from it.
- Sight each board and put the crown (the bow) up on rafters and joists.
Framing lumber is sold by the piece at most yards, so the last step is a shopping list: the cut list calculator turns your pieces into boards, and Lumber words explained covers the vocabulary along the way.
Frequently asked questions
What is the slope factor for a 6/12 roof?
√(1 + 0.5²) = 1.118. Every foot of level run becomes 13.42 in of rafter along the slope.
Why does a hip rafter use 17 instead of 12?
A hip runs diagonally across a 12 × 12 square for every foot a common rafter runs, and that diagonal is 16.97 in. It rises the same amount over that longer run, so the hip uses 17 where a common uses 12.
Where is a deck joist span measured from?
From the face of the ledger or rim to the face of the beam — the clear gap the joist bridges. Any length past the beam is a cantilever and is checked separately against the back span.
Sources
- International Code Council, 2021 International Residential Code, Chapter 8 Roof-Ceiling Construction (opens in a new tab) — R802.3 ridge depth, R802.4.3 hip and valley support, R802.4.4 roofs under 3/12, R802.6 bearing, R802.7.1 and Figure R802.7.1.1 rafter notches
- International Code Council, 2021 International Residential Code, Chapter 5 Floors (opens in a new tab) — R507 decks: Table R507.6 deck joist spans and cantilevers, Table R507.7 decking and joist spacing
- American Wood Council, DCA 6 Prescriptive Residential Wood Deck Construction Guide (opens in a new tab) — How a joist span is measured; deck stair stringers
- US Navy NAVEDTRA 14044, Builder — Chapter 2, Roof Framing (public domain) (opens in a new tab) — Common, hip and jack rafter layout; the common difference of jacks