Rafter Calculator 2026 | Calculate Rafter Length, Pitch & Lumber Needed
Calculate the exact rafter length, ridge board length, number of rafters needed, board feet of lumber, and estimated material cost for any gable roof. Enter your run, pitch, spacing, and overhang — and get instant results. Based on the standard Pythagorean theorem formula used by professional framers across the US.
Your Rafter Calculations
15 ft run, 4/12 pitch, 16" spacing, 40 ft building
How to Use the Rafter Calculator
- Enter the Run (half the building width) The "run" is the horizontal distance from the wall plate to the center ridge. It equals exactly half your total building width (span). For a 28-foot wide house, the run is 14 feet.
- Select your roof pitch Pitch is expressed as rise per 12-inch run. A 6/12 pitch rises 6 inches for every foot of horizontal run. Common residential pitches are 4/12 to 8/12. Select from the dropdown or use our pitch chart below.
- Enter overhang, spacing, and building length Overhang is how far the rafter extends past the wall plate (typical: 12–24 inches). Spacing is 16" or 24" on center. Building length determines how many rafters you need per side.
- Select lumber size and enter price Common rafter sizes are 2×6, 2×8, 2×10, and 2×12. Your local lumber yard can give you the current price per linear foot. The 2026 national average for 2×8 dimensional lumber is approximately $1.85/linear foot.
- Click Calculate Instantly get rafter length, total cut length (with overhang), ridge board length, rafter count, board feet, estimated cost, and rafter angle — everything you need to order materials and start framing.
Rafter Length Formula — The Math Explained
Rafter length is calculated using the Pythagorean theorem. A rafter, the horizontal run, and the vertical rise form a right triangle — and you're solving for the hypotenuse (the rafter):
Rafter Length = √(Run² + Rise²)
Total Cut Length = Rafter Length + Overhang Length
Overhang Length = Overhang(in) ÷ 12 × √(1 + (Pitch/12)²)
Example: 15-foot run, 6/12 pitch, 12-inch overhang
- Rise = 15 × (6 ÷ 12) = 7.5 feet
- Rafter length = √(15² + 7.5²) = √(225 + 56.25) = √281.25 = 16.77 feet
- Overhang run = 12 in = 1 ft | Overhang rise = 1 × 0.5 = 0.5 ft
- Overhang segment = √(1² + 0.5²) = 1.12 feet
- Total cut length = 16.77 + 1.12 = 17.89 feet
Roof Pitch Chart & Common Uses
| Pitch | Angle | Multiplier* | Best For | Common Regions |
|---|---|---|---|---|
| 2/12 | 9.5° | 1.014 | Porch overhangs, sheds | Hot, dry climates (AZ, NV) |
| 3/12 | 14.0° | 1.031 | Low-slope commercial | Southern US |
| 4/12 | 18.4° | 1.054 | Ranch-style homes | Southeast, Southwest |
| 6/12 | 26.6° | 1.118 | Most popular residential | Nationwide |
| 8/12 | 33.7° | 1.202 | Traditional colonial homes | Northeast, Midwest |
| 10/12 | 39.8° | 1.302 | Cape Cod, steep-slope areas | New England |
| 12/12 | 45.0° | 1.414 | A-frames, steep snow-load roofs | Mountain regions (CO, WA, MT) |
*Multiplier: multiply the run by this factor to get the rafter length (before overhang). E.g., 6/12 pitch × 15 ft run × 1.118 = 16.77 ft rafter.
How Many Rafters Do I Need?
The number of rafters per side is determined by your building length and rafter spacing. Here's the formula:
Add 10% for waste, cuts, and extras
| Building Length | 16" Spacing (per side) | 24" Spacing (per side) | Total @ 16" (both sides) |
|---|---|---|---|
| 20 ft | 16 | 11 | 32 |
| 30 ft | 23 | 16 | 46 |
| 40 ft | 31 | 21 | 62 |
| 50 ft | 39 | 26 | 78 |
| 60 ft | 46 | 31 | 92 |
Rafter Lumber Sizing Guide (2026)
Rafter size depends on span, spacing, wood species, and roof load. Use this quick reference:
| Lumber Size | Max Span @ 16" Spacing | Max Span @ 24" Spacing | 2026 Avg Price/LF |
|---|---|---|---|
| 2×6 | up to 13–14 ft | up to 11–12 ft | ~$1.10“$1.40 |
| 2×8 | up to 17–18 ft | up to 14–15 ft | ~$1.70“$2.00 |
| 2×10 | up to 21–22 ft | up to 18–19 ft | ~$2.10“$2.40 |
| 2×12 | up to 25–26 ft | up to 22–23 ft | ~$2.60“$3.00 |
Types of Rafters
- Common Rafter: Runs perpendicular from wall plate to ridge board. Most standard rafter in gable roof construction. This calculator focuses on common rafters.
- Hip Rafter: Runs diagonally from a corner of the building to the ridge, forming the hip on a hip roof. Hip rafters are longer than common rafters at the same pitch and require compound-angle cuts.
- Valley Rafter: Forms the internal angle where two roof sections meet. Found in L-shaped houses or any intersecting roof planes.
- Jack Rafter: A shorter rafter that runs from the wall plate to a hip or valley rafter rather than to the ridge board. Used to fill in the triangular sections of hip or valley roofs.
- Collar Tie: Not technically a rafter — a horizontal member connecting opposing rafters to prevent spreading. Required by code at or near the ridge.
Worked Example — 40-Foot Ranch Home, 6/12 Pitch
Let's work through a real project: a 40-foot wide, 60-foot long ranch home with a 6/12 pitch, 16-inch rafter spacing, and 18-inch overhang.
| Calculation | Formula | Result |
|---|---|---|
| Run | 40 ft ÷ 2 | 20 ft |
| Rise | 20 × (6/12) | 10 ft |
| Rafter length | √(20² + 10²) = √500 | 22.36 ft |
| Overhang length | 1.5 ft × 1.118 | 1.68 ft |
| Total cut length | 22.36 + 1.68 | 24.04 ft |
| Rafters per side | (60 ft × 12 ÷ 16) + 1 | 46 |
| Total rafters | 46 × 2 sides + 10% waste | 102 |
| Linear feet of lumber | 102 × 24.04 ft | 2,452 lf |
| Estimated cost (2×10 @ $2.20/lf) | 2,452 × $2.20 | $5,394 |