Rafter Length Calculator

Find common rafter length for a gable roof from the building span, roof pitch and overhang, plus the ridge height, cut angles and how many rafters to buy.

Outside of wall to outside of wall.
Level distance past the wall.
Actual thickness; 0 if rafters meet at a point.
Rafter Count
Spacing
$
Fractions work too: try 24 1/2.
Rafter Length
Run to ridge
Line length
Overhang (tail)
Ridge height
Plumb cut angle
Rafters
Buy
Cost
Add a price to estimate

Roof List

Roofs you add are saved in this browser.

RoofSpan & PitchRafterRaftersBoardsCostRemove

How to Figure Rafter Length

A common rafter spans from the wall to the ridge. Its level distance, the run, is half the building span, less half the ridge board's thickness. Multiply the run by the slope factor for your pitch to get the line length along the rafter, then add the overhang the same way.

Run = span ÷ 2 − ridge thickness ÷ 2
Rafter length = (run + overhang) × √(pitch² + 144) ÷ 12

The line length is measured along the rafter from the plumb cut at the ridge to the tail. Buy boards at least a little longer, rounded up to the next even foot, to leave room for the cuts.

Worked Example

Rafter Length per Foot of Run

PitchSlope FactorRafter per Foot of RunPlumb Cut

Tips for Cutting Rafters

Cut one rafter as a pattern, test it on both sides of the roof, then trace the rest from it. The birdsmouth seat cut, where the rafter sits on the wall plate, shouldn't cut more than about a third of the way into the rafter's depth. Rafter size and spacing depend on span, snow load and lumber grade; use the span tables in your local code or from the American Wood Council.