How to Calculate Roof Rafter Length
Quick Answer:
Calculating exact roof rafter length requires applying the Pythagorean theorem (A² + B² = C²), where the horizontal run of the building is “A” and the vertical rise of the roof is “B.” For example, if a house spans 24 feet wide, the horizontal run to the center ridge is exactly 12 feet. If the roof rises 6 feet vertically, the calculation is 12² + 6² = 180, and the square root of 180 yields a mathematically perfect rafter length of 13.41 feet before adding the exterior overhang.
Rafter length = (run / cosine of pitch angle) + overhang. For a 12-foot run with 6/12 pitch, that’s 12 / cos(26.6) = 13.4 feet plus your overhang (typically 12-24 inches). The run is half the building width for a standard gable roof. Whether you’re framing a new shed, building a garage, or replacing damaged rafters, getting the length right is non-negotiable. Cut a rafter too short and it won’t reach. Cut it too long and you’re wasting lumber and recutting on a ladder. The math isn’t complicated — it’s basic geometry — but getting it wrong costs time and materials.
This guide gives you the formula, a ready-to-use table for common pitches, and the adjustments for overhangs and bird’s mouth cuts that most online calculators skip.
Table of Contents
- The Basic Rafter Length Formula
- Rafter Length Table by Pitch and Run
- Step-by-Step Calculation Example
- Adding Overhang to Rafter Length
- Understanding Bird’s Mouth Cuts
- Ridge Board Adjustment
- Common Rafter vs Hip Rafter Length
- Practical Tips for Measuring and Cutting
- FAQ
The Basic Rafter Length Formula
A rafter runs from the ridge board at the peak down to the wall plate (top of the exterior wall). It follows the slope of the roof, so it’s the hypotenuse of a right triangle where:
- Run = horizontal distance from the ridge center to the outside of the wall (half the building width for a symmetrical gable)
- Rise = vertical distance from the wall plate to the ridge
- Rafter length = the hypotenuse
The formula is the Pythagorean theorem:
Rafter Length = √(Run² + Rise²)
Or, using the pitch multiplier shortcut:
Rafter Length = Run × Rafter Factor
The rafter factor (also called the “secant” of the pitch angle, or simply the pitch multiplier) is a single number you multiply by the horizontal run to get the sloped length. It’s the same multiplier used for roof area calculations.
Rafter Length Table by Pitch and Run
Here’s the rafter factor for each standard pitch, plus pre-calculated lengths for common horizontal runs:
| Pitch | Rafter Factor | 6 ft Run | 8 ft Run | 10 ft Run | 12 ft Run | 14 ft Run | 16 ft Run |
|---|---|---|---|---|---|---|---|
| 3/12 | 1.031 | 6’2“ | 8’3“ | 10’4“ | 12’4“ | 14’5“ | 16’6“ |
| 4/12 | 1.054 | 6’4“ | 8’5“ | 10’6“ | 12’8“ | 14’9“ | 16’10“ |
| 5/12 | 1.083 | 6’6“ | 8’8“ | 10’10“ | 13’0“ | 15’2“ | 17’4“ |
| 6/12 | 1.118 | 6’8“ | 8’11“ | 11’2“ | 13’5“ | 15’8“ | 17’11“ |
| 7/12 | 1.158 | 6’11“ | 9’3“ | 11’7“ | 13’11“ | 16’2“ | 18’6“ |
| 8/12 | 1.202 | 7’2“ | 9’7“ | 12’0“ | 14’5“ | 16’10“ | 19’2“ |
| 9/12 | 1.250 | 7’6“ | 10’0“ | 12’6“ | 15’0“ | 17’6“ | 20’0“ |
| 10/12 | 1.302 | 7’10“ | 10’5“ | 13’0“ | 15’7“ | 18’3“ | 20’10“ |
| 12/12 | 1.414 | 8’6“ | 11’4“ | 14’2“ | 17’0“ | 19’10“ | 22’7“ |
These lengths are measured along the slope from the ridge centerline to the outside of the wall plate. They do not include the overhang tail — that’s added separately.
Step-by-Step Calculation Example
Let’s calculate rafter length for a 24-foot-wide garage with a 6/12 pitch:
Step 1: Determine the Run
For a symmetrical gable roof, the run is half the building width:
- Building width: 24 ft
- Run = 24 ÷ 2 = 12 ft
Step 2: Determine the Rise
Rise = Run × (Pitch rise ÷ 12)
- Pitch: 6/12 means 6 inches of rise per 12 inches of run
- Rise = 12 ft × (6 ÷ 12) = 12 × 0.5 = 6 ft
Step 3: Calculate Rafter Length (Pythagorean)
Rafter Length = √(12² + 6²) = √(144 + 36) = √180 = 13.42 ft = 13 ft 5 inches
Step 3 (Shortcut): Using Rafter Factor
Rafter Length = Run × Factor = 12 × 1.118 = 13.42 ft = 13 ft 5 inches
Both methods give the same result. The factor method is faster once you memorize or look up the multiplier for your pitch.
Step 4: Subtract for Ridge Board
The ridge board is typically 1.5 inches thick (2× lumber). The rafter doesn’t extend all the way to the ridge center — it butts against the side of the ridge board:
- Subtract half the ridge board thickness measured along the horizontal: 0.75 inches / cos(pitch angle)
- For 6/12: 0.75 / cos(26.57°) = 0.75 / 0.894 = 0.84 inches ≈ 7/8 inch
This is a small amount, but on precision cuts it matters:
- Adjusted rafter length: 13’5“ – 7/8“ ≈ 13 ft 4-1/8 inches (measuring line)
Step 5: Add Overhang
If you want a 12-inch overhang past the wall:
- Overhang rafter length = 12 inches × rafter factor
- 12“ × 1.118 = 13.4 inches ≈ 13-3/8 inches
Total Lumber Length Needed:
- Main rafter: 13’4-1/8“
- Overhang tail: 13-3/8“
- Total: approximately 14 ft 5-1/2 inches
You’d buy 16-foot lumber and trim to length.
Adding Overhang to Rafter Length
The overhang (also called the “tail”) extends past the exterior wall to create the eave. Standard overhangs range from 6 inches to 24 inches measured horizontally.
To calculate overhang rafter length:
Overhang Rafter Length = Overhang (horizontal) × Rafter Factor
| Overhang | 4/12 Pitch | 6/12 Pitch | 8/12 Pitch | 10/12 Pitch |
|---|---|---|---|---|
| 6 inches | 6.3“ | 6.7“ | 7.2“ | 7.8“ |
| 12 inches | 12.6“ | 13.4“ | 14.4“ | 15.6“ |
| 18 inches | 19.0“ | 20.1“ | 21.6“ | 23.4“ |
| 24 inches | 25.3“ | 26.8“ | 28.8“ | 31.2“ |
A 12-inch overhang on an 8/12 pitch roof adds 14.4 inches of rafter length beyond the wall plate — not 12 inches. The slope stretches it.
Understanding Bird’s Mouth Cuts
The bird’s mouth is a notch cut into the rafter where it sits on the wall plate. It has two cuts:
- Seat cut (level cut): Horizontal cut that sits flat on the top plate. Should be at least 1.5 inches wide (full plate contact) but no more than 2/3 of the rafter depth.
- Plumb cut (heel cut): Vertical cut that aligns with the outside face of the wall.
Why It Matters for Length
The bird’s mouth doesn’t change the theoretical rafter length (measured along the measuring line), but it determines the HAP — the “height above plate.” The HAP is how much rafter material remains above the wall plate after the bird’s mouth is cut.
Rule of thumb: The seat cut should leave at least 2/3 of the rafter depth intact. For a 2×6 rafter (5.5“ actual depth), the seat cut should be no deeper than about 1.83 inches. For a 2×8 (7.25“ depth), no deeper than 2.42 inches.
If your calculated bird’s mouth is too deep for structural safety, you’ll need to move up to larger lumber (2×8 instead of 2×6, etc.).
Ridge Board Adjustment
The ridge board sits at the peak between opposing rafters. Since the rafter butts against the side of the ridge board rather than meeting at a point, you need to shorten each rafter by half the ridge board thickness (measured horizontally).
Horizontal shortening = ½ × ridge board thickness
- For a 2× ridge board (1.5“ actual): shorten run by 0.75 inches
- For an engineered ridge beam (3.5“): shorten run by 1.75 inches
Then convert that horizontal shortening to slope distance:
Slope shortening = Horizontal shortening × Rafter factor
For a 6/12 pitch with 2× ridge board:
- 0.75“ × 1.118 = 0.84“ ≈ 7/8 inch shorter along the rafter
This deduction is made at the plumb cut end (the ridge end) of the rafter.
Common Rafter vs Hip Rafter Length
A hip rafter runs diagonally from the corner of the building to the ridge. It’s longer than a common rafter because it crosses the roof at a 45-degree angle (in plan view) rather than going straight up the slope.
Hip Rafter Factor
The hip rafter factor is different from the common rafter factor:
Hip Rafter Factor = √(1 + (rise/12)² + 1) × 1.414…
Or more practically, for each pitch:
| Pitch | Common Rafter Factor | Hip Rafter Factor |
|---|---|---|
| 4/12 | 1.054 | 1.452 |
| 5/12 | 1.083 | 1.474 |
| 6/12 | 1.118 | 1.500 |
| 7/12 | 1.158 | 1.529 |
| 8/12 | 1.202 | 1.564 |
| 9/12 | 1.250 | 1.600 |
| 10/12 | 1.302 | 1.642 |
| 12/12 | 1.414 | 1.732 |
The hip rafter run is measured from the corner to the ridge along the 45-degree plan line. For a 12 ft common rafter run, the hip rafter run is 12 × 1.414 = 16.97 ft (the diagonal), and the total hip rafter length uses the hip factor applied to the common rafter run.
Hip rafter length = Common rafter run × Hip rafter factor
For a 12 ft run at 6/12: 12 × 1.500 = 18 ft hip rafter
Practical Tips for Measuring and Cutting
Always measure along the top edge of the rafter. The “measuring line” runs along the top edge from the plumb cut at the ridge to the plumb cut at the bird’s mouth (or the tail cut if including overhang).
Mark your angles with a speed square. Set the pivot point on the rafter edge and align your pitch mark for plumb cuts. Rotate 90° from the plumb line for level (seat) cuts.
Cut one rafter and test-fit before batch cutting. Set the first rafter in position with a temporary support at the ridge. Verify the bird’s mouth seats properly and the ridge end meets at the correct height. Once confirmed, use it as a template for all remaining common rafters.
Buy lumber 2 feet longer than calculated. A 13’5“ rafter needs a 16-footer to account for overhang, waste from end squaring, and any defects in the lumber you need to cut around.
Crown all rafters the same direction. Sight down each piece of lumber and place the crown (slight bow) facing up. This prevents wavy rooflines.
Our free roofing calculator helps you determine total roof area once your rafters are in place — just enter your dimensions and pitch to get material quantities and costs.
FAQ
How do I calculate rafter length for a 4/12 pitch?
Multiply your horizontal run by the rafter factor of 1.054. For a 14-foot run: 14 × 1.054 = 14.76 feet, or about 14 ft 9 inches. Then add overhang length (horizontal overhang × 1.054) and subtract the ridge board deduction (about 3/4 inch along the slope for a standard 2× ridge).
What size lumber do I need for rafters?
Rafter size depends on span, spacing, lumber species, and load requirements (snow, wind). General guidelines: 2×6 for runs up to 10 feet at 16“ spacing; 2×8 for runs up to 14 feet; 2×10 for runs up to 18 feet. Always check local building code span tables for your specific species, grade, and loading conditions.
How long is a rafter for a 12-foot span?
A 12-foot building span means a 6-foot run per side (for a symmetrical gable). At a 6/12 pitch: 6 × 1.118 = 6.71 feet, or about 6 ft 8-1/2 inches per rafter from ridge to plate. Add your overhang to get total lumber length needed.
Is rafter length the same as roof slope length?
Yes — rafter length (from ridge to plate) is the sloped distance along the roof surface. It’s the hypotenuse of the triangle formed by the horizontal run and vertical rise. This is why a rafter is always longer than the horizontal run it covers.
How do I account for the ridge board when calculating rafter length?
Subtract half the ridge board thickness from your horizontal run before calculating, or subtract the slope-adjusted equivalent from the final rafter length. For a standard 2× ridge board (1.5“ thick), deduct 0.75 inches from the run. At 6/12 pitch, this equals about 7/8 inch shorter along the rafter’s measuring line.
Need to know your pitch first? See how to calculate roof pitch. For full roof area from rafter measurements, try our roof square footage guide.
Sources: Pitch multipliers derived from trigonometric calculations per ARMA (Asphalt Roofing Manufacturers Association) technical bulletins. Measurement methods follow NRCA (National Roofing Contractors Association) best practices.
Related Calculators
Stop guessing your roof costs.
Calculate your exact dimensions, material requirements, and local installation prices in 60 seconds. Zero signup required.