A rafter length calculator determines the exact cut length for common rafters, the ridge board height above the floor, birdsmouth seat and plumb cut dimensions, and the total number of rafters needed for a gable roof. Getting these numbers right before you touch a saw prevents wasted lumber and ensures your roof frame sits plumb and square.
Rafter Framing Calculator
Measure from outside of wall framing to outside of opposite wall framing.
Select a preset or enter the rise value. Pitch = rise per 12 inches of horizontal run.
Horizontal eave projection past the wall plate. Typical: 12–18 inches.
How to Use the Rafter Length Calculator
Cutting rafters accurately is one of the most math-intensive parts of residential framing. Our free rafter length calculator handles the trigonometry so you can focus on cutting and assembling — not number-crunching. Enter your roof span, pitch, and overhang, and the calculator instantly returns every measurement you need to cut a perfect common rafter.
Step 1: Enter the Building Span
The span is the horizontal distance from the outside face of one wall plate to the outside face of the opposite wall plate. Measure this carefully — a 1-inch error in span creates a half-inch error in run and compounds through every rafter dimension. The run (used in all rafter calculations) is exactly half the span.
Step 2: Select the Roof Pitch
Roof pitch expresses how many inches the roof rises for every 12 inches of horizontal run. A 6/12 pitch rises 6 inches per foot of run. Use the dropdown to choose a common pitch or type the rise value directly. The pitch determines the rafter's angle and controls every cut angle on the rafter — ridge plumb cut, birdsmouth, and tail cut all share this same angle.
Step 3: Set the Eave Overhang
The overhang is the horizontal distance the rafter extends past the wall plate to form the soffit. Typical residential overhangs range from 12 to 18 inches. The calculator adds the angled overhang length to the structural rafter length to give you the total cut length — the measurement from the ridge plumb cut to the tail plumb cut.
Step 4: Enter Building Length and Wall Height
Building length is used to calculate the ridge board length and the total number of rafters needed. Wall plate height (floor to top of plate) is used to calculate the ridge height above the floor — critical for planning ceiling heights and ordering ridge posts. Standard 8-foot walls measure 97.125 inches to the top of the double top plate.
Step 5: Review Birdsmouth Dimensions
The birdsmouth is the notch cut into the bottom of each rafter so it sits flat on the wall plate. The seat cut is horizontal and matches your wall plate width (3.5 inches for a 2×4 wall, 5.5 inches for a 2×6 wall). The plumb cut is vertical and equals the rafter thickness (1.5 inches for standard 2× lumber). Set your framing square to the pitch and mark both cuts at the point where the rafter crosses the wall plate.
Understanding the Ridge Height Result
Ridge height is the vertical distance from the finished floor to the top of the ridge board. It equals the run multiplied by the tangent of the pitch angle, plus the wall plate height. This number helps you plan attic access, ceiling treatments, and the length of any ridge posts. Remember to subtract the ridge board depth when calculating where the rafter top ends.
Ordering Lumber
Standard framing lumber comes in 2-foot increments: 8, 10, 12, 14, 16 feet. Order rafter stock at the next standard length above your total calculated rafter length. For example, if your total rafter length is 15.2 feet, order 16-foot boards. The material estimate in the results section shows exactly how many rafter boards to purchase, plus the ridge board length.
Common Rafter vs Hip Rafter
This calculator computes common rafter lengths — the most frequently cut rafter type, used on simple gable roofs. Common rafters run perpendicular from the ridge board straight down to the wall plate at a consistent pitch. A hip rafter is different: it runs diagonally from the ridge to the corner of the building on a hip roof. Hip rafters are longer than common rafters and require a slightly different calculation because their effective run is the diagonal of the building's run (calculated using the Pythagorean theorem). For a hip rafter on a 24-foot-span building at 6/12 pitch, the hip run is approximately 8.49 feet per side rather than 6 feet, giving a longer hip rafter even though the rise is the same.
Hip roofs also use jack rafters — shorter common rafters that fill in between the hip rafter and the ridge or wall plate. Jack rafters decrease in length at equal increments as you move toward the hip corner. Most residential hip roofs use a framing square and the rafter tables printed on the blade to lay out these cuts, or a dedicated hip-roof framing calculator.
Rafter Span Tables and IRC Code
The International Residential Code (IRC) publishes span tables specifying the maximum allowed horizontal span for different rafter sizes, spacings, species, and grades. For example, a 2×8 Douglas Fir-Larch #2 rafter at 16" O.C. can span up to 14 feet 10 inches in a typical 40 psf snow load zone. Exceeding these limits requires engineering approval or larger lumber. The span tables are in IRC Section R802.4. Your local jurisdiction may adopt the IRC as-is or use a modified version — always verify with your local building department before finalizing rafter sizing.
Common rafter sizing rules of thumb: 2×6 rafters work for spans up to about 13 feet; 2×8 for spans up to 16 feet; 2×10 for spans up to 20 feet. These are rough guides only — actual sizing depends on species, grade, spacing, and local snow/wind loads. For a single-family home, a structural engineer can size rafters precisely for roughly $200–$500 if your span exceeds IRC table limits.
For a detailed walkthrough, see our guide: How to Calculate Rafter Length for Any Roof Pitch.
FAQ
Is this rafter length calculator free to use?
Yes, the rafter length calculator is completely free with no limits or signup required. You can calculate rafter dimensions for as many roof framing projects as you need. All calculations run locally in your browser — your measurements are never sent to a server.
Is my data private when using this tool?
Absolutely. All calculations happen entirely in your browser using client-side JavaScript. Your roof dimensions and project details are never transmitted to a server or stored anywhere. Your data stays on your device.
How is rafter length calculated?
Rafter length equals the run divided by the cosine of the pitch angle. The run is half the building span (from the ridge center to the wall plate edge). For example, a 24-foot span with a 6/12 pitch has a 12-foot run and a pitch angle of 26.57°, giving a rafter length of 12 ÷ cos(26.57°) = 13.42 feet.
What is a birdsmouth cut on a rafter?
A birdsmouth is a notch cut into the bottom of a rafter where it sits on the wall plate. It has two parts: the seat cut (horizontal, equal to the wall plate width — typically 3.5 inches for a 2×4 or 5.5 inches for a 2×6) and the plumb cut (vertical, equal to the rafter thickness — typically 1.5 inches). The birdsmouth keeps the rafter from sliding off the plate.
How do I find the ridge height from roof pitch?
Ridge height equals the run multiplied by the tangent of the pitch angle, added to the wall plate height. For a 6/12 pitch with a 12-foot run on 8-foot walls, the ridge is 12 × tan(26.57°) + 96 = 6 feet + 8 feet = 14 feet above the floor. Measure wall height from the subfloor to the top of the wall plate.
What is rafter spacing and how does it affect the count?
Rafter spacing is the on-center distance between rafters, typically 16 or 24 inches for residential roofs. The number of rafters is calculated as (ridge length ÷ spacing) + 1, multiplied by 2 for both roof sides. Always add one extra rafter to account for the final end rafter. Check local building codes for required spacing based on rafter size and snow loads.
What is the ridge board length?
The ridge board runs the full length of the roof peak. For a simple gable roof, the ridge board length equals the building length. If the roof has gable overhangs, add the overhang amount to each end. Ridge boards are typically one size larger than the rafters — use a 2×8 ridge board for 2×6 rafters.
How does overhang length affect total rafter length?
The overhang (eave) extends the rafter past the wall plate to form the soffit. Total rafter length equals the structural rafter length plus the overhang length. For example, a 13.42-foot rafter with a 12-inch overhang has a total cut length of 14.42 feet. Always buy lumber at least 6 inches longer than the total calculated length to allow for the plumb cut at the ridge.
What size rafter do I need for a 12-foot span?
For a 12-foot horizontal span (the run, not the span) at typical 16" O.C. spacing, a 2×6 rafter is usually sufficient for moderate snow loads (20–30 psf). For heavier snow loads (40–50 psf) or longer spans, step up to 2×8. The IRC span tables in Section R802.4 give exact size requirements by species, grade, spacing, and design load. Always verify with your local building code, as local amendments may apply.
How far can a 2×6 rafter span?
A 2×6 Douglas Fir-Larch #2 rafter at 16" O.C. can typically span up to about 13 feet of horizontal run in a 30 psf live load zone, based on IRC span tables. At 24" O.C. spacing, the maximum span drops to roughly 11 feet 6 inches. Shorter spans (under 10 feet) can often use 2×4 or 2×6 depending on spacing. Always consult the actual IRC tables or a local engineer for your specific lumber species, grade, and load conditions.