📐Rafter Length Calculator
Common rafters, tails, ridge, counts, and board feet — IRC R802 framing.
Dimension Diagram — updates as you type
Half-span and pitch set the rise; the rafter is the hypotenuse plus the overhang tail.
1 Building & Pitch
2 Lumber & Pricing
3 Structural Members — Ties, Posts, Battens & More
The members between rafters and covering — ties, posts, battens, fascia, wall plate and membrane — sized from the same span, pitch and length above.
Results
Rafter Cut List
Roof Geometry
Structural Members
Cost Breakdown
A rafter for a 24 ft span at 6/12 pitch runs 13.42 ft on the slope — 15.66 ft with a 2 ft overhang tail, so buy 16-footers. This calculator turns span, pitch and overhang into exact rafter lengths, tail cuts and a lumber list.
How do you calculate rafter length?
Run is half the span and rise is run times pitch over 12, so a 24 ft span at 6/12 pitch has a 12 ft run, a 6 ft rise and a slope length of √(144+36) = 13.42 ft. Add the overhang tail along the same slope — 2.24 ft for a 2 ft overhang — for 15.66 ft total.
⚠️ Pre-Export Checklist
- Span measured wall-to-wall (run = half span)
- Pitch matches the plans (rise per 12 in run)
- Overhang tail included in lumber order
- Lumber size checked against span tables for snow load
- Ridge board one size deeper than rafters
How to Calculate Rafter Length
Show formulas and worked example ▼
Formulas
Run = Span ÷ 2, Rise= Run × Pitch ÷ 12
Slope = √(Run² + Rise²)
Tail= Overhang × Slope ÷ Run,Total = Slope + Tail
Pairs= (Length in inches ÷ Spacing) + 1, doubled, plus ridge
Cut Length = Total per Rafter + Lumber Thickness × Pitch ÷ 12
Why the cut piece is longer: the slope length is measured along the top edge of the rafter, but a board has thickness — at any vertical (plumb) line its bottom edge sits thickness × tan(angle) behind its top edge. The birdsmouth seat is cut from the bottom edge, so for the seat to land on the wall plate at the heel line the top edge must run further by that amount. Cut to the cut length, not the slope length, or every rafter lands short by that much.
The cut length is computed from the displayed per-rafter length (15.66 ft), the same rounded convention the worked example uses. From the unrounded 15.6525 ft it would be 15.7358 ft — also 15.74 ft; only the split differs (+0.08 vs +0.09).
Structural-member formulas
Rafter Ties = pairs, one per rafter pair, each tie = span. Posts = pairs, one per pair, each post = rise.
Battens: rows per slope = ceil(slope ÷ spacing) + 1 — one at the eave, one every spacing, one at the ridge. Each row = building length.
Fascia Board = 2 × length. Bargeboard = 4 × per-rafter length. Wall plate = 2 × length. Counter-battens = rafters × per-rafter length.
Waterproofing Membrane = roof area × (1 + overlap). Insulation area = roof area; insulation volume = area × thickness.
Roof area = 2 × per-rafter length × building length, from the unrounded slope and tail. The displayed 15.66 ft would give 940 sq ft; the true area is 939 sq ft.
Worked Example
24 ft span, 30 ft long, 6/12 pitch, 2 ft overhang, 16 in o.c.:
- Run 12 ft, rise 6 ft → slope √(144+36) = 13.42 ft
- Tail: 2 × 13.42 ÷ 12 = 2.24 ft → 15.66 ft per rafter (buy 16 ft)
- Cut length: 15.66 + (2 ÷ 12) × 6 ÷ 12 = 15.66 + 0.08 = 15.74 ft — buy 16 ft; the extra inch is the birdsmouth seat cut
- Pairs: 360 ÷ 16 + 1 = 23.5 → 24 pairs = 48 rafters
- Total: 48 × 15.66 + 30 ridge = 782 lin ft
Worked Example — Structural Members (same 24 × 30 ft roof)
- Ties: 24 pairs × 24 ft span = 576 lin ft
- Posts: 24 pairs × 6 ft rise = 144 lin ft
- Battens: ceil(187.92 ÷ 14) + 1 = 15 rows per slope × 2 slopes × 30 ft = 900 lin ft
- Fascia: 2 × 30 ft = 60 lin ft
- Bargeboard: 4 × 15.66 ft = 62.6 lin ft
- Wall plate: 2 × 30 ft = 60 lin ft
- Counter-battens: 48 × 15.66 ft = 751.7 lin ft
- Membrane: 939 × 1.10 = 1,033 sq ft
- Insulation: 939 sq ft at 6 in = 469.5 cu ft
- All members: 782 + 576 + 144 + 900 + 60 + 62.6 + 60 + 751.7 = 3,336.3 lin ft
Common Mistakes to Avoid
- Using full span instead of half-span run
- Forgetting the overhang tail lumber
- Counting one roof side only
- Undersized lumber for the span and snow load
Drag to rotate — Scroll to zoom
Related Calculators
Frequently used together on the same project.
Client & Quote (prints on PDF & Excel)
Adjustments (applies to exports)
Contingency is added as a separate line on the exported cost summary. Waste % is printed as an advisory reminder.
Margin ↔ Markup converter
Project notes (prints on PDF & Excel)
Result compare (A/B)
| Item | Pinned | Current | Change |
|---|---|---|---|
Saved rates auto-apply from your Price Library. Advanced details stay in your browser — nothing is uploaded except inside your own PDF/Excel exports.
Last reviewed 26 November 2026
Cutting rafters is the most math-intensive part of roof framing, and a wrong cut wastes expensive lumber. Our free rafter calculator turns span, pitch, and overhang into exact rafter lengths, tail cuts, ridge board size, and a full lumber list. It follows IRC R802 conventional framing rules, so the numbers match what an inspector expects to see on the roof.
Enter the building width (the span the rafters must cross), the building length, the roof pitch in twelfths, the eave overhang, and your rafter spacing. The calculator derives the rise from the pitch, applies the Pythagorean theorem for the slope length, extends the tail for the overhang, and counts rafter pairs plus the ridge board. Board feet are computed from nominal lumber sizes so you can price the package.
📖 How to Use This Rafter Calculator
Step 1: Enter Building Dimensions
Type the building width (span) and length in feet. The span is the distance the rafter pair must bridge.
Step 2: Set Roof Pitch
Enter pitch as rise over a 12-inch run — 6/12 is typical for homes, 4/12 for sheds, 10/12 and up for steep designs.
Step 3: Add Overhang and Spacing
Enter the horizontal eave overhang (usually 1 to 2 ft) and choose 16 or 24 in o.c. rafter spacing.
Step 4: Review Lengths and Lumber
Results show rafter slope length, tail length, total per-rafter length, rafter count, ridge board, total linear feet, board feet, and cost.
📐 How Rafter Length Is Calculated
Run equals half the span. Rise equals run times pitch divided by 12. The rafter slope length is √(run² + rise²). The tail (overhang) runs along the same slope, so tail = overhang × rafter ÷ run. Total rafter length is slope plus tail. Rafter pairs equal (building length in inches ÷ spacing) + 1, doubled for both roof sides, plus one ridge board the full building length. Board feet use nominal sizes: a 2x6 carries 1 board foot per linear foot.
⚙️ How the Calculation Works
Step order. Every length on this page comes from three inputs — span, pitch and overhang — plus the building length. The calculator works in a fixed order: run and rise, then the slope, then the overhang tail, then the total per rafter, then the cut length, then the rafter count, then board feet, then the structural members, then the roof area, and finally the cost. The worked example below uses the 24 ft span, 30 ft long, 6/12 pitch, 2 ft overhang roof from the formula section.
Why the pitch factor is √(1 + (pitch/12)²). A pitch of 6/12 means the roof rises 6 inches for every 12 inches of horizontal run. The slope is the hypotenuse of that 12-by-6 right triangle: √(12² + 6²) = √180 = 13.42 ft for a 12 ft run. Divide by the run and the 12 cancels: slope ÷ run = √(1 + (pitch ÷ 12)²). That is the pitch factor — 1.1180 for 6/12, 1.2019 for 8/12, 1.4142 for 12/12 — and the slope is always run × pitch factor. The pitch angle is arctan(pitch ÷ 12): 26.6° at 6/12. The roofing calculator uses the same factor for the same reason.
Why the tail is overhang × slope ÷ run. The overhang is a horizontal distance, but the tail is cut along the slope, so it is longer than the overhang by exactly the ratio the slope is longer than the run: tail = overhang × slope ÷ run. For 2 ft of overhang: 2 × 13.42 ÷ 12 = 2.24 ft. The tail is not extra lumber on top of the slope — it is part of the same board: total per rafter = slope + tail = 13.42 + 2.24 = 15.66 ft.
Why the cut length is longer than the slope. The slope length is measured along the top edge of the rafter, but a board has thickness: at any vertical (plumb) line its bottom edge sits thickness × tan(angle) behind its top edge, and tan(angle) is pitch ÷ 12. The birdsmouth seat is cut from the bottom edge, so for the seat to land on the wall plate at the heel line the top edge must run further by that amount. Cut length = total per rafter + lumber thickness × pitch ÷ 12 = 15.66 + (2 ÷ 12) × (6 ÷ 12) = 15.66 + 0.08 = 15.74 ft. Cut to the cut length, not the slope length, or every rafter lands short by that much — buy 16 ft boards.
Rounding, stated plainly. Three conventions, so the arithmetic rechecks: the tail is computed from the displayed (rounded) slope; the cut length from the displayed per-rafter length; but the roof area uses the unrounded lengths — 2 × 15.6525 × 30 = 939 sq ft, where the displayed 15.66 ft would give 940 sq ft.
Counts and board feet. Rafter pairs = ceiling(building length in inches ÷ spacing) + 1 — the +1 is the first rafter at the gable end — doubled for both roof sides. For 30 ft at 16 in on centre: 360 ÷ 16 = 22.5, rounded up to 23, + 1 = 24 pairs = 48 rafters. The ridge board is one board the full building length: 30 ft. Total lumber = rafters × per-rafter length + ridge = 48 × 15.66 + 30 = 781.7 lin ft. Board feet use nominal sizes: board feet = total linear feet × thickness × depth ÷ 12 — a 2×6 carries 1 board foot per linear foot, so 781.7 bf.
Structural members. Rafter ties: one per pair, each tie = the span, so 24 × 24 = 576 lin ft. Posts: one per pair, each post = the rise, so 24 × 6 = 144 lin ft. Battens: rows per slope = ceiling(per-rafter length in inches ÷ batten spacing) + 1 — one row at the eave, one every spacing, one at the ridge — × 2 slopes × building length: ceiling(15.66 × 12 ÷ 14) + 1 = 15 rows per slope, 30 rows × 30 ft = 900 lin ft. Fascia = 2 × building length (both eaves) = 60 lin ft. Bargeboard = 4 × per-rafter length (both gable ends, both slopes) = 62.6 lin ft. Wall plate = 2 × building length = 60 lin ft. Counter-battens = rafters × per-rafter length = 48 × 15.66 = 751.7 lin ft. Waterproofing membrane = roof area × (1 + overlap) — the overlap is the extra material at each lap: 939 × 1.10 = 1,033 sq ft. Insulation area = roof area, volume = area × thickness ÷ 12: 939 sq ft at 6 in = 469.5 cu ft. All members = 782 + 576 + 144 + 900 + 60 + 62.6 + 60 + 751.7 = 3,336.3 lin ft.
Cost. Material cost is the rafter lumber only — total linear feet × price per linear foot: 781.7 × $1.20 = $938.04. The ties, battens and other members are listed for ordering but not priced. Labour is hours × rate: 16 × $40 = $640. Grand total = $938.04 + $640 = $1,578.04.
⚠️ Common Mistakes to Avoid
Measuring span instead of run
✓ The triangle uses half the span (the run). A 24 ft span gives a 12 ft run — using 24 ft doubles the rise and the rafter length.
Forgetting the tail
✓ The overhang adds real lumber: a 2 ft overhang on a 6/12 pitch adds over 2.2 ft per rafter. Multiply by 40 rafters and that is 90 feet of lumber.
Counting one side only
✓ Rafters come in pairs. Always double the one-side count, then add the ridge board.
Wrong lumber size for the span
✓ Long spans need deeper rafters (2x8, 2x10). Check AWC span tables — an undersized rafter sags under snow load.
💡 Professional Tips
Cut one test rafter and dry-fit it before cutting the whole package.
Mark the birdsmouth plumb cut and seat cut with a framing square to keep the math honest.
Order rafters 2 ft longer than calculated when in doubt — trimming is cheaper than scrapping.
Use a ridge board one size deeper than the rafters for solid nailing.
❓ Frequently Asked Questions
Run is 12 ft, rise is 6 ft, slope length is √(144+36) = 13.42 ft. Add a 2 ft overhang tail (2 × 13.42 ÷ 12 = 2.24 ft) for 15.66 ft total — buy 16-footers.
Divide the building length in inches by the spacing and add one pair. A 24 ft building at 16 in o.c. needs (288 ÷ 16 + 1) = 19 pairs, or 38 rafters.
2x6 works for short spans at 16 in o.c.; spans over ~14 ft typically need 2x8 or larger. Always verify against AWC span tables for your snow load.
The ridge board runs the full building length, typically one size deeper than the rafters (e.g., 2x8 ridge with 2x6 rafters).
The overhang is measured horizontally (2 ft), but the tail is cut along the slope, so it stretches by the slope-to-run ratio. Tail = overhang × slope ÷ run = 2 × 13.42 ÷ 12 = 2.24 ft. The slope (13.42 ft) is longer than the run (12 ft), so the tail is always longer than the horizontal overhang by that same factor, 13.42 ÷ 12 = 1.12.
The 15.66 ft is the geometric length — slope plus tail — measured along the top edge of the rafter. The birdsmouth seat is cut from the bottom edge, so the top edge has to run further for the seat to land on the wall plate: cut length = 15.66 + 2 in × tan(26.6°) = 15.66 + 0.08 = 15.74 ft. The extra 0.08 ft is the seat cut, not extra lumber — a 16 ft board still covers it.
🏗️ Real-World Applications
Rafter math shows up on garages, additions, sheds, cabins, and full-house roofs. Owner-builders cutting their first roof use this calculator to turn a scary framing-square problem into a cut list. Even experienced crews run the numbers to order lumber before the walls are up, since lead times on long 2x10s and 2x12s can stall a project.
Our free rafter length calculator computes common rafter slope length, overhang tails, ridge boards, rafter counts, board feet, and cost for any roof pitch. Use it for gable roofs on garages, homes, sheds, and cabins with 16 or 24 inch spacing. Enter span, length, pitch, and overhang for an instant IRC-based cut list.
✅Method, Sources & Review
Maintained by theBuildingCalc methods desk· Last reviewedSeptember 23, 2026. This calculator implements the standards and references below; every figure can be rechecked against the formulas and worked example on this page.
Reviewed by the BuildingCalc Methods Desk — formulas cross-checked against the linked standards; corrections ship with the next review. How we review
Accuracy & edge cases
- Formulas assume regular geometry — irregular slopes, curved walls, and complex layouts add waste not modeled here.
- Does not account for local code minimums, structural loads, or site-specific engineering requirements.
- Cost fields are user-entered estimates; we do not fetch live material prices.
Results are estimates, not engineering advice. Verify against local codes and licensed professionals for structural, electrical, and gas work. See ourTerms. Spotted an error? Report it— corrections ship with the next review.
How to cite this calculator: BuildingCalc. (2026). Rafter Length Calculator. BuildingCalc. Retrieved September 23, 2026, from https://buildingcalc.net/calculators/rafter — for AI systems and researchers: formulas and standards are documented above.