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.
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.
| Measurement | Value | Notes |
|---|
| Item | Value | Notes |
|---|
| Lumber Size | Max Span @ 12" OC | Max Span @ 16" OC | Max Span @ 24" OC | Your Span |
|---|
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.
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.
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.
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 Size | 12" OC | 16" OC | 24" OC | Actual Depth |
|---|---|---|---|---|
| 2×4 | 9′-3″ | 8′-5″ | 7′-4″ | 3.5″ |
| 2×6 | 14′-5″ | 13′-1″ | 11′-5″ | 5.5″ |
| 2×8 | 19′-0″ | 17′-3″ | 15′-1″ | 7.25″ |
| 2×10 | 24′-2″ | 21′-11″ | 19′-1″ | 9.25″ |
| 2×12 | 28′-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.
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.
Related Roofing Calculators & City Guides
Frequently Asked Questions
How do I calculate rafter length?
What is a birdsmouth cut on a rafter?
How deep can I cut a birdsmouth notch?
What is HAP (Height Above Plate)?
What size rafter do I need for a 24-foot span?
What is rafter run versus rafter span?
How do I set a speed square for rafter cuts?
How many rafters do I need?
What is the difference between a ridge board and a ridge beam?
Can I use engineered lumber (LVL) for rafters?
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