📅 Updated June 2026 • 2026 IRC Code • Birdsmouth & Board Feet

Rafter Calculator

Calculate common rafter length, birdsmouth seat cut dimensions, plumb cut angle, rafter count, board feet, and lumber size recommendations — for gable and shed roofs.

✓ Rafter Line Length ✓ Birdsmouth Dimensions ✓ IRC 1/3 Rule Check ✓ Speed Square Setting ✓ Board Feet & Count
🏠 Step 1 — Roof Type & Building Span
1
Select Roof Type & Enter Span
Gable / Common Rafter
Run = span / 2. Rafters meet at central ridge board.
Shed / Lean-To Rafter
Run = full span. Rafter spans from low wall to high wall.
📏 Step 2 — Pitch, Spacing & Overhang
2
Roof Pitch, Rafter Spacing & Eave Overhang
📋 Step 3 — Lumber Size & Wall Plate
3
Rafter Lumber Size & Wall Plate Width
📊 Your Rafter Results
🔨

Fill in Steps 1-3 and click Calculate to see rafter line length, tail length, birdsmouth dimensions, plumb cut angle, speed square setting, rafter count, and board feet.

✓ Line length • Total with tail • Birdsmouth seat & plumb cut • HAP • IRC check • Speed square • Board feet • Lumber recommendation
Total Rafter Length (with overhang tail)
0′ 0″
0′ 0″ line length • 0′ 0″ tail • 6/12 pitch
0′ 0″
Line Length
0′ 0″
Rafter Run
0′ 0″
Roof Rise
0′ 0″
Tail (Overhang)
Plumb Cut Angle
0.0°
set saw bevel to this angle
Pitch Factor
0.000
run multiplier for slope length
Ridge Shortening
0.0"
deducted from each rafter run
HAP (Height Above Plate)
0.0"
rafter depth above seat cut
Total Rafter Count
0
including both sides
Total Board Feet
0 BF
with waste factor
🔨
Speed Square Setting
6
Set your speed square or rafter square to this number on the common rafter scale to mark plumb cuts and seat cuts.
IRC Compliant:
IRC Warning:
MeasurementValueNotes
ItemValueNotes
Lumber SizeMax Span @ 12" OCMax Span @ 16" OCMax Span @ 24" OCYour Span
Budget (SPF #2)
$0
~$0.60/BF SPF. Use these as a quick rafter cost calculator for budgeting.
Premium (LVL / Engineered)
$0
~$2.50/BF LVL or engineered
💡

Framing Tip: Cut one rafter and test-fit it before cutting the full set. Check that the birdsmouth seats flat on the top plate, the ridge end fits against the ridge board at the correct height, and the tail plumb cut is vertical. A correctly fitting template rafter saves lumber and time on every subsequent cut.

Disclaimer: This calculator provides planning estimates based on standard rafter geometry. Actual rafter sizing must be verified against 2026 IRC Table R802.5.1 span tables, local building codes, design loads (snow, wind, dead load), and lumber species and grade. Always consult a licensed contractor or structural engineer before ordering lumber for permitted work.

Rafter Calculator: How to Calculate Rafter Length

A rafter calculator converts your building’s span, pitch, and overhang into the exact rafter dimensions a framer needs to cut and install every common rafter. The most critical output is the rafter line length — the structural distance from the ridge board to the outside face of the wall plate — but a complete rafter length calculator also computes the overhang tail length along the slope, the birdsmouth seat cut dimensions, the plumb cut angle for your saw, and the Height Above Plate (HAP) that determines fascia alignment and soffit height.

This roof rafter calculator supports both gable roofs (where run equals half the building span) and shed or lean-to roofs (where run equals the full span between the low wall and high wall). The ridge board thickness is subtracted from each rafter’s run before the line length is calculated, since the physical ridge occupies space at the peak that each rafter pair must account for.

Quick Example: A 24 ft gable span at 6/12 pitch with a 1.5 in ridge board and 12 in overhang: run = (24 – 0.125) / 2 = 11.94 ft. Line length = sqrt(11.94^2 + 5.97^2) = 13.35 ft. Tail = 1 ft x 1.118 = 1.12 ft. Total rafter = 14.47 ft — order 16-ft 2x8s.

Tail Birdsmouth notch Wall plate Structural Line Length HAP Plumb cut Ridge board Run (half span minus half ridge) Rise Total rafter = Line Length + Tail
Full rafter anatomy: the structural line length runs from the ridge plumb cut to the birdsmouth at the wall plate. The tail extends beyond for the eave overhang. HAP (Height Above Plate) is the rafter depth remaining above the seat cut, controlling fascia and soffit height.

Rafter Length Calculator: The Step-by-Step Formula

Learning how to calculate rafter length starts with the right triangle formed by the run (horizontal), the rise (vertical), and the rafter itself (hypotenuse). The pitch tells you how many inches the roof rises per 12 inches of horizontal run, which defines the rise-to-run ratio and therefore the rafter angle and slope length. A complete roof rafter length calculator applies this geometry to four distinct measurements: the structural line length, the ridge shortening deduction, the tail length along the slope, and the total board length to order.

Step 1: Determine the Run Gable roof: Run = (Span – RidgeThickness) / 2 Shed roof: Run = Span – RidgeThickness Step 2: Calculate the Rise Rise = Run x (Pitch / 12) Step 3: Find the Line Length (structural rafter) Line Length = sqrt(Run^2 + Rise^2) Or equivalently: Line Length = Run x PitchFactor where PitchFactor = sqrt(1 + (Pitch/12)^2) Step 4: Calculate the Overhang Tail Length Along Slope Tail Length = Overhang_horizontal x PitchFactor Step 5: Total Rafter Length to Cut Total = Line Length + Tail Length Step 6: Ridge Shortening (already in Run above) Ridge Shortening per rafter = (RidgeThickness/2) x cos(pitchAngle) [This is absorbed into the run formula in Step 1] Example: 24 ft span, 6/12 pitch, 1.5 in ridge, 12 in overhang Run = (24 – 0.125) / 2 = 11.9375 ft Rise = 11.9375 x 0.5 = 5.969 ft PitchFactor = sqrt(1 + 0.25) = 1.118 Line Length = 11.9375 x 1.118 = 13.346 ft Tail = 1.0 ft x 1.118 = 1.118 ft Total = 14.46 ft — order 16-ft stock
Wall Top Plate Seat cut (= plate width) Plumb cut Max depth = 1/3 of rafter HAP IRC Rule Plumb cut must not exceed 1/3 depth IRC 2026 R802.7 Plumb depth = seat cut x tan(pitch angle) HAP = depth – plumb
Birdsmouth cross-section: the seat cut (green) rests flat on the top plate and equals the plate width. The plumb cut (orange) is vertical against the wall face. HAP (purple) is rafter depth above the seat cut. Per IRC 2026 R802.7, plumb cut depth must not exceed one-third of the rafter’s actual depth.

Birdsmouth Calculator: Seat Cut, Plumb Cut, and HAP

The birdsmouth calculator portion of this tool computes the three dimensions that define the notch where a common rafter sits on the wall’s top plate. The seat cut is the horizontal portion that rests on the plate — its length equals the width of the top plate lumber (3.5 inches for a 2×4 plate, 5.5 inches for a 2×6 plate). The plumb cut is the vertical portion that aligns with the outside face of the wall — its depth equals the seat cut length multiplied by the tangent of the roof pitch angle. The Height Above Plate (HAP) is the rafter depth remaining above the seat cut, which determines how high the rafter sits above the wall and therefore controls the fascia board height and soffit alignment for the eave detail.

The most important structural constraint in any birdsmouth calculator is the IRC one-third rule: the plumb cut depth must not exceed one-third of the rafter’s actual depth (not nominal size). For a 2×8 rafter with 7.25 inch actual depth, the maximum plumb cut depth is 2.42 inches. For a 2×10 it is 3.08 inches. Exceeding this limit weakens the rafter significantly at the bearing point and will fail inspection on permitted work.

Rafter Size Calculator: Span Table Reference (IRC 2026)

Knowing your rafter length is not enough — you also need the right lumber size to carry the span safely. This rafter size calculator reference table shows approximate maximum clear spans for Douglas Fir #2 rafters at standard residential roof loads (20 psf live load, 10 psf dead load). These figures are for planning reference only; always verify against 2026 IRC Table R802.5.1 and your local building department for the specific species, grade, and load conditions that apply to your project.

Lumber Size12" OC16" OC24" OCActual Depth
2×49′-3″8′-5″7′-4″3.5″
2×614′-5″13′-1″11′-5″5.5″
2×819′-0″17′-3″15′-1″7.25″
2×1024′-2″21′-11″19′-1″9.25″
2×1228′-6″26′-0″22′-8″11.25″

Rafter Spacing Calculator: 12, 16, 19.2 or 24 Inches OC

This rafter spacing calculator determines how many rafters you need based on your chosen on-center spacing and building length. Rafter spacing interacts with both the lumber size requirement and the sheathing span rating. At 16-inch spacing, standard 7/16-inch OSB sheathing spans adequately between rafters. At 24-inch spacing, you may need 5/8-inch or thicker sheathing. At 19.2-inch spacing (a less common but structurally efficient option for engineered panel products), you can often use smaller rafters than at 16 inches for the same span. The 2026 IRC Table R802.5.1 provides separate column values for each spacing option.

Rafter Pitch Calculator: Angles and Speed Square Settings

This rafter pitch calculator converts your pitch ratio into a degree angle and a speed square setting in one step. The plumb cut angle in degrees equals the arctangent of the pitch ratio (rise divided by 12). A 6/12 pitch produces a 26.57 degree plumb cut angle. On a speed square, you simply set the tool to the rise number — a “6” for 6/12 — and mark along the pivot edge for the plumb cut line and along the body for the seat cut line. No trigonometry tables required on the job site.

Run (horizontal) Rise (vertical) Rafter Line Length Pitch angle Pitch Factor = Rafter / Run = sqrt(1 + (pitch/12)^2) Common values: 4/12 → 1.054 6/12 → 1.118 8/12 → 1.202 12/12 → 1.414 Always greater than 1.0
The rafter is the hypotenuse of a right triangle. Run is the horizontal leg; rise is the vertical leg. The pitch factor converts any horizontal run into the actual sloped rafter length — multiply run by the pitch factor to get the rafter line length.

Shed Rafter Calculator: Lean-To and Single-Slope Roofs

This rafter run calculator and rafter span calculator for shed roofs uses the same triangle geometry as a gable calculator, but the run equals the full building span rather than half of it — because the rafter travels from the low wall all the way to the high wall without a ridge board at the center. For a 12 ft wide shed with a 3/12 pitch, the run is 12 ft, the rise is 3 ft, and the rafter line length is sqrt(144 + 9) = 12.37 ft. This distinction is critical: treating a shed rafter as a gable rafter (using half the span as the run) would produce a dangerously undersized calculation.

Rafter Board Feet Calculator: Count and Lumber Cost

This rafter board feet calculator and rafter count calculator converts your total rafter count and individual rafter length into board feet of lumber, which is the standard unit lumber yards use to price dimensional material. One board foot equals 144 cubic inches of lumber (a 1-inch-thick board 12 inches wide and 12 inches long). For dimensional framing lumber, board feet per piece equals (nominal width in inches) times (actual thickness of 1.5 inches) times (length in feet) divided by 12. For a 2×8 rafter that is 16 feet long, that is 8 x 1.5 x 16 / 12 = 16 board feet per piece.

Ridge Board vs Ridge Beam: How It Affects Rafter Run

The ridge board thickness input in this common rafter calculator affects the rafter run calculation because a ridge board occupies space at the peak that each rafter pair must share. Half the ridge board thickness is subtracted from each rafter’s run before calculating the line length — this is called ridge shortening. A standard 2x ridge board is 1.5 inches thick, so each rafter loses 0.75 inches of run. A ridge beam (structural, often used for cathedral ceilings) may be much thicker, but in that case the ridge shortening calculation works the same way.

1/3
Maximum birdsmouth plumb cut depth as a fraction of rafter actual depth, per IRC 2026 R802.7
1.118
Pitch factor for a 6/12 roof — multiply run by this to get rafter line length
3.5″
Seat cut length for a 2×4 top plate — horizontal portion of the birdsmouth notch
16″ OC
Most common rafter spacing for residential roofs in the US under 2026 IRC
Roof rafter calculator showing common rafter framing with birdsmouth cuts on a residential roof structure

Related Roofing Calculators & City Guides

Frequently Asked Questions

How do I calculate rafter length?

+
Rafter line length equals the square root of (run squared plus rise squared), where run equals half the building span minus half the ridge board thickness, and rise equals run times the pitch divided by 12. Add the tail length (horizontal overhang times the pitch factor) to get the total rafter length to cut.

What is a birdsmouth cut on a rafter?

+
A birdsmouth is an L-shaped notch cut into the bottom of a rafter where it sits on the wall’s top plate. It has a horizontal seat cut (resting on the plate) and a vertical plumb cut (against the wall face). Without a birdsmouth, the rafter rests on a single sharp edge and cannot transfer load safely to the wall.

How deep can I cut a birdsmouth notch?

+
Per 2026 IRC Section R802.7, the plumb cut (vertical portion) of the birdsmouth must not exceed one-third of the rafter’s actual depth. For a 2×8 rafter (7.25 inch actual depth), maximum plumb cut depth is 2.42 inches. Cutting deeper weakens the rafter and will fail building inspection.

What is HAP (Height Above Plate)?

+
HAP is the rafter depth remaining above the seat cut of the birdsmouth, measured vertically. It determines how high the rafter sits above the wall plate and is the key dimension for sizing and aligning the fascia board, soffit framing, and lookout blocks. All rafters in a set should have identical HAP for consistent eave alignment.

What size rafter do I need for a 24-foot span?

+
For a 24-foot span at 16-inch spacing with Douglas Fir #2 under standard residential loads, a 2×10 is typically adequate (maximum allowed span approximately 21 ft 11 in at 16 inch OC per IRC Table R802.5.1). At 24-inch spacing you would need 2×12. Always verify against the actual span table for your specific lumber species, grade, load conditions, and local code.

What is rafter run versus rafter span?

+
The span is the full width of the building from outside wall to outside wall. The run is the horizontal distance one rafter travels — for a gable roof this is half the span (minus half the ridge board thickness). For a shed roof the run equals the full span. The rafter length is calculated from the run, not the full span.

How do I set a speed square for rafter cuts?

+
Set the speed square pivot point on the rafter edge, and align the degree scale to the rise number of your roof pitch. For a 6/12 pitch, set the square to “6” on the common rafter scale. Mark along the pivot fence for plumb cuts (ridge and tail) and rotate 90 degrees to mark the seat cut of the birdsmouth. The plumb cut angle in degrees equals the arctangent of pitch divided by 12.

How many rafters do I need?

+
Divide the building length in inches by your rafter spacing in inches, then add 1 for the end rafter, and multiply by 2 for both sides of a gable roof. For a 40-foot building at 16-inch spacing: (40 x 12 / 16) + 1 = 31 rafters per side x 2 = 62 rafters total. Add 10% waste factor and round up to the nearest full piece.

What is the difference between a ridge board and a ridge beam?

+
A ridge board is a non-structural spacer that holds opposing rafter pairs in alignment at the peak. It relies on ceiling joists or collar ties to resist the horizontal thrust that rafters exert on the walls. A ridge beam is structural and carries vertical load — it is required for cathedral ceilings without ceiling joists and must be supported by posts or walls at each end. A ridge beam is typically much larger than a ridge board.

Can I use engineered lumber (LVL) for rafters?

+
Yes, but with important restrictions. LVL and engineered I-joists have significantly higher allowable spans than equivalent-size dimensional lumber, which is why they are often used for long-span or heavily loaded roofs. However, you must never cut a birdsmouth notch into an engineered rafter — the flanges and web of an I-joist are structurally critical and cannot be notched. LVL can accept a birdsmouth only if the manufacturer’s installation guide specifically permits it for your application.

Sources & Data

  • International Residential Code (IRC) 2026 — Section R802: Wood Roof Framing, Table R802.5.1
  • American Wood Council (AWC) — Span Tables for Joists and Rafters, 2026 Edition
  • National Roofing Contractors Association (NRCA) — Roof Framing Guidelines, 2026