RoofingCalculatorHQ

Roof Rafter Calculator

Calculate stick-built common rafter length, count, recommended lumber size for snow load and total cost. Sized to IRC 2024 Table R802.5.1(2).

Roof Rafter Calculator

Calculate rafter length, count, recommended lumber size and total cost for stick-framed common rafters under your local snow load.

Rafter length
16.77
ft each, incl. tail
Count per side
25
at chosen spacing
Total rafters
50
both sides combined
Total lumber
838.5
ft (linear)
Recommended size
2x8
meets snow load
Peak height
7
ft above plate
Lumber cost
$1,300
at $1.55/lf
With 8% waste
$1,404
order quantity

Slope factor: 1.118. Rafter sizing follows IRC R802.5.1(2) (US/CA) with snow-load and spacing de-rating; UK/EU markets use timber size 38×140 / 184 / 235 / 286 mm equivalents — confirm capacity against BS 5268-7.5, EN 1995-1-1 (Eurocode 5) or AS 1684 with a structural engineer for spans above 6.0 m or non-residential loads.

Roof rafter calculator — what this returns

This tool sizes stick-built common rafters and gives you the order quantity for the timber yard:

  • Rafter length per piece, including the eave overhang tail
  • Count per slope and total (both sides)
  • Total linear footage of lumber
  • Recommended size (2x6 / 2x8 / 2x10 / 2x12) auto-selected for your snow load
  • Lumber cost at current 2026 SPF #2 pricing, with an 8% waste allowance

The math follows IRC 2024 Table R802.5.1(2) for prescriptive rafter spans, with snow-load and spacing de-rating applied so the size recommendation tracks your actual ground snow load (Pg) rather than the table’s 30 psf default.

How rafter sizing works under the IRC

A common rafter is sized for two limits: bending strength and live-load deflection. The IRC tabulates allowable horizontal spans for each combination of lumber size, species, grade, spacing and load case. The rules:

Rule 1 — design loads. The R802.5.1(2) table assumes 10 psf top-chord dead load (asphalt shingles, sheathing, underlayment, drywall ceiling) and the snow live load you specify. If your dead load is higher (concrete tile, slate, metal-and-batten with ice-and-water), step up to R802.5.1(3) which uses 20 psf dead. Adding a solar PV array nominally adds 4–5 psf dead but most jurisdictions allow it without size escalation up to 30 psf snow.

Rule 2 — span direction. The span in the table is the horizontal projection — wall plate to ridge measured flat, not along the slope. The calculator uses your span input as the full building width and divides by 2 for the half-span that each common rafter carries.

Rule 3 — snow-load de-rating. For Pf ≠ 30 psf, the allowable span scales by √(30/Pf). The IRC contains separate tables for 50 psf and 70 psf, and the calculator interpolates between them. Above 70 psf you need engineered drawings.

Rule 4 — spacing multiplier. The base table is 16” OC. Tighter spacing (12”) gives a ~10% bonus to allowable span; wider spacing (24”) drops it by ~15%. The calculator applies these directly so you can compare the lumber-take savings of going 24” OC against the size escalation.

Worked example — 28 ft × 32 ft house, 6/12 pitch

Inputs: 28 ft span, 32 ft long, 6/12 pitch, 16” OC, 30 psf snow, SPF #2, 1 ft overhang.

Computation:

slopeFactor      = √(1 + (6/12)²) = 1.118
half-span run    = 14 ft
rafter length    = (14 + 1) × 1.118 = 16.77 ft each
count per side   = ceil(32 / 1.333) + 1 = 25
total rafters    = 50
total lumber     = 50 × 16.77 = 838 ft
2x10 SPF #2 max  = 18'-5" at 30 psf, 16" OC, 6/12 — covers 14 ft horizontal
lumber cost      = 838 × $1.85 = $1,550
with 8% waste    = $1,673 → order qty
peak height      = 14 × 0.5 = 7.0 ft above plate

The mill cuts 18 ft 2x10s, you trim to 16’-9” with a 5” plumb cut at the ridge and a bird’s-mouth at the wall. Order 54 sticks (50 + 8% waste) at 18 ft.

