RoofingRafter Calculator

Rafter Calculator

How long should my rafters be? Calculate rafter length, birdsmouth cuts, and lumber quantities for gable roofs. Enter span, pitch, and spacing for exact dimensions.

Rafter Details

Building Span (ft)

Building Length (ft)

Roof Pitch

Rafter Spacing

Overhang (in)

Lumber Size

Lumber Species

Ready to calculate

Enter your rafter details for dimensions and costs

Last updated March 2026 by our expert review team

Rafter Length by Pitch

feet
2/1212.17 ft
4/1212.65 ft
6/1213.42 ft
8/1214.42 ft
10/1215.62 ft
12/1216.97 ft

Based on a 24 ft building span (12 ft run). Excludes overhang.

Expert Contributors

EG
Creator
Ehsan Ghazanfari
Licensed Structural Engineer
H
Expert Review
Hawkin
Certified Cost & Estimating Professional

Pro Tips

1

Birdsmouth seat cut should never exceed one-third of the rafter depth. IRC R802.6 limits the notch to maintain load capacity.

2

Always install rafters crown up. Sight down each board and mark the crown with an arrow. The natural bow resists gravity loading better.

3

Add blocking between rafters at the wall plate to prevent rafter roll. 2x blocking at 4-foot intervals keeps framing plumb under wind and snow loads.

4

Eave overhangs beyond 24 inches need lookout rafters or outriggers for support. An unsupported 36-inch overhang will sag within 2 to 3 years. Our deck calculator uses similar framing principles.

5

Collar ties connect opposing rafters in the upper third of the roof. They resist ridge separation under wind uplift. For spread resistance, use rafter ties at the plate line.

6

Use our roofing calculator after framing to estimate shingles, underlayment, and ridge caps for your new roof.

How the Calculator Works

1

Enter the building span (wall to wall), roof pitch, and rafter spacing.

2

Select lumber size and species. Add overhang if your eaves extend past the wall.

3

Get rafter length, birdsmouth dimensions, total board feet, and lumber cost.

Formulas

Rafter Length = sqrt(run² + rise²)

Run = span / 2

Rise = run x (pitch / 12)

Quick Reference

16" OC
Standard residential
2x8 max span
Up to 18 ft
HAP minimum
3.5 inches
1 board foot
1" x 12" x 12"
Overhang
Measured along slope

Common Questions

How do I calculate rafter length?

Use the formula: rafter length = square root of (run squared + rise squared). For a 24 ft span with a 6/12 pitch: run = 12, rise = 6, rafter = 13.42 ft.

What size lumber for rafters?

2x6 handles spans up to 12 ft, 2x8 for 12 to 18 ft, 2x10 for 18 to 22 ft, and 2x12 for 22 to 26 ft. Always check IRC span tables for your species, grade, and load requirements.

What is a birdsmouth cut?

A notch cut where the rafter sits on the wall plate. It consists of a horizontal seat cut and a vertical plumb cut. The seat cut should never exceed one-third of the rafter depth.

Should rafters be 16 or 24 inches on center?

16 inches on center is the standard for residential roofs. 24 inches on center works for 2x10 or larger on low-pitch roofs with light snow loads.

How do I determine roof pitch?

Place a level against the rafter or roof deck and measure the rise over 12 inches of horizontal run. A 6-inch rise over 12 inches of run equals a 6/12 pitch.

What is HAP?

Height Above Plate. It is the portion of the rafter that sits above the top plate after the birdsmouth is cut. Minimum HAP is 3.5 inches for proper bearing.

How many rafters do I need?

Divide the building length by the spacing (in feet), add 1, then multiply by 2 for both sides. A 40 ft building at 16 inches on center needs 62 rafters.

Can I use engineered lumber for rafters?

Yes. LVL (laminated veneer lumber) spans farther than solid sawn but costs 2 to 3 times more. It is best for spans over 26 ft or where clear-span is required. Use our board foot calculator for pricing.

Real-World Rafter Examples

Small Shed

12 ft span, 4/12, 12 ft long, 16" OC, 2x6
Result: 6.32 ft rafter, 20 rafters, ~42 BF

A simple shed with a low pitch. Short rafters keep lumber costs minimal. Budget $21 to $34 in SPF.

Ranch House

24 ft span, 6/12, 40 ft long, 16" OC, 2x8
Result: 13.42 ft rafter, 62 rafters, ~580 BF

Standard residential gable roof. The 6/12 pitch gives a 26.6-degree angle. Budget $290 to $464 in SPF.

Steep A-Frame

20 ft span, 12/12, 30 ft long, 16" OC, 2x12
Result: 14.14 ft rafter, 46 rafters, ~740 BF

A 45-degree roof angle creates dramatic cathedral ceilings. Requires 2x12 rafters for the long span.

Long Garage

24 ft span, 4/12, 60 ft long, 24" OC, 2x10
Result: 12.65 ft rafter, 62 rafters, ~600 BF

Wide spacing at 24" OC with 2x10 rafters. Low pitch keeps rafter length close to the run.

Rafter Mistakes That Cost You Money

Using full span instead of half span for run

The run is always half the building span. A 24 ft span has a 12 ft run. Using 24 ft as the run doubles your rise calculation and makes every cut wrong.

Forgetting overhang adds length along the slope

A 12-inch horizontal overhang adds more than 12 inches to the rafter. The overhang extends along the slope, so divide by cos(roof angle) to get actual rafter addition.

Cutting birdsmouth deeper than 1/3 of rafter depth

IRC R802.6 limits the birdsmouth to one-third of the rafter depth. A deeper cut weakens the rafter at the bearing point and can cause a structural failure.

Not deducting half the ridge board thickness

Each rafter meets a ridge board (typically 1.5 inches thick). Deduct 0.75 inches from each rafter length at the ridge end for a proper fit.

Using wrong pitch for overhang calculation

The overhang dimension is horizontal distance, but the rafter extension runs along the slope. Convert horizontal overhang to slope distance using the pitch angle.

Important Disclaimer

These estimates are for planning purposes only. Actual costs vary by location, material availability, and project complexity. Always get at least 3 local quotes. This calculator does not replace professional advice.