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.
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.
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.
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:
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.
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.
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.
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.
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.
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.
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.
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.
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 common rafter: length, angles, birdsmouth and materials.
Line and cut lengths and angles for the diagonal rafter on a hip roof.
Where two roof planes meet — valley length and its cut angles.
First jack length and the common difference for your spacing.
Single-slope rafters between two different wall heights.
Seat cut, heel height and HAP, checked against the IRC one-quarter limit.
Plumb, seat and cheek angles — plus the saw settings to cut them.
Convert pitch, rise/run, degrees and percent, both ways.
How far a board can span — IRC tables by species, grade and load.
Two pitches, one roof — upper and lower rafter lengths.
The full pitch × run table, printable for the workshop wall.
Figure any rafter by hand — formula and framing-square methods.