How it’s calculated
A common rafter runs from the ridge to the wall plate at the roof's pitch. Its run is half the span, less half the ridge board's thickness, and its length is the hypotenuse of the right triangle formed by that run and the rise. Pitch is the inches of rise per 12 in of horizontal run, so each foot of run needs √(1 + (pitch ÷ 12)²) feet of rafter.
Example: 24 ft span, 6/12 pitch, 1½ in ridge board, 12 in horizontal overhang. Run = 144 − 0.75 = 143.25 in. Factor = √(1 + 0.5²) = 1.1180. Ridge to plate line = 143.25 × 1.1180 = 160.16 in (13.35 ft); overhang = 12 × 1.1180 = 13.42 in; total = 173.58 in = 14.46 ft, so buy 16 ft stock. Rise = 144 × 0.5 = 72 in (6 ft). Angles: seat cut 26.57°, plumb cut 63.43°. For a 30 ft building at 16 in spacing: ⌈360 ÷ 16⌉ + 1 = 24 rafters per side, 48 in all.
This is geometry only. Rafter size, grade, spacing, ceiling joists or collar ties, and ridge support depend on span, snow and wind loads: use the span tables in your local building code or have an engineer design the roof. Add allowance for the bird's mouth, trimming and waste.
Frequently asked questions
How do I calculate rafter length?
Take half the span (less half the ridge thickness), multiply by the pitch factor √(1 + (pitch ÷ 12)²), and add the overhang times the same factor. A 24 ft span at 6/12 with a 12 in overhang gives about 14.46 ft.
Do I measure the span to the outside or the inside of the walls?
To the outside edges of the wall plates, because that is where the rafters bear. The overhang is then measured from that outside edge.
What are the plumb cut and seat cut angles?
The plumb cut is the vertical cut against the ridge board and the seat (level) cut is the horizontal notch on the plate. For a roof angle θ, the seat cut makes θ with the rafter edge and the plumb cut makes 90° − θ with it. A 6/12 roof is 26.57° and 63.43°.
What size rafters do I need?
That depends on span, spacing, species and grade, and on the snow and wind loads where you live. Use the rafter span tables in your local building code or ask an engineer; this calculator only finds lengths.
Embed this calculator
Add this free calculator to your own website. Copy the code below into your page’s HTML:
Need this calculator branded, changed or built around your own prices?See custom business solutions →
Sources
- Algebra and Trigonometry 2e, 7.2 Right Triangle Trigonometry (hypotenuse and angle from rise and run) — OpenStax
- Algebra and Trigonometry 2e, 4.1 Linear Functions (slope as rise over run) — OpenStax
- International Residential Code (free read-only access): rafter span tables, Chapter 8 Roof-Ceiling Construction — International Code Council
Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.
Added · Last updated · How we check our calculators
Spotted a mistake or missing option? Report a problem· Suggest a calculator