Rafter LengthCalculator
Common RafterHip RafterValley RafterJack RafterShed & Lean-ToBirdsmouthRafter AngleRoof PitchRafter SpanRafter SizeGambrel RafterRafter Length ChartHow-To GuideAboutReport an Error
Home › Rafter Size Calculator
Code Tables

Rafter Size Calculator

The span tables read backwards: give it the span you must cross and your conditions, and it returns the smallest rafter size the IRC 2021 tables allow — 2×4 through 2×12, four No. 2 species.

Rafter Size Calculator

Results update as you type
ft

Smallest size for a 14 ft span — Southern Pine #2 · 16″ o.c.

Use at least
2×8
Its max span14 ft 2 in
2×4
7 ft 6 in too short
2×6
11 ft 2 in too short
2×8
14 ft 2 in covers it
2×10
16 ft 10 in covers it
2×12
19 ft 10 in covers it
How It Works

The span table, read backwards

Sizing a rafter is a lookup, not a formula. The IRC span tables state the maximum horizontal span for every combination of species, size and spacing, and the right size for your roof is simply the smallest one whose maximum meets your span. This calculator runs that search for you across Tables R802.4.1(3) and (4) — ceiling not attached and attached — for Douglas Fir-Larch #2, Hem-Fir #2, Southern Pine #2 and Spruce-Pine-Fir #2, at 12, 16 and 24 in spacing and dead loads of 10 or 20 psf.

It checks sizes in order — 2×4, 2×6, 2×8, 2×10, 2×12 — under a 30 psf ground snow load, and returns the first that covers your span, together with how much margin it has. When you have the size, take it to the matching rafter length calculator to turn the same span into a cut length with angles, ridge deduction and overhang included.

Worked Example

Example: a 14 ft span in Southern Pine

Say the roof spans 14 ft horizontally, the rafters sit at 16 in on centre, there is no ceiling attached to them, and the covering is standard shingles — dead load 10 psf. In Southern Pine #2, the checker walks up the sizes and stops at the 2×8: its tabulated maximum at 16 in spacing is 14 ft 2 in, which covers the 14 ft span with 2 in to spare. The smaller sizes fall short at this spacing, and the 2×10 would work too but buys capacity the roof does not need.

Change one input and watch the answer move. Keep the same span but open the spacing to 24 in and the 2×8's rating drops to 11 ft 7 in — now the calculator has to climb at least one size deeper. Sizing is always a negotiation between span, spacing and depth, and this example is the negotiation in miniature.

When Nothing Passes

When even a 2×12 is not enough

Sometimes the search comes back empty: the span is simply beyond prescriptive solid-sawn tables at your spacing. That is information, not failure — the roof needs one of five changes, roughly in order of cost and disruption:

Cheapest Fixes First

Spacing beats depth

Before reaching for deeper lumber, look at the spacing. In the Southern Pine data the same 2×8 is rated 11 ft 7 in at 24 in spacing and 14 ft 2 in at 16 in — a gain of 2 ft 7 in of span without changing the board at all, just by adding rafters. Going deeper helps too, but each step up in size raises the price of every rafter on the roof, while closer spacing adds boards only where the count changes.

There is a stiffness dividend as well. A roof framed with shallower rafters at closer spacing deflects less underfoot and under snow than the same roof on deeper, widely spaced members that only just pass. If two combinations both pass, the closer-spaced one is usually the better roof as well as the cheaper one.

Conditions

Same tables, same limits

This page searches the same tables as the span checker, in the opposite direction — enter a span, get the smallest member that passes — so the same conditions and limits apply. These sizes are grounded in a 30 psf ground snow load. Heavier snow regions, and regions where roof live load governs instead, are served by the other six tables in the R802.4.1 family, and their answers can be a full size deeper for the same span.

The tables also assume ceiling joists or rafter ties at the wall plate; raised ties pull the permitted spans down through Table R802.4.1(9), which can push a borderline roof one size deeper. And treat any result past a 20 ft span with a builder's scepticism: the table may allow it, but sourcing straight solid-sawn lumber past 20 ft is its own problem.

Data on this page: IRC 2021 Tables R802.4.1(3) and (4) only — 30 psf ground snow load, dead load 10 or 20 psf, No. 2 grade, ceiling attached (L/240) or not attached (L/180). For 50 or 70 psf snow, roof-live-load-only regions, other grades, or engineered lumber, use the full IRC tables R802.4.1(1)–(8) or the AWC span calculator, and always check local code amendments.
Methods & Sources

How we calculate

Every result on this page comes from the method described above, using standard framing geometry and the published data credited below. Found a number that looks wrong? Use Report an Error — every report is read.

• International Residential Code (2021), Chapter 8 — Roof-Ceiling Construction — https://codes.iccsafe.org/content/IRC2021P2/chapter-8-roof-ceiling-construction
• American Wood Council — Span Tables for Joists and Rafters — https://awc.org
Questions

FAQs

Why did it choose a size bigger than my span seems to need?

The table maximum must meet or beat your span — there is no interpolation in the IRC tables. A size rated 14 ft 2 in covers a 14 ft span and a size rated 13 ft 11 in does not, which is why the answer sometimes looks oversized for a span just past a break point.

Can I interpolate between the spacing columns?

No. The tables are discrete: use the column for your actual spacing, and if you are between spacings — an existing roof at 19.2 in, say — read the wider-spacing column (24 in) to stay on the safe side.

What if even a 2x12 does not pass?

Work through the levers in order: closer spacing, then a stronger species, then engineered lumber (LVL or I-joists) sized from the manufacturer's tables, then a structural change — a structural ridge beam or a bearing wall or purlin that cuts the span itself. The next section covers each option.

Does this size hip and valley rafters too?

No. Tables R802.4.1(3) and (4) size common rafters on a simple span. Hip and valley members carry accumulated load from the jack rafters and are sized differently — treat this result as a floor for them, not an answer, and have large hip roofs checked by an engineer.

Is No. 1 grade lumber covered?

Only No. 2. It is the grade yards stock and the grade the four species tables here are published for. No. 1 and Select Structural span further and No. 3 less; if your lumber is stamped anything other than No. 2, use the full IRC tables for that grade instead.

Is deeper lumber or closer spacing the cheaper fix?

Compare the two honestly: one size deeper raises the price of every rafter on the roof, while tightening the spacing from 24 in to 16 in adds about half as many rafters again — but can be worth a full size step of span. In Southern Pine #2 it moves a 2×8 from 11 ft 7 in to 14 ft 2 in. On most roofs the shallower, closer-spaced combination is both cheaper and stiffer.

The Full Family

More rafter calculators