Building span, pitch, overhang — out comes the exact rafter length and the lumber to buy.
The rafter formula
run = span ÷ 2 (gable) or span (shed roof)
rise = run × pitch ÷ 12
rafter = √(run² + rise²)
total = rafter + overhang × √(1 + (pitch/12)²)
For precision framing, subtract half the ridge board thickness (¾″ for a 2× ridge) from the
run before calculating — this tool's output is within that ¾″, which the birdsmouth layout
absorbs on most builds. Lumber comes in even lengths, so buy the next even size up.
Rafter length by span (6/12 pitch, gable, 1 ft overhang)
| Building span | Cut length | Buy |
| 16 ft | 10.06 ft | 12 ft |
| 20 ft | 12.30 ft | 14 ft |
| 24 ft | 14.53 ft | 16 ft |
| 28 ft | 16.77 ft | 18 ft |
| 32 ft | 19.01 ft | 20 ft |
Frequently asked questions
How do I calculate rafter length?
Rafter length = √(run² + rise²), where run is half the building span (for a gable roof) and rise = run × pitch ÷ 12. Add the overhang measured along the slope: overhang length × the same pitch multiplier.
What size lumber for rafters?
Depends on span, spacing, species and snow load. As a rough residential guide at 16″ spacing: 2×6 spans up to ~10 ft, 2×8 to ~13 ft, 2×10 to ~16 ft, 2×12 to ~20 ft. Always confirm with local span tables or an engineer.
Does rafter length include the overhang?
The framing length you cut includes the overhang (eave). This calculator shows both the structural length (ridge to wall plate) and the total cut length including overhang.
What is the birdsmouth cut?
The notch where the rafter seats on the wall top plate. It does not change the rafter length calculation, but leave enough depth — the seat cut should bear fully on the plate while removing no more than one-third of the rafter depth.
How is a shed roof rafter different?
A shed (mono-pitch) roof rafter runs the FULL span between the two walls, not half. Use the full horizontal distance as the run in the formula — or use this calculator with span set to twice your wall-to-wall distance.