Calculate rafter length, birdsmouth cut, ridge height, and lumber needs for your roof framing project. Get precise measurements for any roof pitch.
Based on IRC Section R802 & American Wood Council Standards
feet
inches
feet
π
Enter your building dimensions above to calculate rafter length, birdsmouth cuts, and lumber needs.
Based on International Residential Code βΒ·Updated Mar 2026Β·Free, no signup
Common Questions
Frequently Asked 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.
A birdsmouth (or bird's mouth) is a notch cut into a rafter where it sits on the wall plate (top plate of the wall). It consists of two cuts: a level seat cut that rests flat on the wall plate and a vertical plumb cut that fits against the outside of the wall. The birdsmouth allows the rafter to bear evenly on the wall while maintaining the correct roof angle. Per building code, the birdsmouth should not exceed one-third of the rafter depth to maintain structural strength, leaving at least two-thirds as the Height Above Plate (HAP).
HAP stands for Height Above Plate, which is the depth of rafter material remaining above the birdsmouth cut. The IRC requires that HAP be at least two-thirds of the total rafter depth. For a 2Γ6 rafter (5.5" actual depth), the minimum HAP is approximately 3.67 inches, meaning the birdsmouth can be no deeper than about 1.83 inches. HAP is critical because it determines the structural capacity of the rafter at its weakest point β the wall bearing location. Insufficient HAP can lead to rafter failure under load.
Rafter size depends on the span (run), spacing, species, grade, and load requirements. As general IRC guidelines: 2Γ6 rafters at 16" OC can span approximately 9-12 feet; 2Γ8 rafters can span 12-16 feet; 2Γ10 rafters can span 16-20 feet; and 2Γ12 rafters can span 20-24 feet. These spans assume #2 grade Southern Pine or Douglas Fir with standard residential loads (20 psf live load, 10 psf dead load). Heavy snow loads, wider spacing, or lower-grade lumber reduce allowable spans. Always consult IRC rafter span tables or a structural engineer for your specific conditions.
Count rafters by dividing the building length (in inches) by the on-center spacing and adding one for the starting rafter. Then double the count for both sides of a gable roof. For a 30-foot building at 16" OC: (360 Γ· 16) + 1 = 23.5, round up to 24 rafters per side, times 2 = 48 total rafters. At 24" OC the same building needs (360 Γ· 24) + 1 = 16 per side, or 32 total. Add extra rafters for hip or valley framing if your roof is not a simple gable design.
Rafters are individual lumber pieces cut and assembled on-site by framers, running from the ridge board to the wall plate. Trusses are pre-engineered triangular assemblies manufactured in a factory and installed as complete units. Rafters provide open attic space (no web members) and allow for cathedral ceilings without special designs. Trusses are faster to install, can span greater distances without interior bearing walls, and are typically more cost-effective for new construction. Rafters are preferred for additions, renovations where crane access is limited, and custom roof designs with dormers or skylights.
Roof pitch is expressed as the number of inches the roof rises vertically for every 12 inches of horizontal run. A 6/12 pitch means the roof rises 6 inches for every 12 inches of run. To measure an existing roof pitch, place a level horizontally against the roof surface, measure 12 inches along the level, then measure the vertical distance from the level down to the roof at that 12-inch mark. Common residential pitches range from 4/12 to 8/12, with 6/12 being the most popular for standard homes.
A ridge board is a non-structural board (typically a 1Γ or 2Γ board) placed at the peak where opposing rafters meet. It serves as a nailing surface and alignment guide but does not bear load β the rafter loads are transferred to the walls through the ceiling joists (which act as ties). A ridge beam is a structural member (typically engineered lumber like LVL or glulam) that actually supports the weight of the rafters. Ridge beams are required when there are no ceiling joists or collar ties to prevent the rafters from spreading, such as in cathedral ceiling designs. Ridge beams require support posts at each end.
This calculator provides common rafter measurements for standard gable roofs. Hip roofs use common rafters plus specialized hip rafters (which run diagonally from corners to the ridge) and jack rafters (shorter rafters that connect to hip rafters). Hip rafter length can be estimated by multiplying the common rafter run by 1.414 (the square root of 2) and then calculating the hypotenuse using the appropriate pitch. However, hip roof framing involves complex compound angles that typically require specialized hip/valley rafter tables or framing square calculations beyond what a basic rafter calculator provides.
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. You 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. If you're framing a house, garage, shed, or addition, this is the calculator you want. The math follows the same formulas a licensed framing carpenter uses β 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. Whatever your reason, you'll have accurate numbers in under a minute β far faster than scaling a set of drawings. Learn more about how we build our calculators.
Getting accurate results takes less than two minutes if you have your building plans or a tape measure handy. Here's exactly how each field works β and the mistakes most people make when entering them.
Step 1: Enter Building Span
The building span is the outside-to-outside wall width β not the interior dimension, not the foundation width. Measure from the outer face of one wall plate to the outer face of the opposite plate. For a standard two-car garage, that's typically 24 feet. For a single-story house, it's often 28β32 feet.
Common mistake: Using the interior width. If your rooms measure 22 feet clear, but your walls are 6-inch framing with 1/2-inch drywall each side, your actual span is closer to 23 feet 1 inch. Use the exterior dimension β every inch matters when you're cutting 20 rafters.
Step 2: Set Roof Pitch
Roof pitch is expressed as rise-over-run: a 6/12 pitch rises 6 inches for every 12 inches of horizontal run. Pick your pitch from the quick-select buttons or the dropdown. If you're matching an existing roof, measure the rise over 12 inches of run using a speed square or a pitch gauge. Most residential roofs fall between 4/12 and 8/12. Steeper pitches (10/12, 12/12) are common in snowy climates where shedding load matters.
Step 3: Choose Ridge Board Thickness
Select whether your ridge board is a 1Γ (3/4-inch actual) or 2Γ (1-1/2-inch actual) member. The calculator deducts half the ridge thickness from each rafter run, which is the correct framing method per the American Wood Council. Skip this and your rafters will be 3/4-inch too long β they won't fit without trimming.
Step 4: Set Eave Overhang and Rafter Spacing
The eave overhang is the horizontal distance your roof extends past the wall, measured in inches. Twelve inches is typical for most residential construction; 18β24 inches gives better wall protection in wet climates. Rafter spacing is almost always 16 inches on-center for residential work β 24-inch spacing is acceptable for light-load applications and some engineered lumber systems.
Step 5: Select Lumber Size and Building Length
Choose your rafter size from the grid β 2Γ6 through 2Γ12. For spans over 14 feet at 16-inch OC, you'll typically need at least a 2Γ8; over 18 feet, a 2Γ10. Enter your building length (ridge-to-ridge direction) so the calculator can count the rafters you need. Add 10% to that number for waste and rejects before you order.
Every number this calculator produces comes from the same geometry a framing carpenter has used for over a century β the Pythagorean theorem, applied to the right triangle formed by a roof rafter.
The Core Formula
The rafter run is half the building span, minus half the ridge board thickness. For a 24-foot building with a 2Γ ridge (1.5 inches actual), the run is:
Run = (24 Γ· 2) β (1.5 Γ· 2) = 12 β 0.75 = 11.25 ft
The rise equals the run multiplied by the pitch factor. At 6/12 pitch, that's 6 inches of rise per foot of run:
Rise = 11.25 Γ (6 Γ· 12) = 5.625 ft
The rafter length (excluding overhang) is the hypotenuse of that right triangle:
The overhang tail adds proportionally: an 18-inch eave on a 6/12 roof adds β(1.5Β² + 0.75Β²) β 1.68 feet to the rafter. The total rafter length is the run-length plus the tail length.
Birdsmouth and HAP Calculations
The birdsmouth is a notch cut where the rafter sits on the wall plate. It has two components: the seat cut (horizontal, rests on the plate top) and the plumb cut (vertical, faces the building exterior). Their depths depend on the pitch and the rafter size. Per IRC Section R802.7.1, the HAP (Height Above Plate) β the rafter depth remaining above the birdsmouth β must be at least 2/3 of the total rafter depth. The calculator enforces this automatically and warns you if your selected lumber doesn't meet the requirement.
Why Trust These Results?
The formulas follow the International Residential Code (IRC) Section R802 and the American Wood Council's Wood Frame Construction Manual. These are the same references your local building inspector uses to review framing plans. That said, always verify your calculations against your local building code and have structural framing reviewed by a licensed professional when required β this tool provides estimates, not engineered drawings.
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: What's the Difference?
A common rafter runs perpendicular from the ridge board to the wall plate β it's the simplest type and what this calculator handles. A hip rafter runs diagonally from the corner of a building to the ridge, and a jack rafter is a shortened common rafter that meets the hip. Hip roofs are more wind-resistant and look more finished, but they require three different rafter types and considerably more layout work. If your building has hip ends, calculate the common rafters here and add your hip and jack calculations separately. Read our hip roof framing guide for the full breakdown.
Choosing the Right Lumber Size for Your Roof
Rafter size depends on span, spacing, species, and snow load. The American Wood Council publishes span tables for every common species and size combination. As a general rule: 2Γ6 rafters work for spans up to about 13 feet at 16-inch OC in most residential species grades; 2Γ8 gets you to roughly 17 feet; 2Γ10 handles up to 22 feet. Beyond that, you're looking at 2Γ12 or engineered lumber. Check our rafter lumber sizing guide for a full table by species and load. Always verify against your local jurisdiction's adopted code β span table values vary.
Building Codes for Roof Framing in 2026
Most US jurisdictions have adopted the 2021 International Residential Code or are in the process of doing so. Key rafter requirements under IRC Chapter 8: rafters must bear on wall plates with a minimum 1-1/2 inch bearing length; birdsmouth seat cuts can't exceed 1/3 of the rafter depth; notches and holes are prohibited in the middle third of the span; and collar ties or ridge beams are required to resist ridge thrust. Some jurisdictions add local amendments, especially for high-wind or high-snow zones β confirm requirements with your building department before framing. See our building code guide for a state-by-state overview.
DIY Rafter Cutting: Safety and Precision Tips
A circular saw and a framing square are all you technically need, but a miter saw (for plumb cuts) and a dedicated rafter square make the job far faster and more accurate. Always cut a test rafter first and dry-fit it before cutting the full run. Mark your birdsmouth on the test piece, fit it to the ridge and plate, then check your HAP measurement. If it fits, use that rafter as your pattern and trace all subsequent cuts from it. Never skip the dry-fit β a 1/4-inch error in your birdsmouth gets amplified across the entire roof. For more detail, see our step-by-step rafter cutting guide.
Who Should Use This Rafter Calculator?
This tool works for anyone who needs accurate rafter dimensions β whether you're picking up a saw tomorrow or just planning a project months from now.
Residential contractors and framers use it to generate a cut list before the lumber delivery. Enter the building dimensions, print the results, and hand them to the crew. No more re-deriving the math on site when you can verify it here in 30 seconds.
DIY homeowners building a garage, workshop, or backyard shed are the most common users. Most residential DIYers have the skills to frame a simple gable roof β the hard part is the geometry. This rafter calculator removes that barrier. You still need to verify against your local building code and pull a permit where required, but you'll walk into that process with confidence.
Carpentry students and apprentices use it as a learning tool. Try different pitch values and watch how the rafter length, birdsmouth depth, and HAP all change. It's a fast way to build intuition for how roof geometry works before you're on a job site under time pressure.
Home inspectors and estimators use it to quickly verify whether rafter dimensions on existing construction match what the plans call for β or to estimate material quantities for a project budget without needing a full set of drawings. If you're ever checking someone else's work, knowing what the numbers should be is half the job.