Rafter Length Calculator
Find the exact length of common rafters for a gable roof. Enter the span, pitch, ridge board, overhang and rafter size, and get the rafter length with the ridge deduction, tail length, ridge height, plumb and seat cut angles, birdsmouth layout, rafter count and lumber cost — with a live rafter diagram, comparison tables and a downloadable PDF.
| Pitch | Angle | Per ft run | Rafter length | Rise | Board |
|---|---|---|---|---|---|
| Enter the span and pitch to compare | |||||
| Rafter | HAP | Notch | Ridge height | Board feet | Status |
|---|---|---|---|---|---|
| Enter the span and pitch to compare | |||||
How to use the rafter length calculator
Four quick steps turn your span and pitch into the exact rafter length — with the ridge deduction, tail, cut angles, birdsmouth layout, board to buy and lumber cost — plus a live diagram, by-pitch and by-size tables, a chart and a downloadable report.
Enter the building
Give the span in feet and inches, the building length and the rafter spacing.
Set pitch & ridge
Enter the roof pitch and pick the ridge board so the ridge deduction is taken off each rafter.
Pick rafter & overhang
Choose the rafter size, the eave overhang and the seat cut for the birdsmouth.
Read results & save a PDF
Get the total length, cut angles, heel cut, board to buy and cost, then download a report.
How rafter length is calculated
A common rafter is the hypotenuse of a right triangle: run along the bottom, rise up the middle, rafter up the slope. Then you take off half the ridge and add the tail. Here is the exact math the calculator runs.
Worked example — 24 ft span, 6/12 pitch, 1½” ridge, 12″ overhang, 2×8 rafters, 3½” seat
Run: 12 ft · Per foot: √(1 + 0.5²) = 1.118 · Line length: 12 × 1.118 = 13'5"
Ridge deduction: 0.75 × 1.118 ≈ ⁹⁄₁₆" → ridge-to-wall 13'4" · Tail: 13⁷⁄₁₆" → total 14'6"
Cuts: plumb 26.6°, seat 63.4° · Heel 1¾", HAP 6⅜" · Buy a 16 ft board
≈ 14’6″ total rafter — cut from a 16 ft board, with a 6’6″ ridge height and a birdsmouth notch about 22% of the rafter depth.
Rafter length reference charts
Handy lookups for how pitch and rafter size change the length, rise, birdsmouth and board you buy.
| Pitch | Roof angle | Per ft run | Total rafter | Rise | Board |
|---|---|---|---|---|---|
| 3/12 | 14.0° | 1.031 | 13′ 4″ | 3′ 0″ | 14 ft |
| 4/12 | 18.4° | 1.054 | 13′ 8″ | 4′ 0″ | 14 ft |
| 5/12 | 22.6° | 1.083 | 14′ 0″ | 5′ 0″ | 16 ft |
| 6/12 | 26.6° | 1.118 | 14′ 6″ | 6′ 0″ | 16 ft |
| 8/12 | 33.7° | 1.202 | 15′ 7″ | 8′ 0″ | 16 ft |
| 10/12 | 39.8° | 1.302 | 16′ 10″ | 10′ 0″ | 18 ft |
| 12/12 | 45.0° | 1.414 | 18′ 4″ | 12′ 0″ | 20 ft |
The “per ft run” factor is the heart of it: multiply the run by this number for the line length. A steeper pitch lengthens the rafter and pushes you up to the next stock board.
| Rafter | Actual depth | HAP | Notch | Ridge height | Status |
|---|---|---|---|---|---|
| 2×6 | 5½” | 4⅜” | 28% | 6′ 4″ | OK |
| 2×8 | 7¼” | 6⅜” | 22% | 6′ 6″ | OK |
| 2×10 | 9¼” | 8⁹⁄₁₆” | 17% | 6′ 9″ | OK |
| 2×12 | 11¼” | 10¹³⁄₁₆” | 14% | 6′ 11″ | OK |
A deeper rafter leaves more height above the plate (HAP) and a shallower notch percentage with the same 3½” seat, and it raises the ridge slightly. Depth is set by your span tables, not by length.
| Building length | 16″ o.c. | 24″ o.c. |
|---|---|---|
| 24 ft | 38 | 26 |
| 32 ft | 50 | 34 |
| 40 ft | 62 | 42 |
| 60 ft | 92 | 62 |
Count = (length × 12 ÷ spacing + 1) per side, doubled for both slopes. Add extra rafters for any valleys, dormers or doubled members at openings.
What the rafter length calculator gives you
Span, pitch and rafter size give you every length and cut, plus the board to buy and the cost.
Rafter lengths at a glance
Who uses a rafter length calculator
From a shed roof to a full stick-framed house, the same calculator gives the length and every cut.
Stick-framing a shed or addition roof and wants the exact rafter length and cut angles the first time.
- Enter span and pitch
- Read total length
- Cut a pattern rafter
Laying out rafters by hand and needs the ridge deduction, heel cut and speed-square setting.
- Set the ridge board
- Check the notch
- Grab the square setting
Pricing a roof and wants the board length, rafter count and lumber cost for both roof sides.
- Enter the length
- Read board to buy
- Export the PDF
Tips for laying out rafters
Accurate rafters come from the right ridge deduction, a clean birdsmouth and a tested pattern.
Rafter length calculator FAQ
Quick answers about rafter length, line length, the ridge deduction, tails, cuts and counts.
Take the run (half the span), then multiply by √(1 + (pitch÷12)²) to get the line length to the ridge center. Subtract half the ridge-board thickness along the slope and add the overhang tail.
A 24 ft span at 6/12 with a 1½” ridge and 12″ overhang gives a total rafter length of about 14 ft 6 in.
The line length is the sloped distance from the building (wall) line to the center of the ridge, before the ridge deduction. For a 12 ft run at 6/12 it’s 12 × 1.118, about 13 ft 5 in.
The actual ridge-to-wall cut length is the line length minus half the ridge thickness along the slope.
Rafters butt against a ridge board, so half the board’s thickness is taken off each rafter along the slope. For a 1½” (2x) ridge at 6/12 that’s about ⁹⁄₁₆”.
Use no deduction if the rafters meet each other directly at the peak.
The tail is the sloped length from the wall out to the tail plumb cut. It equals the horizontal overhang × the slope factor.
A 12″ overhang on a 6/12 roof gives a tail of about 13⁷⁄₁₆” measured along the rafter.
Buy a stock board at least as long as the total rafter length plus a couple of inches for squaring the ends. A 14 ft 6 in rafter is cut from a 16 ft board.
The depth (2×6, 2×8, 2×10) is set by the span, spacing and load in your rafter span tables, not by the length.
The birdsmouth is the notch that seats the rafter on the wall plate: a level seat cut (usually the plate width) and a vertical heel cut. The heel height equals the seat length × pitch ÷ 12 — 1¾” for a 3½” seat at 6/12.
Keep the notch to no more than a third of the rafter depth with at least 1½” of bearing.
The plumb cut (at the ridge and the tail) matches the roof angle — about 26.6° at 6/12. The seat cut (the level face of the birdsmouth) is the complement, about 63.4°.
On a speed square you simply pivot to the pitch number on the common scale.
Divide the building length by the rafter spacing, add one, then double it for both roof sides. A 40 ft building at 16 in on-center needs 40 × 12 ÷ 16 + 1 = 31 per side, or 62 rafters total.
Add extra rafters for valleys, dormers or doubled members at openings.
Layout estimate only — confirm on site. This covers common rafters on a gable roof in US units, measured along the top edge from the ridge plumb cut to the tail plumb cut, using actual lumber sizes (a 2×8 is 7¼” deep). Line length = run × √(1 + (pitch÷12)²), and the ridge deduction is half the ridge thickness along the slope. This tool works out lengths and cuts, not strength: check the allowed rafter span for your species, grade, spacing and snow load in your local code’s span tables, and add ceiling joists or rafter ties as required. Lay out and test-fit one pattern rafter before cutting the rest. Lumber prices are placeholders.


