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.
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 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.
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.
Calculation Formulas
Half the building width W (ft) minus half the actual ridge thickness Rt (in). The rafter stops at the ridge FACE, not the building centerline — IRC R802.3 sets the minimum ridge member.
Example:
24 ft wide, 1.5" (2×) ridge → (24 − 0.125) / 2 = 11.94 ft run
Right-triangle multiplier for a common rafter, where P is the rise per 12" of run. Identical to the PITCH_MULTIPLIERS constant reused from the shingle-square take-off.
Example:
6/12 pitch → √(1 + 0.5²) = √1.25 = 1.11803
Vertical height gained from the plate line to the ridge face over the adjusted run.
Example:
11.94 ft run × 0.5 = 5.97 ft rise
Straight-line length of the rafter from the plate line (seat) to the ridge face, before the overhang tail is added.
Example:
11.94 ft × 1.11803 = 13.35 ft ≈ 13 ft 4-3/16"
The eave tail is cut at the same slope as the main rafter, so the same pitch multiplier applies to the horizontal overhang O (in).
Example:
16" overhang, 6/12 → (16/12) × 1.11803 = 1.49 ft ≈ 1 ft 5-7/8"
Full rafter length including the overhang, rounded UP to the next standard stock length for ordering (never a percentage waste).
Example:
13.35 + 1.49 = 14.84 ft → order 16 ft stock
The plumb cut (ridge and tail) and the level seat cut are complementary and depend only on the pitch. On a speed square, use the pitch number on the common scale.
Example:
6/12 → plumb = arctan(0.5) = 26.57°; seat = 63.43°
The hip runs the diagonal of the plan square, so the horizontal hip run is Run × √2. Do NOT use common length × 1.414 — that shortcut overstates the hip by ~5%.
Example:
12 ft common run, 6/12 → 12 × √(2 + 0.25) = 12 × 1.5 = 18.00 ft
Each successive jack rafter toward the hip corner is shorter than the last by this constant, where S is the rafter spacing (in) and M the common pitch multiplier.
Example:
16" o.c., 6/12 → (16/12) × 1.11803 = 1.49 ft ≈ 17.89" per step
A deterministic count from roof length and spacing S — not a coverage estimate, so no waste multiplier is applied to the count. Budget 1–2 extra pieces as a cut-error buffer.
Example:
40 ft roof at 16" o.c. → ⌈480/16⌉ + 1 = 31 pairs = 62 rafters
Standard Constants
| Constant | Value | Description |
|---|---|---|
| Common pitch multiplier — 6/12 | 1.118 | √(1 + (6/12)²); reused from PITCH_MULTIPLIERS. Ranges 1.031 (3/12) to 1.414 (12/12). |
| Hip / valley multiplier — 6/12 | 1.500 | Exact √(2 + (P/12)²) per foot of common run. Framing-square "17" table value √(17²+6²)/12 = 1.502 (0.13% higher). |
| Ridge board thickness — nominal 2× | 1.5" | Default; a dressed 2× member. Half of this comes off the run (IRC R802.3). |
| Ridge board thickness — nominal 1× | 0.75" | Lighter non-structural ridge board option. |
| Birdsmouth (notch) depth limit | D/4 | IRC R802.7.1 — end-notch depth shall not exceed one-quarter of the actual rafter depth D. (Not the "1/3" figure some sources cite.) |
| Minimum seat bearing | 1.5" | IRC R802.6.1 — minimum bearing for rafters on wood or metal, regardless of notch-depth headroom. |
| Standard rafter spacing | 16" or 24" o.c. | 12" and 19.2" also supported; final spacing is a span-table output, not a free geometric choice. |
| Typical overhang range | 12"–24" | Industry-typical, style/climate driven — NOT an IRC-mandated dimension. |
| Standard stock lengths | 8–24 ft (2-ft steps) | Order length = total rafter length rounded up to the next increment; anything over 24 ft needs an engineered or spliced member. |
Note: All calculations include appropriate waste factors based on project complexity and material type. Results are estimates and should be verified by professionals before purchasing materials.
International Residential Code — Ridge(IRC R802.3)
View StandardMinimum ridge board thickness and depth where rafters are not framed to a structural ridge beam.
Key Requirements:
- •Ridge board not less than 1" nominal thickness
- •Ridge depth not less than the cut end of the rafter
- •Rafters framed to a ridge board or to each other with a gusset/tie
IRC — Rafter Spans(IRC R802.4.1, Tables R802.4.1(1)–(8))
View StandardAllowable rafter spans by species, grade, spacing, and ground snow / dead load. Governs rafter SIZING — deliberately out of scope here; this tool gives geometric length only.
Key Requirements:
- •Select size from species/grade and ground snow load
- •Spacing (12/16/19.2/24" o.c.) sets the allowable span
- •Use an AWC span calculation for values beyond the printed tables
IRC — Rafter Bearing(IRC R802.6 / R802.6.1)
View StandardMinimum bearing length for rafters and ceiling joists on wood or metal supports.
Key Requirements:
- •Not less than 1½" of bearing on wood or metal
- •Not less than 3" of bearing on masonry or concrete
- •Seat cut must preserve the required bearing
IRC — Cutting, Notching & Boring(IRC R802.7 / R802.7.1)
View StandardLimits on notching sawn-lumber rafters and ceiling joists — the rule that governs the birdsmouth.
Key Requirements:
- •End notches shall not exceed one-fourth (D/4) the member depth
- •Notches in the middle third of the span are not permitted
- •Engineered lumber (LVL/I-joists) follows the manufacturer, not R802.7.1
AWC Span Calculator & Design Data(AWC (American Wood Council))
View StandardThe span-calculation tool and design data cited by building departments for rafter sizing beyond the printed IRC tables.
Key Requirements:
- •Species/grade design values feed the IRC span tables
- •Handles loads and spans outside the tabulated set
- •Referenced by many AHJ rafter-sizing handouts
ANSI/AWC National Design Specification(ANSI/AWC NDS)
View StandardThe bending, shear, and deflection design values behind the IRC rafter span tables.
Key Requirements:
- •Reference design values by species and grade
- •Load-duration and wet-service adjustment factors
- •Basis for the same tables used in floor/deck joist sizing
Dimension-Lumber Grading Rules(ASTM D1990 / WWPA / NLGA)
View StandardVisual and mechanical grading rules that assign the No. 2-and-better grades referenced by the span tables.
Key Requirements:
- •Grade stamp identifies species, grade, and mill
- •No. 2 and better is the common structural rafter grade
- •Moisture content (S-DRY ≤ 19%) affects design values
Standards Disclaimer: Standards and codes are subject to periodic updates. Always verify current requirements with local building authorities and professional engineers before beginning construction. Links provided are for reference only.
Ground snow load
Length is fixed; allowable span is not
Higher ground snow load (per the ASCE 7 map or a local IRC amendment) reduces the span a given rafter size can carry. This tool gives geometric length; sizing is a separate, climate-dependent step.
Regional Examples:
High-wind & hurricane fastening
Rafter-to-plate connection
Coastal and high-wind zones require engineered rafter-to-plate connectors (hurricane/rafter ties) beyond standard toe-nailing, and the birdsmouth seat must leave room for them.
Regional Examples:
Overhang length vs. climate
Style and snow/ice both drive it
Overhang is not code-fixed. Heavy-snow regions often favor shorter tails (ice-dam and snow-load on the tail); hot, rainy climates favor longer 18–24" overhangs for shading and wall protection.
Regional Examples:
Ridge beam vs. ridge board
Cathedral & vaulted ceilings
Where ceiling joists or rafter ties cannot form a continuous tension tie (cathedral/vaulted rooms), the IRC requires an engineered structural ridge BEAM rather than a ridge board — the rafters then bear on the beam instead of self-triangulating.
Regional Examples:
Adopted IRC edition
2018 / 2021 / 2024
Code editions differ on some notching, tie, and connection provisions. Confirm the edition your jurisdiction has adopted before relying on a specific clause.
Regional Examples:
Seismic design category
Connection requirements tighten
In higher seismic design categories, rafter-to-ridge and rafter-to-plate connections must resist additional load beyond prescriptive toe-nailing; consult local amendments.
Regional Examples:
Before You Build
- •Contact your local building department for specific requirements
- •Verify frost line depths, wind zones, and seismic requirements for your area
- •Check if permits are required and schedule required inspections
- •Consult with a local contractor familiar with local codes
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
Roof Pitch Calculator
Convert roof pitch between rise:run, degrees, percent grade and slope multiplier. Get sloped roof area, rafter length and code-allowed coverings. Free.
Stud Wall Framing Calculator
Size studs, plates, headers, cripples & nails for 2x4 / 2x6 walls. Per 2021 IRC R602.3, R602.7 header spans & R602.3(1) nailing. Free, no signup.
Roofing & Shingle Calculator
Free roofing & shingle calculator — squares, bundles, underlayment, ridge caps & pitch-adjusted waste. Asphalt, architectural & 3-tab. NRCA-based.
How to Use This Calculator
- Enter your building width (or switch to run-only for an addition or shed roof).
- Select your roof pitch (e.g. 6/12) from the dropdown.
- 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.
- Enter your overhang and rafter spacing (12", 16", 19.2", or 24" o.c.).
- Enter the roof or building length to get a full rafter count, and pick a nominal size for a board-foot cross-reference.
- 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.