How long should my rafters be? Calculate rafter length, birdsmouth cuts, and lumber quantities for gable roofs. Enter span, pitch, and spacing for exact dimensions.
Rafter Details
Building Span (ft)
Building Length (ft)
Roof Pitch
Rafter Spacing
Overhang (in)
Lumber Size
Lumber Species
Ready to calculate
Enter your rafter details for dimensions and costs
Last updated March 2026 by our expert review team
Based on a 24 ft building span (12 ft run). Excludes overhang.
Ehsan Ghazanfari
Licensed Structural Engineer
FISE-certified structural engineer with 11+ years designing bridges, retaining walls, and foundations. MSc from Aalto University.
See full profileHawkin
Certified Cost & Estimating Professional
AACE-certified estimator working with 20+ insulation companies including the two largest franchises in America.
See full profileUpdated March 2026
How we verify our calculatorsBirdsmouth seat cut should never exceed one-third of the rafter depth. IRC R802.6 limits the notch to maintain load capacity.
Always install rafters crown up. Sight down each board and mark the crown with an arrow. The natural bow resists gravity loading better.
Add blocking between rafters at the wall plate to prevent rafter roll. 2x blocking at 4-foot intervals keeps framing plumb under wind and snow loads.
Eave overhangs beyond 24 inches need lookout rafters or outriggers for support. An unsupported 36-inch overhang will sag within 2 to 3 years. Our deck calculator uses similar framing principles.
Collar ties connect opposing rafters in the upper third of the roof. They resist ridge separation under wind uplift. For spread resistance, use rafter ties at the plate line.
Use our roofing calculator after framing to estimate shingles, underlayment, and ridge caps for your new roof.
Enter the building span (wall to wall), roof pitch, and rafter spacing.
Select lumber size and species. Add overhang if your eaves extend past the wall.
Get rafter length, birdsmouth dimensions, total board feet, and lumber cost.
Formulas
Rafter Length = sqrt(run² + rise²)
Run = span / 2
Rise = run x (pitch / 12)
How do I calculate rafter length?
Use the formula: rafter length = square root of (run squared + rise squared). For a 24 ft span with a 6/12 pitch: run = 12, rise = 6, rafter = 13.42 ft.
What size lumber for rafters?
2x6 handles spans up to 12 ft, 2x8 for 12 to 18 ft, 2x10 for 18 to 22 ft, and 2x12 for 22 to 26 ft. Always check IRC span tables for your species, grade, and load requirements.
What is a birdsmouth cut?
A notch cut where the rafter sits on the wall plate. It consists of a horizontal seat cut and a vertical plumb cut. The seat cut should never exceed one-third of the rafter depth.
Should rafters be 16 or 24 inches on center?
16 inches on center is the standard for residential roofs. 24 inches on center works for 2x10 or larger on low-pitch roofs with light snow loads.
How do I determine roof pitch?
Place a level against the rafter or roof deck and measure the rise over 12 inches of horizontal run. A 6-inch rise over 12 inches of run equals a 6/12 pitch.
What is HAP?
Height Above Plate. It is the portion of the rafter that sits above the top plate after the birdsmouth is cut. Minimum HAP is 3.5 inches for proper bearing.
How many rafters do I need?
Divide the building length by the spacing (in feet), add 1, then multiply by 2 for both sides. A 40 ft building at 16 inches on center needs 62 rafters.
Can I use engineered lumber for rafters?
Yes. LVL (laminated veneer lumber) spans farther than solid sawn but costs 2 to 3 times more. It is best for spans over 26 ft or where clear-span is required. Use our board foot calculator for pricing.
A simple shed with a low pitch. Short rafters keep lumber costs minimal. Budget $21 to $34 in SPF.
Standard residential gable roof. The 6/12 pitch gives a 26.6-degree angle. Budget $290 to $464 in SPF.
A 45-degree roof angle creates dramatic cathedral ceilings. Requires 2x12 rafters for the long span.
Wide spacing at 24" OC with 2x10 rafters. Low pitch keeps rafter length close to the run.
Using full span instead of half span for run
The run is always half the building span. A 24 ft span has a 12 ft run. Using 24 ft as the run doubles your rise calculation and makes every cut wrong.
Forgetting overhang adds length along the slope
A 12-inch horizontal overhang adds more than 12 inches to the rafter. The overhang extends along the slope, so divide by cos(roof angle) to get actual rafter addition.
Cutting birdsmouth deeper than 1/3 of rafter depth
IRC R802.6 limits the birdsmouth to one-third of the rafter depth. A deeper cut weakens the rafter at the bearing point and can cause a structural failure.
Not deducting half the ridge board thickness
Each rafter meets a ridge board (typically 1.5 inches thick). Deduct 0.75 inches from each rafter length at the ridge end for a proper fit.
Using wrong pitch for overhang calculation
The overhang dimension is horizontal distance, but the rafter extension runs along the slope. Convert horizontal overhang to slope distance using the pitch angle.
Important Disclaimer
These estimates are for planning purposes only. Actual costs vary by location, material availability, and project complexity. Always get at least 3 local quotes. This calculator does not replace professional advice.