Rafter Length Calculator: Calculate Roof Rafter Size & Span
Learn how to calculate rafter length, span, and recommended lumber size for roof framing with our comprehensive guide. Includes IRC-compliant rafter size charts and a free calculator tool.
Need to Calculate Rafter Length?
Use our free rafter length calculator to instantly find rafter length, span, rise, and recommended lumber size.
Open Rafter Length CalculatorWhat Is Rafter Length?
Rafter length (also called the rafter's diagonal or sloped length) is the actual length of a roof rafter from the wall plate to the ridge. This is different from the horizontal "span" which measures from center-to-center of the supporting walls.
When ordering lumber or planning a roof framing project, you need the actual rafter length—not the span—to ensure you purchase enough material and properly cut the birdsmouth and heel cuts.
How to Calculate Rafter Length
There are two main methods to calculate rafter length:
Method 1: Using the Pythagorean Theorem
The rafter forms a right triangle with the span (half the building width) and the rise. Use the Pythagorean theorem:
Rafter Length = √(Half Span² + Rise²)
Where:
- Half Span = Building width ÷ 2
- Rise = (Pitch ÷ 12) × Half Span
Method 2: Using the Pitch Multiplier
For a given roof pitch, there's a "slope length" factor. Multiply the half-span by this factor:
Rafter Length = Half Span × Slope Multiplier
The slope multiplier depends on your roof pitch:
| Pitch | Angle | Slope Multiplier | Slope (inches/ft) |
|---|---|---|---|
| 2-in-12 | 9.46° | 1.015 | 12.17 |
| 4-in-12 | 18.43° | 1.054 | 12.65 |
| 6-in-12 | 26.57° | 1.118 | 13.42 |
| 8-in-12 | 33.69° | 1.202 | 14.42 |
| 10-in-12 | 39.81° | 1.302 | 15.62 |
| 12-in-12 | 45° | 1.414 | 16.97 |
Rafter Size Chart (IRC Compliant)
The International Residential Code (IRC) provides minimum rafter sizing tables. Here's a simplified chart for common wood species (Douglas Fir-Larch, Hem-Fir, Southern Pine):
| Span (ft) | 12" o.c. | 16" o.c. | 24" o.c. |
|---|---|---|---|
| 8 | 2×4 | 2×4 | 2×6 |
| 10 | 2×4 | 2×6 | 2×6 |
| 12 | 2×4 | 2×6 | 2×8 |
| 14 | 2×6 | 2×6 | 2×10 |
| 16 | 2×6 | 2×8 | 2×10 |
| 18 | 2×6 | 2×8 | 2×12 |
| 20 | 2×6 | 2×10 | 2×12 |
| 22 | 2×8 | 2×10 | 2×12 |
| 24 | 2×8 | 2×12 | 2×12 |
Note: This chart is for illustrative purposes. Always verify with local building codes and consult the full IRC tables or an engineer for critical applications.
Rafter Length Calculation Examples
Let's walk through some practical examples:
Example 1: Standard 24-Foot Wide Garage
Your garage is 24 feet wide with a 4-in-12 roof pitch. What's the rafter length?
Given: Width = 24 ft, Pitch = 4-in-12
Step 1: Half Span = 24 ÷ 2 = 12 ft
Step 2: Rise = (4 ÷ 12) × 12 = 4 ft
Step 3: Rafter Length = √(12² + 4²) = √(144 + 16) = √160 = 12.65 ft
Answer: 12.65 feet (or 12 ft 7.8 in)
Example 2: 30-Foot Wide Barn
Your pole barn is 30 feet wide with a 6-in-12 pitch. What's the rafter length?
Given: Width = 30 ft, Pitch = 6-in-12
Step 1: Half Span = 30 ÷ 2 = 15 ft
Step 2: Rise = (6 ÷ 12) × 15 = 7.5 ft
Step 3: Rafter Length = √(15² + 7.5²) = √(225 + 56.25) = √281.25 = 16.77 ft
Answer: 16.77 feet (or 16 ft 9.2 in)
Common Questions About Rafter Length
What's the difference between span and rafter length?
The span is the horizontal distance from center-to-center of the walls (the building width). The rafter length is the actual diagonal measurement along the rafter from the wall plate to the ridge. The rafter length is always longer than half the span.
How much extra length should I order?
Order at least 6-12 inches extra beyond your calculated rafter length to account for:
- Cutting errors and measurement mistakes
- Birdsmouth cut depth
- ridge board thickness
- Waste from bowed or defective lumber
What's a birdsmouth cut?
A birdsmouth (also called a heel cut) is the notch cut into the rafter where it sits on the wall plate. It allows the rafter to sit flush on the top plate while maintaining the correct roof pitch. The depth of this cut depends on the rafter size and local code requirements.
What if I have a hip roof?
Hip roofs have hip rafters that run diagonally from the corners to the ridge. These require different calculations and are typically longer than common rafters. Use our calculator for common rafter calculations and consult an engineer for hip roof framing.
Rafter Spacing
Common rafter spacing (on-center or o.c.) determines how far apart your rafters are spaced:
- 12" o.c. — Common spacing, minimal deflection
- 16" o.c. — Standard spacing for most residential roofs
- 19.2" o.c. — Used with engineered TJI joists
- 24" o.c. — Maximum spacing, requires larger rafter sizes
Calculate Rafter Length Instantly
Get accurate rafter calculations in seconds. Enter your building width and roof pitch to get rafter length, rise, and recommended lumber size.
Use Rafter Length CalculatorConclusion
Calculating rafter length is essential for any roof framing project. Whether you're building a garage, shed, or full-scale home, knowing how to compute rafter length helps you order the right materials and make accurate cuts.
Use our free rafter length calculator to quickly find rafter length, total span, rise, and recommended lumber size. Just enter your building width and roof pitch—it's that simple.