How to Calculate Rafter Length and Layout
The Geometry of a Common Rafter
A common rafter forms a right triangle: the horizontal run is one leg, the vertical rise is the other, and the rafter itself is the hypotenuse. If you know the roof pitch and the building span, you can calculate the rafter length.
Building run = half the building span (for a symmetrical gable roof). A 24-foot-wide building has a 12-foot run per side.
Rise = Run × (Pitch / 12). For a 6:12 pitch on a 12-foot run: Rise = 12 × (6/12) = 6 feet.
Rafter length (theoretical) = √(Run² + Rise²) = √(12² + 6²) = √(144 + 36) = √180 = 13.42 feet
Or equivalently: Rafter Length = Run / cos(pitch angle). At 6:12 (26.57°): 12 / cos(26.57°) = 12 / 0.8944 = 13.42 feet.
The Shortcut: Rafter Length Per Foot of Run
Experienced framers use a unit rafter length — the diagonal distance per foot of run — from rafter tables printed on framing squares.
For a 6:12 pitch, the unit rafter length is 13.416 inches per foot of run. Multiply by the run in feet: 13.416 × 12 = 161 inches (13 feet 5 inches).
Common unit rafter lengths: 4:12 = 12.649”, 6:12 = 13.416”, 8:12 = 14.422”, 10:12 = 15.620”, 12:12 = 16.970”.
Ridge Deduction
The theoretical rafter length runs from the wall plate to the ridge centerline. In practice, the ridge board has thickness. You deduct half the ridge board thickness from the rafter length so both opposing rafters meet the ridge properly.
For a standard 1-1/2 inch ridge board (a 2×, actual 1.5 inches): deduct 3/4 inch from the rafter length at the plumb cut end. For an LVL ridge beam, the deduction is half the beam width (typically 1-3/4 to 3-1/2 inches per half).
Bird’s Mouth Cut
The bird’s mouth (or seat cut) is the notch where the rafter sits on the wall plate. It consists of a plumb cut (vertical line matching the wall face) and a seat cut (horizontal line sitting on the plate). The seat cut depth determines how deep the rafter engages the wall.
Code limits the bird’s mouth depth: the remaining wood above the seat cut (the “throat”) must not be less than one-third of the rafter depth for structural integrity. On a 2×6 rafter (5.5 inches actual), the maximum seat cut depth is approximately 3.67 inches, leaving at least 1.83 inches of throat.
Overhang
The overhang (eave projection) extends beyond the wall. It’s measured horizontally, not along the rafter slope. Calculate overhang rafter length the same way as the main rafter: Overhang rafter length = overhang run / cos(pitch angle).
For a 12-inch overhang at 6:12 pitch: 12 / cos(26.57°) = 13.4 inches along the rafter slope.
Total rafter stock length = theoretical rafter length - ridge deduction + overhang rafter length + extra for the plumb cut at the tail.
Practical Example
Building width: 28 feet. Pitch: 8:12. Ridge: 2× (1.5 inch). Overhang: 16 inches.
Run: 28 / 2 = 14 feet. Unit rafter length at 8:12: 14.422 inches per foot. Rafter length: 14.422 × 14 = 201.9 inches. Ridge deduction: -0.75 inches. Overhang: 16 / cos(33.69°) = 19.2 inches. Total stock: 201.9 - 0.75 + 19.2 = 220.35 inches (18 feet 4-3/8 inches).
You’d cut this from a 20-foot 2×8 or 2×10, depending on your span table requirements.
Roof pitch calculator → | FieldLab Framing & Carpentry Calculator →