As an Amazon Associate I earn from qualifying purchases.
A stick-framed gable roof is a row of common rafter pairs leaning on a ridge board, held together by collar ties high up and by rafter ties or ceiling joists low down. The Roof Framing Calculator turns the building width, length, pitch, rafter spacing, rafter size and overhang into the framing list. Each rafter's run is half the width less half the 1 1/2 in ridge; times the pitch factor √(144 + rise²) ÷ 12 that gives the rafter on the measuring line, and the overhang times the same factor gives the tail. Rafter pairs are the length ÷ spacing + 1. The 2021 IRC (R802.3) requires the ridge board to be no shallower than the rafter's plumb cut — the rafter depth times the pitch factor — collar ties go in the upper third at 4 ft centres or closer (R802.4.6) and rafter ties or ceiling joists in the lower third (R802.5.2). A 24 × 40 ft house at 6/12 with 2×8 rafters at 16 in and 12 in overhangs needs 62 rafters 14 ft 5 9/16 in long (16 ft stock), a 42 ft 2×10 ridge, 11 collar ties, 31 ceiling joists, 42 sheets of decking and 41 bundles of shingles.
A stick-framed gable roof is a row of common rafter pairs leaning on a ridge board, tied by collar ties in the upper third (2021 IRC R802.4.6) and by rafter ties or ceiling joists in the lower third (R802.5.2). Each rafter runs half the building width less half the ridge thickness; the pitch factor √(144 + rise²) ÷ 12 converts that run to length. The ridge board must be at least as deep as the rafter plumb cut (R802.3), which is the rafter depth times the same factor.
| Width | Pitch | Rafter + tail | Stock | Ridge board |
|---|---|---|---|---|
| 20 ft | 4/12 | 11 ft 6.375 in | 12 ft | 2x10 |
| 24 ft | 4/12 | 13 ft 7.625 in | 14 ft | 2x10 |
| 24 ft | 6/12 | 14 ft 5.5625 in | 16 ft | 2x10 |
| 24 ft | 8/12 | 15 ft 6.5625 in | 16 ft | 2x10 |
| 24 ft | 12/12 | 18 ft 3.5625 in | 20 ft | 2x12 |
| 28 ft | 6/12 | 16 ft 8.4375 in | 18 ft | 2x10 |
| 28 ft | 8/12 | 17 ft 11.4375 in | 18 ft | 2x10 |
| 32 ft | 6/12 | 18 ft 11.25 in | 20 ft | 2x10 |
| Rafter | Actual depth | Plumb cut at 6/12 | Ridge at 6/12 | Plumb cut at 12/12 | Ridge at 12/12 |
|---|---|---|---|---|---|
| 2x6 | 5.5 in | 6.15 in | 2x8 | 7.78 in | 2x10 |
| 2x8 | 7.25 in | 8.11 in | 2x10 | 10.25 in | 2x12 |
| 2x10 | 9.25 in | 10.34 in | 2x12 | 13.08 in | LVL |
Halve the building width and take off half the ridge thickness for the run, multiply by the pitch factor √(144 + rise²) ÷ 12 for the rafter length, then add the overhang times the same factor for the tail. Count one rafter pair per spacing along the roof plus one. A 24 × 40 ft house at 6/12 with rafters at 16 in needs 31 pairs (62 rafters) about 14 ft 5 9/16 in long — 16 ft stock.
Roof length in inches ÷ rafter spacing, rounded down, plus one — then double it for both sides. A 40 ft roof at 16 in centres has 480 ÷ 16 + 1 = 31 rafter pairs, or 62 rafters; at 24 in centres it has 21 pairs.
The 2021 IRC (R802.3) requires a ridge board at least 1 in nominal thick and no shallower than the cut end of the rafters. A plumb cut is deeper than the rafter: a 2×8 (7 1/4 in) cut at 6/12 is 8.11 in deep, so the ridge has to be a 2×10. A ridge that carries load for a vaulted ceiling is a ridge beam and must be designed.
Usually 16 in or 24 in on centre. The rafter size, span, grade and snow load decide which — check the rafter span tables (IRC Tables R802.4.1(1)–(8)) before choosing, and pick roof sheathing rated for that spacing.
With a ridge board, yes. Rafter ties or ceiling joists in the lower third stop the rafters pushing the walls out (IRC R802.5.2), and collar ties in the upper third at no more than 4 ft on centre hold the rafters together at the ridge (R802.4.6).
Need the whole roof at once? The free roofing calculator works out roof area, squares, shingle bundles, underlayment, drip edge, ridge cap and installed cost from one set of measurements.