Rafter Length Formula
If you want to understand the rafter length formula without digging through framing tables, this page gives you the simple version. It explains how to calculate rafter length using building span, roof pitch, and optional overhang with plain English and worked examples.
For a standard common rafter on a simple gable roof, the math is based on a right triangle. Once you know the run and rise, the rafter length is just the hypotenuse.
If you need to convert roof pitch to degrees first, use the roof pitch to angle calculator.
Basic Rafter Length Formula
The standard rafter length formula comes from the Pythagorean theorem.
This works for a common rafter on a simple centered gable roof. If the roof includes overhang, you extend the horizontal run outward and calculate the sloped length again using the same pitch.
Rafter length formula with overhang
How to Calculate Rafter Length
- Measure the full building span.
- Divide the span by 2 to get the common run for a centered gable roof.
- Convert pitch into a slope ratio by dividing rise by run.
- Multiply the common run by that ratio to get the vertical rise.
- Use the Pythagorean theorem to find the rafter length.
- If needed, add overhang to the run and repeat the same process.
This is the same process used by a rafter calculator. The main advantage of the calculator is speed and convenience, especially when checking multiple roof pitches or spans.
Worked Example: Rafter Length Without Overhang
Example: A building has a 24 foot span and a 6/12 roof pitch.
Step 1: Common run = 24 ÷ 2 = 12 feet
Step 2: Slope ratio = 6 ÷ 12 = 0.5
Step 3: Rise = 12 × 0.5 = 6 feet
Step 4: Rafter length = √(12² + 6²) = √180 = 13.42 feet
Worked Example: Rafter Length With Overhang
Example: Same roof, but with a 1 foot overhang.
Step 1: Total horizontal distance = 12 + 1 = 13 feet
Step 2: Rise at outer edge = 13 × 0.5 = 6.5 feet
Step 3: Rafter length with overhang = √(13² + 6.5²) = √211.25 = 14.53 feet
Quick Reference Table
The table below shows the sloped rafter length for 12 units of horizontal run at common roof pitches.
| Roof pitch | Angle in degrees | Rafter length per 12 run |
|---|---|---|
| 3/12 | 14.04° | 12.37 |
| 4/12 | 18.43° | 12.65 |
| 5/12 | 22.62° | 13.00 |
| 6/12 | 26.57° | 13.42 |
| 7/12 | 30.26° | 13.89 |
| 8/12 | 33.69° | 14.42 |
| 9/12 | 36.87° | 15.00 |
| 10/12 | 39.81° | 15.62 |
| 12/12 | 45.00° | 16.97 |
To estimate a rafter quickly, multiply the horizontal run by the factor for the roof pitch. This is a handy shortcut when you already know the pitch.
When This Formula Works Best
This formula works best for a standard common rafter on a simple roof layout. It is useful for rough estimating, planning, and learning the math behind a rafter calculator.
More complex roofs, special cuts, structural details, and exact framing layout may require additional measurements beyond the basic formula shown here.