The rafter length formula
A common rafter runs from the ridge to the wall plate, then past it to form the overhang. Its length along the slope comes from the run and the pitch multiplier.
Line length = run × multiplier, where multiplier = √(12² + pitch²) ÷ 12
Ridge deduction = (ridge thickness ÷ 2) × multiplier
Tail = horizontal overhang × multiplier
Rafter length = line length − ridge deduction + tail
The run on a gable roof is half the span, measured from the outside of the wall to the center of the ridge. Line length is theoretical, measured to the ridge centerline, so you take off half the ridge board's thickness. That deduction is measured level, so it's also scaled by the multiplier.
Worked example: 28 ft span at 6/12
- Run: 28 ÷ 2 = 14 ft
- Multiplier at 6/12: 1.118
- Line length: 14 × 1.118 = 15.65 ft
- Ridge deduction for a 1½ in ridge: 0.75 in × 1.118 = 0.84 in
- Tail for a 16 in overhang: 16 × 1.118 = 17.9 in
- Rafter length: about 17 ft 1 in, so buy 18 ft stock
Measure along the top edge of the rafter (the measuring line) from the plumb cut at the ridge to the tail cut. Cut one pattern rafter, test-fit it on both sides of the building, then use it to mark the rest.
Cuts at each end
Plumb cut at the ridge. It's vertical once the rafter is in place, so the cut angle matches the roof angle: 26.57° for 6/12. With a speed square, pivot to the pitch number on the COMMON scale and mark along the edge.
Birdsmouth at the wall. The birdsmouth is a notch made of a plumb cut (the heel) and a level cut (the seat) so the rafter sits flat on the top plate. Lay it out so the seat bears on the full width of the plate. Don't cut it deeper than your local code and the lumber's span table allow, because a deep notch weakens the rafter right where the load is highest.
Tail cut. A plumb tail cut takes a fascia board. Some builders add a short level cut for the soffit.
Choosing stock length
Lumber is sold in 2 ft increments, so round up to the next standard length and leave a few inches for squaring the ends. If the rafter comes out longer than about 20 ft, check the span tables for that lumber size and spacing. You may need deeper lumber, a mid-span support or engineered rafters.
This calculator finds geometry only. Rafter size, spacing and allowable span depend on species, grade, snow load and dead load. Use the IRC span tables or an engineer for sizing.
How do you calculate rafter length?
Multiply the run (plus horizontal overhang) by the pitch multiplier, then subtract half the ridge board thickness times the multiplier. A 14 ft run at 6/12 gives a line length of 15.65 ft.
Is rafter length measured along the top or bottom edge?
Along the measuring line, usually the top edge for rafters without a birdsmouth offset. Keep it consistent across every rafter.
What is the ridge deduction?
It's the amount you shorten each rafter so the two sides meet the faces of the ridge board instead of its centerline. For a 1½ in ridge it's ¾ in, measured level.
What size lumber should I buy for rafters?
Round up to the next standard length (8 to 24 ft in 2 ft steps), and confirm the size and spacing against the span tables for your snow load.