Lumber size table — IRC R802.5.1(2) at 30 psf snow, 16” OC, 10 psf dead

SizeSPF #2Doug-Fir / Larch #2Southern Pine #2Hem-Fir #2
2x611’-5”12’-6”12’-0”11’-2”
2x814’-6”16’-0”15’-6”14’-2”
2x1018’-5”20’-6”20’-0”18’-0”
2x1222’-6”24’-6”24’-0”21’-10”

Source: IRC 2024 Table R802.5.1(2). Values for L/180 deflection limit, no rafter tie reduction.

For higher snow loads, reduce by:

  • 50 psf: multiply allowable span by 0.78
  • 70 psf: multiply by 0.65
  • 90 psf (mountain): multiply by 0.58 — and stop using the table; engineer required.

Pricing — Q1 2026 reference data

Random Lengths Composite has averaged $440/MBF for SPF #2 KD through April 2026, ticking up about 8% from 2025 lows. Translated to retail:

  • 2x6 SPF #2: $1.10–$1.35/lf at the box stores; $0.95–$1.15/lf at pro yards
  • 2x8 SPF #2: $1.45–$1.70/lf
  • 2x10 SPF #2: $1.70–$2.05/lf
  • 2x12 SPF #2: $2.30–$2.75/lf

Douglas-fir runs +20–25%; Southern Pine runs +10–15% in the Southeast and equal to SPF in the Northeast. Cedar and redwood for exposed-rafter cathedral ceilings runs $4.50–$7.00/lf in 2x6, but you’ll typically order #1 grade or appearance grade at that price — graded lumber for visible work, not framing.

For a typical 28 ft × 32 ft house, the rafter package alone is $1,500–$1,800 in lumber, plus another $200–$300 in collar ties, ridge board (1x12), and joist hangers / Simpson H1s for the rafter-to-plate connection. Crew time to stick-frame: 2 carpenters × 12–14 hours = 24–28 labor hours.

Code requirements (US)

  • IRC R802.4 — Allowable spans. Use Tables R802.4.1(1) through R802.4.1(8) for ceiling joists; R802.5.1(1) through R802.5.1(9) for rafters, by load case.
  • IRC R802.4.6 — Rafter ties. When ceiling joists run perpendicular to rafters (uncommon), you need wood structural ties at not more than 4 ft on center, sized per R802.5.2.
  • IRC R802.5.2 — Ridge board. A 1-inch nominal ridge board is required for rafters up to 16 ft and 1.25” (5/4 nominal) for spans above. For ridge beam construction (no joists / cathedral ceilings), the beam is engineered, not prescriptive.
  • IRC R802.5.2.1 — Heel joint connection. Rafter to ceiling joist nailing per Table R802.5.2 — typically (5) 16d common nails at the heel, increased for high-wind zones.
  • IRC R802.7 — Notching. Rafters can be notched only at the support ends (bird’s-mouth) and not deeper than 1/4 the depth. Field-notching the body is prohibited.
  • IRC R802.10 — Wood trusses. If you’re cross-shopping with prefab trusses, the roof truss calculator compares the lumber and labor side-by-side.

Stick-build vs prefab decision

Build rafters on site when:

  • Your span is under 22 ft and you’re inside the IRC table — no engineering needed
  • You’re framing a cathedral ceiling with exposed rafter tails (architectural look)
  • Crane access is restricted and the truss yard is over 60 mi away
  • You want to lay out the bird’s-mouth and ridge cuts to match an existing wing on a remodel

Order trusses when:

  • Span is over 24 ft — table runs out and engineering is required either way
  • Building length is over 24 ft — labor savings dominate
  • You want a clear-span attic with no interior bearing wall
  • The roof shape is complex (girder trusses for hip ends, cathedral scissors over the great room)

For most subdivision houses (28–32 ft span, 32–48 ft long, 4/12–8/12 pitch), the lumber package costs the same and trusses go up in 1/3 the labor — the roof truss calculator gives you the exact comparison number.

