Rafter length calculator
Work out rafter length, overhang, ridge height and the number of rafters for a gable roof from its span and pitch.
Rafter length
- Rafters (both sides)
- Ridge height above walls
- Roof angle
For a simple gable roof with a ridge board. Lengths are measured along the top edge of the rafter; buy lumber in the next longer stock length.
How to use it
Enter the building's width from the outside of one wall to the outside of the other, the roof pitch (inches of rise per 12 inches of run), and the overhang measured level from the wall. Add the ridge board thickness and the building length to count the rafters.
How it's calculated
- Run = half the building width − half the ridge board thickness, because each rafter stops at the face of the ridge.
- Pitch factor = √(1 + (rise ÷ 12)²).
- Rafter length to the wall = run × pitch factor.
- Overhang (tail) length = level overhang × pitch factor.
- Rafters per side = building length in inches ÷ spacing, rounded up, + 1. Double it for both sides.
| Pitch | Pitch factor | Angle |
|---|---|---|
| 4/12 | 1.054 | 18.4° |
| 6/12 | 1.118 | 26.6° |
| 8/12 | 1.202 | 33.7° |
| 10/12 | 1.302 | 39.8° |
| 12/12 | 1.414 | 45° |
With the defaults (24 ft wide, 6/12 pitch, 12 in overhang, 1½ in ridge), each rafter is 13 ft 4.2 in from ridge to wall plus 1 ft 1.4 in of overhang: 14 ft 5.6 in in all. A 16 ft board is the next stock length up.
Tips
- Cut one pattern rafter, test it at both ends of the building, then use it to mark the rest.
- The birdsmouth (the notch where the rafter sits on the wall) shouldn't cut more than about a third of the rafter's depth.
- Rafter size and spacing are set by the span, snow load and local code, not by this calculator. Check span tables or your building department for structural sizing.