Rafter Length Calculator
Turn a roof pitch, run, and eave overhang into the rafter length you need to buy — rounded up to a real stock lumber size, not a number you can't actually purchase.
Pitch, run, and overhang
Run is half the building span for a symmetric gable roof (eave to ridge centerline, not eave to eave) — see the FAQ if your roof is a shed/lean-to or you're unsure which distance to measure.
Results
An 8/12 roof with a 12 ft run and 12 in overhang needs a rafter about 15.5 ft long — buy 16 ft stock.
Rafter stock to buy
16 ft boards
Your computed length lands close to the 16 ft stock length — little margin for cutting error.
Double-check your run and overhang measurements before ordering, and account for the ridge-board offset and birdsmouth notch on your layout — there's not much offcut to absorb a mismeasurement.
Raw rafter length (before rounding): 15.5 ft
Pitch multiplier: 1.202
How this works
A common rafter is the hypotenuse of a right triangle whose horizontal leg is the run (wall plate to ridge centerline) plus overhang, and whose slope is set by the pitch. That's the same triangle the Roof Pitch Calculator uses, so this calculator reuses its multiplier — sqrt(pitch² + 12²) ÷ 12 — and applies it to a length instead of an area: rafter length = (run + overhang) × multiplier. Because a rafter is something you actually buy, the raw computed length isn't the final answer: it's rounded up to the next commercially available dimensional-lumber stock length US dimensional lumber is commonly stocked in 2-ft increments from 8 ft to 24 ft.
Worked example
Your roof pitch is 8/12 (already known — no need to re-derive it from rise/run). The run from the wall plate to the ridge centerline is 12 ft, and you're using a 12 in eave overhang. The multiplier for 8/12 is sqrt(8² + 12²) ÷ 12 = sqrt(208) ÷ 12 ≈ 1.20185. Total horizontal distance is 12 ft + 1 ft = 13 ft. Raw rafter length is 13 × 1.20185 ≈ 15.62 ft — so you need to buy 16 ft boards, the next stock length up, leaving about 4.5 in of offcut per rafter after the birdsmouth, ridge cut, and tail are laid out.
A second example: a shallower pitch on a wider span
A 4/12 roof (a common shallow suburban pitch) spans a 30 ft wide building, so the run is 15 ft, with a generous 18 in overhang for shade. The multiplier for 4/12 is sqrt(4² + 12²) ÷ 12 = sqrt(160) ÷ 12 ≈ 1.0541. Total horizontal distance is 15 ft + 1.5 ft = 16.5 ft. Raw rafter length is 16.5 × 1.0541 ≈ 17.39 ft, which rounds up to an 18 ft stock board — and because a 4/12 pitch is so shallow, notice how much less the multiplier adds compared to the 8/12 example above, even over a longer run.
Common mistakes
Entering the full building width as the run
For a symmetric gable, run is half the span — eave to ridge centerline, not eave to eave. Entering the full width doubles the run and, combined with the multiplier, produces a rafter length roughly twice as long as the real one.
Forgetting the overhang entirely
The wall-plate-to-ridge run doesn't include the eave overhang, but the rafter itself extends past the wall to form that overhang. Leaving overhang at zero when your roof actually has a 12–24 in eave produces a rafter that's too short to cut the tail and fascia you're planning.
Buying the exact computed length with no cutting margin
The stock-length rounding already gives you the next full board, but that board is consumed by the birdsmouth notch, the ridge-side plumb cut, and the tail cut — plus normal saw kerf and layout error. Treat the offcut from rounding up as your margin; don't order the theoretical minimum and expect zero waste.
Using the rafter length as the rise, or vice versa
Rafter length is the hypotenuse of the roof triangle — always longer than either the rise or the run alone, and never equal to the wall height. Confusing the three is an easy mix-up when reading an old framing plan that doesn't label its numbers clearly.
Applying this calculator to hip or valley rafters
Hip and valley rafters meet the roof plane at a compound angle and are always longer than a common rafter of the same run — using the common-rafter length for them comes up short on the actual cut.
Skipping the ridge-board offset on the framing layout
This calculator gives the length to the ridge centerline; real framing usually trims a small amount (about half the ridge board's thickness) so paired rafters meet the ridge board's faces. It's a layout-line adjustment, not a change to the board you buy — missing it on the layout, not the purchase, is the actual mistake.
When this calculator's model stops applying
- Hip and valley rafters: these run at a compound angle to the roof plane and are always longer than a common rafter of the same run — this calculator handles common rafters only.
- Curved, barrel, or gambrel roofs: there is no single pitch for these shapes, so no single rafter length applies — break the roof into straight-pitched segments and calculate each separately.
- Very long spans at steep pitches: once the raw length exceeds the largest listed stock length (24 ft), you're into engineered-lumber or spliced-rafter territory, and a structural engineer should size the member — this calculator only tells you standard stock won't cover it.
- Ridge board thickness and birdsmouth notch depth: both trim a small, fixed amount from the theoretical length shown here, applied on the layout line rather than the purchased board length — see the FAQ for the practical handling of each.
- Structural adequacy: this calculator computes length from geometry only. It says nothing about whether a given lumber species/grade/dimension can actually span your run under your local snow and live-load requirements — that's a separate span-table or engineering check, not something rise/run/pitch alone can answer.
- Non-2-ft stock increments: some suppliers stock odd lengths (13 ft, 15 ft) for specific products, or carry metric lengths in some markets — this calculator's US stock-length list assumes standard 2-ft imperial increments; confirm what your specific supplier actually stocks before ordering.
FAQ
What exactly is 'run' in this calculator — half the building, or all of it?
It's the horizontal distance from the outside edge of the top wall plate to the centerline of the ridge — not the full building width. On a symmetric gable roof, that's half the span: a 24 ft wide house has a 12 ft run on each side. Measuring the full 24 ft and entering it here would compute a rafter twice as long as the real one.
Do I need to subtract anything for the ridge board?
This calculator doesn't — it computes the rafter's full theoretical length to the ridge centerline. In practice, framers usually shorten each rafter by half the ridge board's thickness (commonly 3/4 in for a 1x ridge, or 3/4–1 1/2 in for a 2x) so the two opposing rafters meet the ridge board's faces rather than overlapping at its centerline. That's a small, fixed trim applied after this calculator's number, not a variable worth modeling here — mark it on your layout, don't subtract it from the board you buy.
What's a birdsmouth cut, and does it use up length?
A birdsmouth is the notch cut into the underside of a rafter where it crosses the wall plate, letting the rafter sit flush on the wall instead of pivoting on its bottom corner. It doesn't shorten the rafter's overall length — the notch is cut into material that's already part of the board — but it does mean the rafter tail (the overhang portion) needs enough extra length beyond the notch for whatever fascia or tail cut you're planning. Buy to the calculator's length, then lay out the birdsmouth and tail cuts on the actual board.
Why does the calculator round up to a specific board length instead of giving me the exact number?
Because you can't buy 13.6 ft of lumber — dimensional lumber is stocked in fixed 2-ft-increment lengths (8, 10, 12 ft, and so on). A computed 13.6 ft rafter needs a 14 ft board; ordering 12 ft would leave every rafter about 19 inches short. The raw computed length is shown separately so you can see exactly how much of the purchased board becomes offcut.
How much offcut waste should I expect?
It varies with how close your raw length lands to a stock increment — anywhere from a few inches to nearly 2 ft per rafter, since stock jumps in 2 ft steps. For a full roof this offcut isn't wasted if you're also cutting shorter pieces (blocking, fascia backing, gusset material) from the same stock — plan those cuts to come from the offcut end before ordering separate lumber for them.
Does this work for hip or valley rafters?
No — this calculator computes common rafters, which run perpendicular to the ridge and eave. Hip and valley rafters run diagonally across the roof plane at a compound angle, and their length uses a different geometric relationship (roughly 1.414× the common-rafter run factor for a standard 45° hip, adjusted further for the actual pitch). Treat any hip/valley sections as a separate calculation — don't use this tool's output for them.
I know my roof pitch already — do I still need the Roof Pitch Calculator first?
No. If you already have a pitch in X/12 notation (from a plan, a contractor's quote, or a previous measurement), enter it directly here. The Roof Pitch Calculator is only needed if you're starting from a raw rise/run measurement — for example, a level held against a rafter in the attic — and need to convert that into X/12 notation first.
What overhang should I use if I haven't decided yet?
12 in (1 ft) is a common default for a standard eave overhang on a residential asphalt-shingle roof, and it's what this calculator starts with. Overhangs commonly range from 6 in on a minimal, budget build up to 24 in or more on a house designed for strong shade or a pronounced eave line — check your plans or match the overhang of an existing structure if you're extending one.
My roof isn't a simple gable — a shed roof, a lean-to, an addition. Does this still apply?
Yes, as long as you can identify one straight run and one consistent pitch for that section. A shed (single-slope) roof's run is just the full horizontal span from the low wall to the high wall — there's no ridge to stop at, so use the actual wall-to-wall run instead of a half-span. Treat each distinct roof plane (main house, porch, dormer) as a separate calculation with its own run and pitch.
Can I use this for roof trusses instead of stick-framed rafters?
Not directly. Engineered trusses are designed and manufactured as a unit by a truss plant from full roof-plan loads, span, and local code requirements — their top-chord length isn't something you self-calculate and then buy stock lumber to match. This calculator is for site-built (stick-framed) common rafters cut from ordinary dimensional lumber.
How is this different from the multiplier the Roof Pitch Calculator already gives me?
It's the same multiplier, applied to a different quantity. The Roof Pitch Calculator's multiplier converts a horizontal footprint area into a sloped roof area — useful for shingles and sheathing bought by area. This calculator applies that same slope factor to a single horizontal length (your run plus overhang) to get a sloped length — useful for a linear piece of lumber. Same geometry, different purchase.
What if my computed length exceeds every stock length you list?
That happens on long spans at steep pitches (a 20+ ft run at 8/12 or steeper easily exceeds 24 ft of rafter). At that point you're outside standard dimensional-lumber territory — talk to a lumberyard about engineered lumber (LVL, I-joists) or a scarf/spliced rafter detail, and involve a structural engineer for spans this large regardless of material, since a rafter this long is carrying real structural loads a calculator can't verify for your specific roof.
Does rafter spacing (16 in vs 24 in on-center) change the length I need?
No — spacing changes how many rafters you need, not how long each one is. Length depends only on run, overhang, and pitch, all of which are the same for every rafter on a given roof plane. Tighter 16 in spacing means more rafters cut to the same length this calculator gives you; wider 24 in spacing means fewer rafters, still at that same length (though wider spacing may require a larger rafter dimension for the same span — that's a separate structural sizing question this calculator doesn't answer).