Rafter Length Calculator — Roof Rafter Size
Find the exact cut length for a common rafter on any gable or shed roof: enter the total building span, the roof pitch in inches-per-foot of run, and any eave overhang — and get the structural and total rafter lengths in feet.
ft
in/ft
ft
Full rafter cut length including overhang
- 1
Horizontal run (½ span)
24 ÷ 2 = 12 - 2
Vertical rise
12 × (6 ÷ 12) = 6The roof rises pitch inches for every 12 inches of horizontal run. - 3
Structural rafter length
√(12² + 6²) = 13.42 - 4
Overhang rafter length
√(1.5² + (1.5 × 6 ÷ 12)²) = 1.68 - 5
Total rafter length
13.42 + 1.68 = 15.09
How does this calculator work?
Rafter length = √(run² + rise²), where run = half the building span and rise = run × (pitch ÷ 12). For a 6-in-12 pitch on a 24 ft span: run = 12 ft, rise = 6 ft, rafter ≈ 13.42 ft. Add the eave overhang rafter length for the total cut length.
Formula
How this is calculated
A common rafter spans from the wall plate to the ridge board, forming the hypotenuse of a right triangle. The horizontal leg is the run (half the total building span, because the ridge sits at the centreline), and the vertical leg is the rise (how much the roof climbs over that run). The Pythagorean theorem gives the structural rafter length: √(run² + rise²).
Roof pitch in North American practice is stated as "X-in-12": the roof rises X inches for every 12 inches of horizontal run. A 6-in-12 pitch on a 24-ft-wide house has run = 12 ft and rise = 6 ft, giving a structural rafter of √(144 + 36) ≈ 13.42 ft. The eave overhang is the extra distance the rafter extends beyond the wall; this calculator treats the overhang as a separate right triangle with the same pitch to get its true length, then adds it to the structural rafter.
This gives the theoretical centreline length for a common rafter on a simple gable or shed roof. When ordering lumber, add material for the ridge board deduction (typically half the ridge thickness), the bird's mouth seat cut at the wall plate, and any tail cut at the eave. Hip, valley and jack rafters require separate calculations. Always verify against your plan set and local span tables.
Frequently asked questions
A 6-in-12 pitch rises 6 inches vertically for every 12 inches of horizontal run. Pitch is always expressed as "rise-in-12" in North American framing. The steeper the pitch number, the more vertical the roof.
No — this gives the theoretical centreline rafter length. When cutting, deduct half the ridge board thickness from the top (ridge) end (usually ¾ in) and add a bird's mouth (seat and plumb cut) at the wall plate. Verify with your building plans and local code.
Not directly. Hip rafters run diagonally at 45° to the common rafters; their horizontal run is the diagonal of the plan (run × √2 for a square hip roof). Use a dedicated hip-rafter calculator for those members. This tool handles common rafters only.
Also known as
TG we-Calculate Editorial Team. (2026). Rafter Length Calculator — Roof Rafter Size [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/rafter-length-calculator
TG we-Calculate Editorial Team. "Rafter Length Calculator — Roof Rafter Size." TG we-Calculate. 2026. https://we-calculate.com/calculator/rafter-length-calculator.
TG we-Calculate Editorial Team, "Rafter Length Calculator — Roof Rafter Size," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/rafter-length-calculator
@misc{wecalculate_rafter_length_calculator, title = {Rafter Length Calculator — Roof Rafter Size}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/rafter-length-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
