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.
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.
Built for Everyone Who Frames Roofs
Generate a cut list before lumber delivery. Verify numbers on-site in 30 seconds.
Building a garage or shed? The geometry is the hard part. This removes that barrier.
See how rafter length, HAP, and birdsmouth change as you adjust pitch and span.
Verify rafter dimensions against plans, or estimate materials without a full drawing set.