JobSiteCALCULATORS

How to Calculate Rafter Length (Formula, Slope Factor & Cuts)

Part of Decks, Fences & Roofing

Quick answer

A common rafter is the hypotenuse of the roof triangle, so its length is √(run² + rise²). The run is half the span minus half the ridge thickness; the rise is run × pitch ÷ 12. Multiply by the slope factor √(pitch² + 144) ÷ 12 as a shortcut, then add the overhang along the slope. A 24 ft span at 6-in-12 gives about a 13.4 ft line length.

Every common rafter forms a right triangle with the roof's run and rise, so its length is pure Pythagoras. You only need two numbers to start: the building span and the roof pitch.

The steps

  • Run = Span ÷ 2 − (ridge thickness ÷ 2). For a 24 ft span with a 1½ in ridge, the run is about 11.94 ft.
  • Rise = Run × pitch ÷ 12. At 6-in-12 that run rises about 5.97 ft.
  • Line length = √(Run² + Rise²) — the rafter from the wall to the ridge, here about 13.35 ft.
  • Overhang = level overhang × slope factor. A 12 in (1 ft) eave at 6-in-12 is 1.12 ft along the slope.
  • Total rafter = line length + overhang ≈ 14.46 ft. Buy the next stock length up (16 ft) and cut to fit.
Calculate your rafter lengthRafter Length CalculatorCalculate common rafter length from your roof span and pitch — line length, overhang, total board length, the plumb and seat cut angles, the birdsmouth depth, and how many rafters to buy.Open

Slope factor by pitch

The slope factor — √(pitch² + 144) ÷ 12 — is the carpenter's shortcut: rafter length per unit of run. Multiply your run by it for the line length. The last column shows the line length for a 12 ft run (a 24 ft span).

PitchSlope factorLine length, 12 ft run
3-in-121.03112.37 ft
4-in-121.05412.65 ft
5-in-121.08313.00 ft
6-in-121.11813.42 ft
7-in-121.15813.89 ft
8-in-121.20214.42 ft
9-in-121.25015.00 ft
10-in-121.30215.62 ft
12-in-121.41416.97 ft

The cuts

  • Plumb cut: the vertical cut at the ridge (and the matching tail cut). It equals the roof angle, arctan(pitch ÷ 12) — 26.6° at 6-in-12.
  • Seat cut: the level cut of the birdsmouth that rests on the wall plate. It's the complement of the plumb cut, so the two add to 90°.
  • Birdsmouth depth: code (IRC R802.7) caps the seat cut at one-third of the rafter depth — about 1.83 in on a 2×6, 2.42 in on a 2×8.

Hip and valley rafters run diagonally, so their run is about 1.414× (√2) a common rafter's run — they're noticeably longer. Jack rafters step down in length between a hip or valley and the common rafters. This calculator sizes the common rafters; add the diagonal members separately.

FAQs

What is the formula for rafter length?

Rafter length = √(run² + rise²), where run = span ÷ 2 − half the ridge thickness and rise = run × pitch ÷ 12. Add the overhang (level overhang × slope factor) for the full board length.

How much longer should I cut a rafter for the overhang?

Multiply the level overhang by the slope factor, because the tail runs down the slope. A 12 in overhang at 6-in-12 adds about 13.4 in (1.12 ft) to the rafter, not 12 in.

What size lumber do I buy for a rafter?

Round the total rafter length up to the next stock board length (8, 10, 12, 14, 16, 18, 20 ft) and cut to size. A 14.46 ft rafter is cut from a 16 ft board. Rafter depth (2×6 to 2×12) is set by span, spacing and load — check a span table.

How do I find the run if I only know the span?

The run is half the span, minus half the ridge-board thickness. For a 24 ft span with a 1½ in (2×) ridge, the run is 12 − 0.0625 = 11.94 ft. With no ridge deduction it's an even 12 ft.

Try these calculators