Roof Rafter Calculator
Calculate every rafter dimension for a gable roof from building span, pitch, and rafter spacing. The calculator computes: sloped rafter length using the Pythagorean formula (√(run² + rise²)), adds the horizontal overhang scaled by pitch multiplier, rounds up to the nearest standard board length to minimize waste, determines total rafter count for both sides of the roof, ridge board length, and estimates lumber cost by size. Rafter size depends on span and spacing — 2×8 handles most spans at 16" OC, but wide buildings or heavy snow loads may require 2×10 or 2×12. The ridge board is one size larger than the rafter (so if using 2×8 rafters, the ridge is a 2×10) and runs the full length of the building plus 1 foot each end for trim.
Quick Fill
Buy MaterialsAD
Top Pick2×8 Framing Lumber — Home Depotfrom $12.98/board* Affiliate links — we may earn a commission at no cost to you.
Related Calculators
How to Use This Calculator
- 1Enter your measurements in the fields above. Use the units shown next to each field (ft, in, etc.).
- 2Click Calculate to get your material estimate instantly.
- 3Review the highlighted result — it shows the key quantity you need to order.
- 4Use Copy Results to save your estimate, or bookmark the URL — your inputs are encoded in the link.
Pro tip: Always add 10% to your material order to account for waste, cuts, and defects.
Frequently Asked Questions
How long should rafters be for a 28-foot wide house?
A 28-foot span means each rafter covers a 14-foot run. At a 6/12 pitch, the rafter length is √(14² + 7²) ≈ 15.65 ft plus overhang. You'd buy 16-foot boards and cut to length.
What size lumber do I need for roof rafters?
Rafter size depends on span and spacing. For 16" OC spacing: 2×6 up to 13 ft, 2×8 up to 17 ft, 2×10 up to 21 ft, 2×12 up to 25 ft (Douglas fir #2). Always verify against your local span tables.
Do roof rafters need hurricane ties?
Yes, in most jurisdictions. Hurricane ties (rafter ties or H-clips) connect each rafter to the top plate to resist wind uplift. In high-wind and seismic zones, the code requires tested and rated connectors at every rafter. Even in low-wind areas, hurricane ties significantly improve the roof's ability to withstand severe storms.
What is a bird's mouth cut on a rafter?
A bird's mouth is a notch cut at the bottom of each rafter where it bears on the wall top plate. It creates a flat bearing surface so the rafter sits securely on the plate rather than bearing only on a corner. The horizontal cut (seat cut) should be no more than 1/3 the rafter depth, per code, to preserve structural integrity.