How to use the rafter calculator
- Enter the span: the distance between the outside faces of the two walls.
- Enter the building length along the ridge and choose the rafter spacing.
- Pick the roof pitch (rise per 12 inches of run).
- Enter the overhang, measured level from the wall, and the ridge board thickness.
- Prefer metric? Tap Metric above the form to enter meters, centimeters and millimeters and get results in cubic meters, square meters and tonnes.
Formula
Run = span ÷ 2 − ridge thickness ÷ 2
Rafter length = (run + overhang) × √(1 + (rise ÷ 12)²)
Ridge height = run × rise ÷ 12. Rafters per side = building length × 12 ÷ spacing, rounded down, + 1
Worked example
A 24 ft span with a 6/12 pitch, 12 inch overhang and 1.5 inch ridge board gives a run of 11.94 ft and a rafter length of 14.46 ft (about 14 ft 5-1/2 in), so buy 16 ft boards. The ridge sits 5.97 ft above the walls. A 40 ft building at 16 inches on center needs 62 rafters.
Tips before you buy
- The length shown is the line length along the slope. Seat cuts and plumb cuts are marked from it on the board.
- Rafter size depends on span, spacing, wood species and snow load. Use span tables or your local building department.
- Add rafters for gable overhangs (barge rafters) if your design uses them.
- Always check the result against a test rafter before cutting the whole set.
Frequently asked questions
How do I calculate rafter length?
Find the run (half the span minus half the ridge), add the level overhang, and multiply by √(1 + (pitch ÷ 12)²).
How many rafters do I need?
Divide the building length in inches by the spacing, round down, add one, and double it for both sides of the roof.
What is the run of a rafter?
The level distance the rafter covers, from the outside of the wall to the center of the ridge, minus half the ridge board.
Can rafters be spaced 24 inches apart?
Sometimes. It depends on the rafter size, span, roof load and sheathing. Check span tables and local code.
Last updated: