RAFTER LENGTH
About this calculator
This rafter length calculator gives you the cut length for a common rafter on a gable roof based on building width, roof pitch, and eave overhang. Run is half the building width (rafter spans from outside the wall plate to the ridge). Rise is run × pitch/12. The diagonal length (ridge length minus 1/2 ridge board thickness, but uncorrected here) is the Pythagorean √(run² + rise²) — this calculator returns the total along-the-slope length including the eave overhang, which is the length to mark on the rafter stock. You still need to subtract half the ridge board thickness from the upper end for a precise plumb cut, and lay out the bird's-mouth seat cut at the wall. ESTIMATE ONLY — verify with a stamped roof plan; structural rafter sizing depends on snow load and ceiling joist tie capacity. Rafter span tables and pitch rules come from IRC Chapter 8.
How to use this calculator
Enter the building width in feet — this is the outside-to-outside distance perpendicular to the ridge, not the rafter length itself. Each rafter spans half the building width plus the overhang. Pick the roof pitch in rise per 12 inches of run: 4/12 is a low-slope ranch, 6/12 is conventional residential, 12/12 is 45° (steep, requires safety equipment to walk).
Enter eave overhang in inches — 12 inches is typical for shadow line and weather protection, 18–24 for more shade and rain shedding, 6 inches or less if you're matching an existing house. The calculator returns the along-the-slope rafter length (mark this on the lumber), the plumb-cut angle for the ridge end, and the recommended stock length to buy.
Worked example
For a 24 ft wide building with 6/12 pitch and 12-inch overhang:
Run = 24 ÷ 2 = 12 ft. Rise to ridge = 12 × (6/12) = 6 ft. Pitch factor = √(36 + 144) ÷ 12 = √180 ÷ 12 = 1.118.
Slope length (no overhang) = 12 × 1.118 = 13.42 ft. Overhang along slope = 12 × 1.118 = 13.4 inches = 1.12 ft. Total rafter length = 13.42 + 1.12 = 14.54 ft.
Plumb-cut angle = arctan(6/12) = 26.57°. Stock to buy: 16-foot 2x10 or 2x12 (allow 1 ft for cut waste and the seat cut at the wall).
For a steeper 9/12 pitch on the same 24-ft building: pitch factor = √(81+144) ÷ 12 = 1.25. Slope = 12 × 1.25 = 15 ft. Total with overhang = 16.25 ft → buy 18-foot stock.
Common mistakes & waste factors
Forgetting to subtract half the ridge board thickness from the upper end. The calculator returns the length to the ridge centerline; the actual cut needs to be ¾ inch shorter (half of a 1½-inch ridge board) for the rafter to butt cleanly.
Using building width as run. Run is HALF the building width — one rafter spans from outside the wall plate to the ridge, not all the way across.
Underestimating rafter SIZE for snow load. Length is geometry; size (2x10 vs 2x12, etc.) depends on snow load, span, and spacing per AWC span tables. The calculator handles geometry only — verify the size with a stamped roof plan or local building department.
Skipping the bird's-mouth seat cut. The rafter must sit flat on the wall plate — this requires a notch (bird's mouth) cut at the wall location. Forgetting this leaves the rafter resting on a knife edge.
Rules of thumb
Pitch factor: 3/12 = 1.031 · 4/12 = 1.054 · 6/12 = 1.118 · 8/12 = 1.202 · 9/12 = 1.250 · 12/12 = 1.414.
Rafter length = (run × pitch factor) + (overhang × pitch factor / 12).
Plumb-cut angle = arctan(pitch / 12). 6/12 = 26.6°. 12/12 = 45°.
Buy stock at least 1–2 ft longer than calculated rafter length to allow for cut waste, plumb cut, seat cut, and an oops factor.
Standard residential rafter sizing (verify with span tables): 2x8 spans 12–14 ft at 16" o.c.; 2x10 spans 16–18 ft; 2x12 spans 20–22 ft.
Common questions
Tool and material links below are affiliate links — we may earn a small commission if you buy, at no extra cost to you.