How the rafter calculator works
run = span ÷ 2 − ridge ÷ 2
rafter length = (run + overhang) × pitch factor
ridge height = span ÷ 2 × tan(angle)
rafters = (⌊building length ÷ spacing⌋ + 1) × 2
The length is the line length along the top edge of the rafter, from the ridge face to the end of the overhang, measured horizontally. Add material for the cuts.
Worked example
Span 24 ft, 6/12 pitch, 1½ in ridge board and 12 in overhang: run = 12 − 0.0625 = 11.94 ft. (11.94 + 1) × 1.118 = 14.46 ft, so each rafter is about 14 ft 5⅝ in — cut from 16 ft stock. The ridge sits 6 ft above the wall plates, and a 40 ft building at 16 in centres needs 62 rafters.
Common spacings
| Region | Typical rafter spacing |
|---|---|
| US | 16 in or 24 in on centre |
| UK | 400 mm or 600 mm centres |
| Europe | 600–900 mm, depending on section |
Rafter size and spacing must suit the span, roof load and local code — check span tables or an engineer before cutting.
Frequently asked questions
How do I calculate rafter length?
Take half the building span, subtract half the ridge board thickness, add the horizontal overhang, then multiply by the pitch factor. For a 24 ft span at 6/12 with a 1½ in ridge and 12 in overhang: (12 − 0.0625 + 1) × 1.118 ≈ 14 ft 5⅝ in.
How many rafters do I need?
Divide the building length by the rafter spacing, add one for the end, then double it for both sides of a gable roof. At 16 in centres a 40 ft building needs 31 rafters per side, 62 in total.
What length of lumber should I buy?
Buy the next stock length above the calculated rafter length so you have material for the plumb and seat (birdsmouth) cuts — e.g. 16 ft boards for a 14 ft 6 in rafter.
What are the plumb and seat cut angles?
The plumb (vertical) cut meets the rafter edge at 90° minus the roof angle, and the horizontal seat cut of the birdsmouth meets it at the roof angle. For a 6/12 pitch that is 63.43° and 26.57° — so on a miter saw the plumb cut is a 26.57° setting from square.
Last reviewed: . Results are estimates — confirm quantities with your supplier before ordering.