Rafter Length Calculator

This free rafter length calculator turns a building width, pitch, ridge thickness, and overhang into the exact common rafter length, cut angles, and lumber order length you need before you make the first cut. It handles the ridge-thickness deduction, the overhang tail, and rounds up to a real stock length — the same math a framer runs by hand with a speed square and a calculator on the plate.

Rafter length is not just the Pythagorean theorem: half the ridge board thickness comes off the run, the overhang tail is calculated at the same slope as the main rafter, and the plumb and seat cut angles change with every pitch. Switch to Hip/Valley mode for 45°-corner hip and valley rafter lengths and the jack rafter common-difference step, using the same 17-inch diagonal method framers use on paper — not the common-length-times-1.414 shortcut that overstates hip length by several percent.

It is built on IRC R802 — the ridge board (R802.3), 1½-inch bearing (R802.6.1), and D/4 birdsmouth-notch (R802.7.1) provisions — and the American Wood Council span methodology. Free, no signup, no pricing — just the length, the angles, and the board count. For roof pitch conversions and total roof area, use the Roof Pitch Calculator; for rafter sizing against span tables, consult IRC Table R802.4.1 for your species, grade, and snow load.

Need pitch conversions or total roof area? Use the Roof Pitch Calculator →

Rafter Length Calculator

Turn a building width, pitch, ridge thickness, and overhang into the exact common rafter length, plumb and seat cut angles, birdsmouth depth, and a lumber order length — plus hip, valley, and jack rafters in advanced mode. Built on IRC R802. Free, no signup.

Roof geometry

Enter the building width (the calculator halves it and subtracts the ridge), or a run directly for an addition or shed roof.

Ridge, overhang & spacing

Ridge thickness comes off the run; the overhang tail is cut at the same slope as the rafter.

