Rafter Length Calculator

Calculate exact common, hip, and valley rafter lengths for any roof pitch and building span. Includes bird's mouth dimensions, tail length, and lumber size recommendations.

Roof dimensions Common · Hip · Valley
ft
Full width — rafter run = half of this
ft
ft
Needed for hip rafter count
Frequently asked questions
How do I calculate rafter length?
Common rafter length = √(run² + rise²) where run = half the building width and rise = run × (pitch/12). For a 28 ft wide building with 6/12 pitch: run = 14 ft, rise = 14 × 0.5 = 7 ft, rafter = √(14² + 7²) = √(196 + 49) = √245 ≈ 15.65 ft. Add overhang length to get the full rafter from ridge to tail.
What is a bird's mouth cut?
A bird's mouth is the notch cut into the underside of a rafter where it sits on the wall plate. It has two cuts: a plumb cut (vertical, parallel to the rafter's plumb line) and a seat cut (horizontal, sitting on the top plate). The seat cut should be no deeper than 1/3 the rafter depth for structural integrity. The plumb cut depth equals the wall plate width (typically 3.5 inches for 2×4 walls).
How is a hip rafter different from a common rafter?
A common rafter runs perpendicular from the ridge to the wall plate. A hip rafter runs diagonally from the ridge corner to the building corner at a 45° plan angle. Because it runs diagonally, it travels a longer horizontal distance (the diagonal of the run) and uses a different unit length per foot of run — 13.42 inches per foot instead of 12 inches. Hip rafters require compound angle cuts at both ends.
What size lumber do I need for rafters?
Rafter size depends on span, spacing, and load. General guidelines: spans under 10 ft use 2×6, 10–16 ft use 2×8, 16–20 ft use 2×10, over 20 ft use 2×12 or engineered lumber. These are general rules — always verify with span tables in your local building code (IRC Table R802.4) or consult a structural engineer for loads greater than standard residential.

About this rafter length calculator

This calculator uses the Pythagorean theorem to find common rafter length (√(run² + rise²) + overhang), and the hip/valley rafter formula (√(run² + run² + rise²) — the 3D diagonal). It also calculates ridge board length, total rafter count, bird's mouth plumb cut depth, and recommends a lumber size based on the rafter span.