Roofing
Rafter Length Calculator
With a 12 ft run at a 6/12 pitch, a rafter is 13 ft 5 in to the ridge, or 14 ft 6 in with a 12 in overhang (updated November 2026). Enter your own run and pitch below.
- Updated
- Nov 11, 2026
Your rafter
Lengths are along the top edge of the rafter, rounded to the inch. Nothing is taken off for the ridge board, and the cuts aren’t included.
Example rafter, from the side
How this calculator works
- Slope factor = √(1 + (rise ÷ 12)²)
- Rafter to the ridge = run × slope factor
- Overhang along the rafter = level overhang × slope factor
The rafter is the long side of a right triangle whose short sides are the run and the rise, so its length grows with the pitch. The result is measured along the top edge of the rafter and rounded to the inch; nothing is taken off for the ridge board, and the plumb and seat cuts aren’t included.
Worked example
Say the building is 24 ft wide, so each rafter runs 12 ft to the ridge, with a 6/12 pitch and a 12 in overhang.
- Slope factor: √(1 + (6 ÷ 12)²) = 1.118
- To the ridge: 12 ft × 1.118 = 13.42 ft (13 ft 5 in)
- Overhang: 12 in × 1.118 = 13.42 in
- Total: 13.42 ft + 13.42 in = 14.53 ft (14 ft 6 in)
Result: With a 12 ft run at a 6/12 pitch, a rafter is 13 ft 5 in to the ridge, or 14 ft 6 in with a 12 in overhang.
Don’t know the pitch? Work it out with our roof pitch calculator.
For the shingles, our roofing calculator uses the same slope factor.
Questions about rafter length
What is the rafter length for a 4x12 pitch?
It depends on the run. At a 4/12 pitch the slope factor is √(1 + (4 ÷ 12)²) = 1.054, so a rafter is about 12.65 in long for every foot of run: with a 12 ft run, about 12 ft 8 in to the ridge, before the overhang.
How to work out rafter length calculator?
Take the run, which is half the building’s width on a gable roof, and multiply it by the slope factor √(1 + (rise ÷ 12)²); add the overhang times the same factor. For a building 24 ft wide at 6/12: 12 × 1.118 = 13.42 ft, about 13 ft 5 in to the ridge.
Where these numbers come from
-
Inches in a foot, NIST 12