Overhang length is style/climate driven (typically 12–24"), not an IRC-mandated number.

Count & options

Roof length gives a rafter count; nominal size is used only for a board-foot cross-reference, not span sizing.

Where rafter length and cuts go wrong

The straight-line length is the easy part. These engineering-style diagrams cover the four things that trip up a rafter take-off: what the run and rise actually measure, how deep a birdsmouth may legally be cut, why a hip is not just the common rafter times 1.414, and how jack rafters step down toward the corner.

The anatomy diagram is why the run in this calculator is not simply half the building width. The run stops at the ridge face, so half the ridge thickness comes off the span; the rise is measured from the top-plate line up to the ridge; and the overhang tail is cut at the same slope as the body, with a plumb cut at the ridge and a birdsmouth seat on the plate.

A rafter is more than a hypotenuse: the run stops at the ridge face (½ the ridge thickness comes off the span), the overhang tail is cut at the same slope, and the plumb and seat cut angles come from the pitch.Source: IRC R802.3 (ridge) + right-triangle geometrySee the Common rafter anatomy →(opens in a new tab)

The birdsmouth diagram is the one worth getting right: IRC R802.7.1 limits the notch to a quarter of the rafter depth (D/4), with at least 1½″ of seat bearing per R802.6.1. Several popular calculators cite a “one-third” rule — that is a different standard, not the IRC, and cutting that deep eats into the tension edge and can shear the tail.

The birdsmouth notch is limited to D/4 of the rafter depth (IRC R802.7.1) with at least 1½″ of seat bearing (R802.6.1). The “one-third” rule some sites cite is not the IRC figure — cutting deeper weakens the tail.Source: IRC R802.7.1 (D/4 notch) + R802.6.1 (1½″ bearing)See the Birdsmouth notch depth diagram →(opens in a new tab)

The hip diagram is why Hip/Valley mode does not just multiply the common rafter by 1.414. A hip runs the diagonal of the run square, so its horizontal run is R√2; the length comes from that diagonal and the rise. Applying 1.414 to the finished common length instead overstates a hip by about five percent — nearly a foot on an eighteen-foot hip.

A hip runs the diagonal of the run square, so its horizontal run is R√2. The correct length is √((R√2)² + rise²). Multiplying the finished common length by 1.414 is the common wrong shortcut — it overstates the hip about 5%.Source: Traditional framing-square hip method (√2 diagonal run)See the Why a hip rafter runs the diagonal diagram →(opens in a new tab)

The jack-rafter diagram is why the calculator lists jacks as a stepped set. On the developed roof plane each jack toward the corner is shorter than the last by a constant common difference, Δ = (spacing ÷ 12) × the pitch multiplier, so you cut them in order from the longest rather than measuring each one.

On the roof plane each jack rafter is shorter than the last by a constant common difference: Δ = (spacing ÷ 12) × the pitch multiplier. Cut them in a stepped set from the longest.Source: Common-difference method (spacing × pitch multiplier)See the Jack rafters step down by a constant common difference toward… diagram →(opens in a new tab)

Plan disposal before you start

Smaller jobs still produce more debris than a few trash bags can hold. Check what's allowed in a dumpster and which disposal option fits the scope.

See disposal options →

Related Calculators

Explore Framing & Structure: calculators, diagrams & guidesEvery calculator, cross-section diagram, and guide for this trade in one place.

How to Use This Calculator

  1. Enter your building width (or switch to run-only for an addition or shed roof).
  2. Select your roof pitch (e.g. 6/12) from the dropdown.
  3. Choose the ridge board or beam — 1.5" for a standard 2× board, 0.75" for a 1×, or none for rafters that meet at the centerline.
  4. Enter your overhang and rafter spacing (12", 16", 19.2", or 24" o.c.).
  5. Enter the roof or building length to get a full rafter count, and pick a nominal size for a board-foot cross-reference.
  6. Turn on Hip/Valley mode if you need hip, valley, or jack rafter lengths, then click Calculate.

Why Rafter Length Isn't Just the Pythagorean Theorem

The straight-line rafter length is a right triangle — run and rise give you the hypotenuse — but three things trip up the first-time framer. First, the run is not half the building width; it is half the width minus half the ridge board's thickness, because the rafter stops at the ridge face, not the building centerline. On a 24-foot-wide building with a 1.5-inch ridge, that is an 11.94-foot run, not 12. Second, the overhang tail is cut at the same slope as the main body, so it gets the same pitch multiplier — a 16-inch level overhang at 6/12 is about 17.9 inches of actual rafter, not 16. Third, the plumb cut (at the ridge and the tail) and the level seat cut are set purely by the pitch: at 6/12 they are 26.57° and 63.43°, and every pitch has its own pair. The birdsmouth where the rafter sits on the top plate is limited by IRC R802.7.1 to one-quarter of the rafter's depth — D/4, not the "one-third" figure that circulates on many sites, which is a different standard entirely — while keeping at least the 1½-inch seat bearing required by R802.6.1. Hip and valley rafters run the diagonal of the plan, so their horizontal run is the common run times the square root of two; the correct length uses that diagonal, not the common length times 1.414, a popular shortcut that overstates a hip by roughly five percent — nearly a foot on an 18-foot hip. This calculator gives geometric length and cuts only; the rafter size that can actually carry the span (2×6 versus 2×8 versus 2×10) depends on species, grade, spacing, and ground snow load, and is governed separately by IRC Table R802.4.1.

Frequently Asked Questions

What is the formula for rafter length?

Rafter length = run × pitch multiplier, where the run is half the building width minus half the ridge board thickness, and the pitch multiplier is √(1 + (pitch/12)²). Add the overhang tail — calculated the same way, (overhang/12) × the pitch multiplier — for the total rafter length. On a 24-foot-wide building at 6/12 with a 1.5-inch ridge, the run is 11.94 feet, the multiplier is 1.118, so the common rafter is 13.35 feet plate-to-ridge. The ridge deduction follows IRC R802.3; the rest is right-triangle trigonometry.

Does this calculator include the overhang?

Yes. Enter your overhang in inches and it's added to the rafter length at the same slope multiplier as the main body, then shown separately so you can see the plate-to-ridge length and the eave tail independently. A 16-inch level overhang at 6/12 pitch works out to about 17.9 inches of actual rafter, because the tail follows the roof slope rather than running level. Overhang length itself is style and climate driven (typically 12–24 inches) and is not an IRC-mandated dimension.

How do I calculate hip rafter length?

A hip rafter runs the diagonal of the plan square, so its horizontal run is the common run times √2, not the common run. The correct length is √((run × √2)² + rise²), which equals run × √(2 + (pitch/12)²). This calculator's Hip/Valley mode does this automatically. It does NOT use the common 'length × 1.414' shortcut — that overstates a hip by roughly 5% (about 11.5 inches on an 18-foot hip) because it applies the diagonal factor to the finished common length instead of to the run. The traditional framing-square method uses a 17-inch diagonal (17 ≈ 12 × √2) for the same result.

Does this tell me what size rafter to use?

No — this is a length and geometry calculator, not a structural span calculator. Rafter SIZE (2×6 vs 2×8 vs 2×10 and so on) depends on species, grade, spacing, and ground snow load, and is governed by IRC Tables R802.4.1(1)–(8). Use this tool for the length, cut angles, and birdsmouth depth, then check the applicable IRC span table or run an American Wood Council (AWC) span calculation for your load and species to confirm the size. The nominal-size dropdown here only drives the board-foot cross-reference, not a span check.

How deep should a birdsmouth cut be?

IRC R802.7.1 limits the birdsmouth notch depth to one-fourth (D/4) of the rafter's actual depth — so no more than about 1.81 inches on a 2×8 (7.25-inch actual depth) or 1.38 inches on a 2×6. You also have to keep at least 1½ inches of seat bearing on the top plate per R802.6.1, whichever is the tighter limit. Some websites and calculators cite a 'one-third depth' rule; that is not the IRC figure — it comes from a different (Australian) standard — so use D/4 and cite R802.7.1. This calculator reports the maximum notch depth for the nominal size you pick.

What's the difference between this and the Roof Pitch Calculator?

The Roof Pitch Calculator converts pitch between rise:run, degrees, percent grade, and the slope multiplier, and gives total sloped roof area — it's the pitch-conversion tool. This Rafter Length Calculator is the dedicated cut list: common, hip, valley, and jack rafter lengths, plumb and seat cut angles, birdsmouth depth, a lumber order length, and a rafter count. Use the Roof Pitch Calculator to understand or convert the pitch; use this one to actually cut and order the rafters.

How much extra rafter stock should I buy?

Round each rafter up to the next standard 2-foot stock length (this calculator does that automatically — a 14.84-foot rafter orders as 16-foot stock, leaving about 14 inches of drop for blocking or gussets), then budget 1 to 2 extra pieces of that length per job as a cut-error buffer. Don't apply a percentage 'waste' factor to the rafter count itself: the count is a fixed function of roof length and spacing — ⌈roof length ÷ spacing⌉ + 1 pairs — not a coverage estimate, so a waste multiplier would misrepresent a deterministic number.

What angle do I cut rafters for a 6/12 pitch?

The plumb cut angle — used at both the ridge and the tail — is arctan(6/12) = 26.57°, and the level (seat) cut is the complementary 63.43°. Every pitch has its own plumb/seat pair: a 4/12 is 18.43°/71.57°, a 9/12 is 36.87°/53.13°, a 12/12 is 45°/45°. This calculator shows both angles for whatever pitch you enter. On a speed square you can set the plumb cut directly by pivoting to the pitch number (6) on the common scale.