Pair with these calculators

When you change any input above, the output updates immediately. Print the page with your inputs locked in and bring it to your lumber yard for a take-off quote — most pro yards will price-match a take-off list within 5%.

Frequently asked questions

How long is a rafter for a 28 ft span at 6/12 pitch?
Rafter length per side = (span / 2) × √(1 + (rise/run)²). For 28 ft at 6/12: 14 × 1.118 = 15.65 ft of structural run, plus your overhang. A 1 ft eave brings the order length to 16.65 ft per rafter — round up to the next 18 ft 2x10 SPF #2 from the lumber yard before plumb-cut at the ridge and bird's-mouth at the wall plate.
What size rafter do I need for a 16 ft span?
Per IRC R802.5.1(2), 30 psf snow load and 16" OC spacing, SPF #2 is good for: 2x6 to 11'-5", 2x8 to 14'-6", 2x10 to 18'-5", 2x12 to 22'-6". A 16 ft horizontal span needs 2x10. Up the species to Douglas-fir or Southern Pine for tighter pricing on a 2x8 if your jurisdiction allows. The calculator picks the smallest qualifying size automatically once you enter your snow load.
How many rafters do I need for a 32 ft long house?
Count per side = ceil(building length ÷ spacing) + 1. For a 32 ft long building at 16" OC: ceil(32 ÷ 1.333) + 1 = 25 rafters per side. Both slopes combined = 50 rafters. The +1 covers the gable-end rafter that bears on the end wall instead of the wall plate.
What spacing should I use for roof rafters?
16" on-center is the residential default in the US — it's what 7/16" OSB sheathing is rated for, and the IRC tables are calibrated to it. 24" OC is allowed in low-snow climates with 5/8" OSB and saves about 33% on rafter count, but you'll up-size the lumber by one nominal size on most spans. 12" OC is used on high snow or commercial loads where you want stiffer deflection.
How much does roof rafter lumber cost in 2026?
SPF #2 dimensional lumber is averaging $1.20/lf for 2x6, $1.55/lf for 2x8, $1.85/lf for 2x10 and $2.50/lf for 2x12 through Q1 2026 — based on big-box and pro-yard quotes in the mid-Atlantic. Add 25% for kiln-dried Douglas-fir, 12% for Southern Pine, and 60–80% for cedar or redwood. The calculator outputs both raw lumber cost and a +8% waste figure, which is what you should actually order.
Do I need an engineer for a stick-framed roof?
Not if your span, spacing, snow load and lumber match a row in IRC Table R802.5.1(2). The inspector will sign off on a prescriptive layout without sealed drawings. You need an engineer for: spans above the table (typically over 22 ft for any size), unusual loads (slate, solar, green roofs above 15 psf dead load), cathedral ceilings without rafter ties, ridge beams supporting the rafter thrust, or hip and valley framing that doesn't fit into the 'common rafter' simplification.
What's the difference between a rafter and a joist?
A rafter runs at an angle from the wall plate to the ridge and carries the sloped roof loads. A ceiling joist runs flat from wall plate to wall plate and carries gravity loads from drywall and attic storage. In a stick-framed gable, the joists also act as rafter ties — they resist the outward thrust the rafters apply to the wall plates, which is why IRC R802.4.6 requires them to be tied to the rafter feet with a specific nailing pattern when the span is over 12 ft.
How does snow load change the rafter size?
Allowable rafter span scales roughly with √(30/Pf), so doubling the snow load drops the allowable span by 30%. A 2x10 SPF that goes 18'-5" at 30 psf only goes 14'-6" at 50 psf, and 13'-0" at 60 psf. The calculator de-rates automatically when you enter your local Pg. For mountain climates over 70 psf and any roof carrying solar arrays, get the engineer involved — at that point you're often jumping to LVL ridge beams and 16" or 18" engineered I-joist rafters.

Related calculators

📋 Embed this calculator on your site (free, attribution required)

Free to embed on any non-commercial or commercial site, provided the attribution link remains visible. No tracking, no email capture, just the calculator.