Skip to Calculator
Live · IRC R802·12,400+ this month

Cut rafters. Get it right the first time.

The free calculator framers trust. Rafter length, birdsmouth cuts, HAP, ridge height, lumber count, all in under 60 seconds, backed by IRC R802.

Start Calculating
No signupInstant
6/12 Pitch
Rafter · 13.34 ft
HAP · 3.67 in
48 Rafters
10
Measurements
per calculation
< 60s
Setup time
end to end
R802
IRC Standard
compliant
100%
Free forever
no signup
Rafter Calculator
IRC R802 · American Wood Council Standards
Free
Step 1 of 3
Measure your building
Outside-wall to outside-wall, span is the hardest part, everything else is fast.
feet
feet
Step 2 of 3
Set your pitch & eave
Watch the preview morph as you adjust, steeper pitch = longer rafters.
Live Preview
inches
Step 3 of 3
Pick your lumber
Choose rafter size and spacing, the calculator will enforce IRC HAP requirements.
Instant Results
All 10 measurements calculated in real time. Rafter length, birdsmouth, HAP, and more.
Code-Compliant
Built on IRC R802 and the American Wood Council's framing formulas.
Learn As You Build
Pro tips and methodology at every step so you understand the math.
About This Tool

What Is a Rafter Calculator?

A rafter calculator figures out every dimension you need to cut and install roof rafters: the sloped structural members that give a roof its shape and carry the load down to the walls. Feed it your building width, roof pitch, and a few other inputs, and it gives you rafter length, birdsmouth dimensions, ridge height, and how many boards to order. No trigonometry tables, no ruler-on-a-drawing guesswork.

This tool is built for residential construction: gable roofs, shed roofs, and any simple ridge-board assembly covered under IRC Section R802. The math follows the same formulas a licensed framing carpenter uses, the Pythagorean theorem for rafter length, trigonometry for roof angle, and the IRC's HAP requirements for birdsmouth depth.

Contractors use it to generate a cut list before the lumber truck arrives. Homeowners use it to check a contractor's quote or plan a DIY project. Carpentry students use it to understand the geometry of roof framing before touching a saw. Learn more about how we build our calculators.

Roof Framing Guide

Everything You Need to Know

Cutting rafters is one of the most technically demanding parts of residential framing. The geometry is straightforward once you understand it, but a mistake in layout gets repeated across every rafter in the building.

Common Rafter vs. Hip Rafter

A common rafter runs perpendicular from the ridge board to the wall plate. A hip rafter runs diagonally from a building corner to the ridge. Hip roofs are more wind-resistant but require three rafter types and more layout work. This calculator handles common rafters. Read our hip roof framing guide for the full breakdown.

Choosing the Right Lumber Size

As a general rule: 2×6 for spans up to ~13 ft at 16″ OC; 2×8 to ~17 ft; 2×10 to ~22 ft; beyond that, 2×12 or engineered lumber. Check our rafter lumber sizing guide for species-specific tables.

Building Codes for Roof Framing in 2026

Most US jurisdictions have adopted the 2021 IRC. Key requirements: 1-1/2″ minimum bearing; birdsmouth ≤ 1/3 rafter depth; notches prohibited in the middle third of span; collar ties or ridge beams required. See our building code guide.

DIY Rafter Cutting Tips

Always cut a test rafter and dry-fit before cutting the full run. Mark your birdsmouth, fit it to the ridge and plate, verify HAP, then use it as a pattern. A 1/4-inch error in the birdsmouth gets amplified across every rafter. See our step-by-step cutting guide.

Who It's For

Built for Everyone Who Frames Roofs

Contractors & Framers

Generate a cut list before lumber delivery. Verify numbers on-site in 30 seconds.

DIY Homeowners

Building a garage or shed? The geometry is the hard part. This removes that barrier.

Carpentry Students

See how rafter length, HAP, and birdsmouth change as you adjust pitch and span.

Inspectors & Estimators

Verify rafter dimensions against plans, or estimate materials without a full drawing set.

FAQ

Common Questions

Rafter length is calculated using the Pythagorean theorem: length = √(run² + rise²). The run is half your building span minus half the ridge board thickness. The rise equals the run multiplied by the pitch ratio (pitch/12). For example, a 24-foot span with 6/12 pitch: run = 12 feet (minus ridge deduction), rise = ~6 feet, rafter line length = √(12² + 6²) ≈ 13.42 feet. Add the overhang tail length for the total rafter length. Always round up to the next standard lumber length when purchasing.

Written & Reviewed By

Rafter Calculator Team

We build free, accurate roof framing calculators based on IRC R802 and American Wood Council standards.

IRC R802 VerifiedAbout Us