RAFTER LENGTH · REVIEWED MAY 2026 · BY BRENT

RAFTER LENGTH

L = √(run² + rise²) + overhang·factor
ft
in
RESULT
FILL IN ABOVE
Length is along-the-slope from ridge to overhang tip. Subtract half ridge-board thickness for actual cut. Verify rafter SIZE with engineered plans or AWC tables.
RECOMMENDED TOOLS
Carpentry Tools we recommend for projects like this

About this calculator

rafter² = run² + rise² run (horizontal) rise rafter (hypotenuse) pitch
Right triangle showing the rafter as the hypotenuse, run on the horizontal leg, and rise on the vertical leg; angle equals roof pitch

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.

How do I figure rafter length from pitch and run?
Multiply the run (half the building width) by the pitch factor √(pitch² + 144) ÷ 12. For a 24-ft-wide building with 6/12 pitch, run is 12 ft and the pitch factor is √(36+144)/12 ≈ 1.118, so the slope length from ridge to wall is 12 × 1.118 ≈ 13.4 ft. Add the eave overhang along the slope to get the total rafter length to cut. Always verify against the architect or engineer's roof plan. A Speed Square has the pitch tables stamped right on it for plumb and seat cuts in the field.
Do I subtract the ridge board thickness?
Yes — at the upper end of the rafter, you cut a plumb cut that lands flush against the ridge board. The actual horizontal run of the rafter is half the building width minus half the ridge board thickness (typically 3/4" for a 1-1/2" ridge). For a 6/12 pitch that shaves about 0.84" off the slope length per rafter — small, but real. This calculator returns the un-corrected length; subtract the ridge offset before final cut.
What size rafter do I need for a 24-foot-wide house?
This calculator gives length only, not size. Rafter size depends on snow load, lumber species/grade, spacing, and whether the ceiling joists tie the rafters together. AWC and IRC R802.5 span tables are the right reference. For 24-ft buildings under 30 psf ground snow with 16" o.c. spacing, 2x8 #2 SPF rafters are typical, but 2x10 or 2x12 are needed in heavy-snow regions or with cathedral ceilings. Always verify with engineered plans.