How rafter length is calculated
A rafter is the long side of a right triangle. The level side is the run and the vertical side is the rise. The pitch says how many inches the roof rises for every 12" of run, so the rafter length per foot of run is fixed for each pitch.
length = run × √(12² + pitch²) ÷ 12
For a gable roof the run is half the building width, minus half the ridge board thickness. A shed roof runs the full width. The overhang uses the same factor.
Length per foot of run
| Pitch | Angle | Rafter per ft of run |
|---|---|---|
| 3/12 | 14.0° | 12.37" |
| 4/12 | 18.4° | 12.65" |
| 6/12 | 26.6° | 13.42" |
| 8/12 | 33.7° | 14.42" |
| 10/12 | 39.8° | 15.62" |
| 12/12 | 45.0° | 16.97" |
The birdsmouth cut
The birdsmouth is the notch that lets the rafter sit flat on the wall. The seat cut is level and usually as wide as the wall plate. The heel cut is plumb, and its height is set by the pitch.
Keep the notch shallow. The IRC (R802.7.1) limits notches at a rafter's end to one quarter of its depth. On steeper roofs a seat as wide as the wall plate cuts deeper than that, so the calculator gives a shorter seat that stays within the limit. The seat still needs at least 1 1/2" of bearing (R802.6.1). The height above plate is the depth from the top of the wall to the top of the rafter, useful when matching rafters along the wall.
This calculator does not check whether a rafter can carry the load over its span. Use the rafter span tables in IRC chapter 8 for your snow load and lumber grade.
Questions
How long is a rafter for a 12 ft shed at 4/12?
For a gable with a 1 1/2" ridge, the run is 71 1/4". At 4/12 that is 75 1/8" plus 12 5/8" for a 12" overhang: 87 3/4" total. Buy 8 ft boards.
What does 6/12 pitch mean?
The roof rises 6 inches for every 12 inches it runs level, about 26.6°.
How many rafters do I need?
For each side, divide the building length in inches by the spacing and add one. A gable roof has two sides.