Rafter Span Calculator
This free rafter span calculator sizes roof rafters the way a plans examiner checks them: from the IRC prescriptive span tables, not a rule of thumb. Tell it your ground snow load, whether a ceiling is fastened to the rafters, how heavy the roofing is, and the species, grade and spacing of the lumber, and it returns the smallest 2×4 to 2×12 that spans your distance, or the maximum span for the size you have.
It picks the right one of the eight IRC tables for you: a 20 psf roof live load or 30, 50 and 70 psf ground snow load, each with the ceiling attached (vaulted, L/240) or not (L/180), and 10 or 20 psf dead load. It also applies the Table R802.4.1(9) reduction when the ceiling joists or rafter ties sit above the top of the walls, and flags roofs under 3:12, where the ridge has to be designed as a beam.
Spans are measured level, from the wall to the ridge, as the code requires. The full span table for your species and grade is shown under the result, every value is cited to its table, and a few typos in the official online table text are corrected and explained where they apply. Free, no signup, no pricing. For the sloped rafter length and cut angles, use the Rafter Length Calculator.
Rafter Span Calculator
Size roof rafters from the IRC span tables — the smallest 2×4 to 2×12 for your span, or the longest span a size can carry, by species, grade, spacing, snow load and ceiling. Free, no signup.
What are you solving for?
Find the smallest rafter for your span, or the longest span a rafter size can carry.
Roof load
Snow load, ceiling and roofing weight pick which IRC table applies.
From your building department or IRC Figure R301.2(5). Use 0 if your area gets no snow. Rounds up to the 30, 50 or 70 psf table; 20 psf or less uses the 20 psf roof live-load table.
Lumber & spacing
Species and grade are stamped on the lumber. #2 is the common framing grade.
The level distance from the wall to the ridge board, not the sloped rafter length. For a simple gable, about half the building width.
Ceiling joists / rafter ties & pitch
Ties raised above the wall plates reduce the allowable span (Table R802.4.1(9)).
Span is the run, not the rafter length
The IRC measures a rafter span along its horizontal projection (R802.4.1): the level run from the wall to the ridge. The sloped rafter is always longer, so enter the run above, not the length of the board. For the sloped length, cut angles and birdsmouth, use the Rafter Length Calculator.
Calculation Formulas
Tables (1) and (2) are for a 20 psf roof live load; the others are for 30, 50 and 70 psf ground snow load. Your ground snow load rounds up to the next table — the tables are not interpolated. Above 70 psf the IRC requires engineered design (R301.2.3).
Example:
35 psf ground snow → the 50 psf tables.
A ceiling fastened directly to the rafters, as in a vaulted room, gets the stricter deflection limit so the finish does not crack.
Example:
Vaulted room at 30 psf ground snow → Table R802.4.1(4).
Each table lists 2×4 to 2×12 spans for Douglas fir-larch, hem-fir, Southern pine and spruce-pine-fir in Select Structural, #1, #2 and #3, at 12, 16, 19.2 and 24 in. on center, with 10 and 20 psf dead-load columns.
Example:
Douglas fir-larch #2 2×8 at 16 in., 30 psf, ceiling not attached, 10 psf dead: 15'-4" (Table R802.4.1(3)).
R802.4.1 measures rafter spans along the horizontal projection, not the slope. For a centered ridge the span is about half the building width.
Example:
A 26 ft wide gable → about a 13 ft horizontal rafter span.
Footnote a: where ceiling joists or rafter ties sit above the top of the walls, multiply spans by the Table R802.4.1(9) factor. Between listed ratios the calculator uses the next higher ratio (smaller factor).
Example:
HC 2 ft, HR 8 ft → 1/4 → × 0.76; 18'-9" becomes 14'-3".
The calculator walks up the sizes and stops at the first that reaches your span. Cells marked "Note b" in the table span more than 26 ft, the table limit.
Example:
14 ft span, Douglas fir-larch #2 at 16 in., 30 psf: 2×6 (12'-1") is short, 2×8 (15'-4") works.
Deflection under the live or snow load at the listed L/Δ, and bending under total load with Fb′ = Fb × size factor × 1.15 repetitive-member × load duration (1.25 roof live, 1.15 snow). The snow tables apply the ground snow load directly. This calculation reproduces 4,968 of the 4,992 published cells within an inch and was used to find typos in the online text.
Example:
Used to verify the tables, not to replace them — the calculator reads the published cells.
Standard Constants
| Constant | Value | Description |
|---|---|---|
| Load tables | 20 psf live · 30 / 50 / 70 psf ground snow | IRC Tables R802.4.1(1)–(8). |
| Deflection limits | L/180 · L/240 | Ceiling not attached / ceiling attached to the rafters. |
| Dead-load columns | 10 psf · 20 psf | Light roofing (shingles, metal) or heavy roofing (tile, slate). Heavier roofs need engineering. |
| Spacings | 12 · 16 · 19.2 · 24 in. | On center; the tables list no others. |
| Table span limit | 26 ft | Footnote b: "Span exceeds 26 feet in length." |
| Rafter-tie factors | 1.00 / 0.90 / 0.83 / 0.76 / 0.67 | HC/HR of 1/7.5 or less, 1/6, 1/5, 1/4, 1/3 (Table R802.4.1(9)). |
| Low-slope limit | 3:12 | Below 3:12, ridges, hips and valleys must be designed as beams (R802.4.4). |
| Snow load ceiling | 70 psf ground snow | Above this, R301.2.3 requires engineered design. |
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 2021 — Rafter Size(IRC R802.4.1; Tables R802.4.1(1)–(9))
View StandardRafters are sized from the eight span tables; spans are measured on the horizontal projection. For other grades, species or loads the IRC refers to the AWC STJR.
Key Requirements:
- •Size rafters from Tables R802.4.1(1) through (8)
- •Measure spans along the horizontal projection
- •Apply the Table R802.4.1(9) factor when ceiling joists or rafter ties are raised
- •Tabulated spans stop at 26 ft
IRC 2021 — Ridge, Ties and Supports(IRC R802.3, R802.4.4, R802.4.6, R802.5.2)
View StandardRidge boards at least 1 in. nominal and as deep as the rafter cut; under 3:12 the ridge, hips and valleys are designed as beams; collar ties in the upper third; ceiling joists above the bottom third of the rafter height require a designed ridge beam.
Key Requirements:
- •Rafters framed opposite each other at the ridge (R802.4.2)
- •Designed ridge, hips and valleys below 3:12 (R802.4.4)
- •Ceiling joists or rafter ties in the bottom third, or a designed ridge beam (R802.5.2)
- •Birdsmouth notch no deeper than one-fourth of the rafter depth (R802.7.1)
IRC 2021 — Snow Loads(IRC R301.2.3; Figure R301.2(5))
View StandardGround snow loads come from the map or the local building official. Above 70 psf ground snow the IRC prescriptive roof framing no longer applies.
Key Requirements:
- •Use the ground snow load set by the jurisdiction
- •Engineer the roof above 70 psf ground snow
American Wood Council — Span Tables for Joists and Rafters(AWC STJR)
View StandardThe calculation procedure and design values behind the IRC span tables, and the reference the IRC names for species, grades and loads its tables do not list.
Key Requirements:
- •Deflection and bending checks with NDS design values
- •Covers loads and species beyond the IRC tables
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
The biggest single driver
The same Douglas fir-larch #2 2×8 at 16 in. spans 18'-5" where the 20 psf roof live load governs, 15'-4" at 30 psf ground snow, 12'-6" at 50 psf and 10'-10" at 70 psf.
Regional Examples:
Species Availability
What the lumberyard stocks
Southern pine dominates the Southeast, Douglas fir-larch and hem-fir the West, and spruce-pine-fir the North and Canada. After the 2013 Southern pine design-value reduction, SP #2 spans shorter than DF-L #2 in the deeper sizes.
Regional Examples:
Engineered Roofs
Outside the tables
Trusses (R802.10), LVL and I-joist rafters, tile or slate over 20 psf dead load, spans over 26 ft, roofs under 3:12 and high rafter ties all move the roof out of the prescriptive tables.
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
Rafter Length Calculator
Free rafter length calculator: common, hip, valley & jack rafter lengths, plumb/seat cut angles, birdsmouth depth, and board count. Per IRC R802. No signup.
Joist Span Calculator
Free joist span calculator: max spans for floor and deck joists by species, grade, size, and spacing per IRC R502.3.1 and R507.6. No signup.
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.
Header Size Calculator
Size a door or window header in a bearing wall — header size, ply, jack & king studs, and max span, per IRC R602.7. Free, no signup, no pricing.
How to Use This Calculator
- Choose a mode: find the rafter size for a span you know, or the longest span a rafter size can carry.
- Enter your ground snow load in psf (0 if your area gets no snow). Your building department or IRC Figure R301.2(5) gives it.
- Say whether drywall is fastened to the rafters (a vaulted or cathedral ceiling) and whether the roofing is light (shingles, metal) or heavy (tile, slate).
- Pick the lumber species, grade and rafter spacing, then enter the horizontal span from the wall to the ridge (or choose the rafter size).
- If the ceiling joists or rafter ties are raised above the top of the walls, choose "Raised" and enter their height and the ridge height.
- Click Calculate for the rafter size, its maximum span, every other size at your spacing, and the full span table for your lumber.
How the IRC Sizes Rafters
IRC R802.4.1 sizes rafters from eight span tables. Two things choose the table: the roof load (a 20 psf roof live load where snow is light, or a ground snow load of 30, 50 or 70 psf) and whether a ceiling is attached to the rafters, which tightens the deflection limit from L/180 to L/240 so the drywall does not crack. Inside each table the span depends on species, grade, size, spacing and whether the roof dead load is 10 or 20 psf. The spans are horizontal: measure level from the wall to the ridge, not along the slope. They also assume the ceiling joists or rafter ties are at the top of the walls, holding the walls from spreading; raise them and the span shrinks by the Table R802.4.1(9) factor, and above the bottom third of the roof height the ridge must become an engineered beam. The tables stop at 26 feet and 70 psf ground snow; past either, the roof needs engineering.
Frequently Asked Questions
How far can a 2×6 rafter span?
It depends on the snow load, the lumber and the spacing. For Douglas fir-larch #2 at 16 inches on center with a light (10 psf dead load) roof and no ceiling attached, 2021 IRC Table R802.4.1(1) allows 14'-7" where the 20 psf roof live load governs; Table R802.4.1(3) allows 12'-1" at 30 psf ground snow, Table (5) 9'-10" at 50 psf, and Table (7) 8'-7" at 70 psf. Spans are horizontal, from the wall to the ridge. Change any input and the calculator reads the matching cell.
What size rafters do I need for a 12-foot span?
With Douglas fir-larch #2 at 16 inches on center and a 10 psf dead load, a 2×6 works up to 30 psf ground snow load: Table R802.4.1(3) lists 12'-1". At 50 psf the 2×6 drops to 9'-10" and you need a 2×8 (12'-6", Table R802.4.1(5)). Southern pine #2 in the same 30 psf case allows only 11'-2" for a 2×6, so it needs a 2×8. Grade and species matter as much as depth.
How do I measure a rafter span?
IRC R802.4.1 measures rafter spans along the horizontal projection, so measure level, not along the slope: from the wall to the ridge board. For a simple gable with the ridge centered, that is about half the building width. The sloped rafter is longer than the span, and the steeper the roof the bigger the difference; the Rafter Length Calculator gives that cut length.
What does ceiling attached to rafters mean?
It means drywall or plaster is fastened directly to the underside of the rafters, as in a vaulted or cathedral ceiling. The IRC then limits deflection to L/240 so the finish does not crack, using the even-numbered tables. With a flat ceiling on separate ceiling joists, or no ceiling, the odd-numbered L/180 tables apply. The stricter limit mostly shortens small rafters: a Douglas fir-larch #2 2×4 at 16 inches drops from 8'-3" to 7'-10" at 30 psf ground snow.
Which snow load table applies to my roof?
Use your ground snow load from the building department or IRC Figure R301.2(5), rounded up to the next table: 30, 50 or 70 psf. The tables are not interpolated, so 35 psf uses the 50 psf table. At 20 psf or less the 20 psf roof live load governs and Tables R802.4.1(1) and (2) apply, the same split the IRC uses in its heel-joint Table R802.5.2(1). Above 70 psf, IRC R301.2.3 requires an engineered roof.
What if my ceiling joists or rafter ties are raised?
The span tables assume the ceiling joists or rafter ties are at the top of the walls, where they keep the rafters from pushing the walls apart (footnote a). If they are higher, multiply the span by the factor in Table R802.4.1(9): 0.90 at one-sixth of the ridge height, 0.83 at one-fifth, 0.76 at one-fourth and 0.67 at one-third. Ties 2 ft up under an 8 ft ridge (one-fourth) cut a 18'-9" span to 14'-3". Above one-third, R802.5.2 requires an engineered ridge beam.
Why do a few values differ from the IRC table I found online?
The official online text of Tables R802.4.1(1) to (8) has 12 typos, and the 2018 edition's text has the same ones: impossible entries such as 12-12 and 11-18, a 2×10 listed at 1'-11", and a few cells that disagree with the matching cell of the paired table. The calculator uses the value that the paired table and the American Wood Council span calculation both give, and tells you when a corrected cell is in your result. Every other value is used exactly as published.
Does this cover trusses, LVL or I-joist rafters?
No. The IRC tables cover solid-sawn Douglas fir-larch, hem-fir, Southern pine and spruce-pine-fir in four grades. Roof trusses are designed by the truss manufacturer (IRC R802.10), and LVL or I-joist rafters are sized from the manufacturer's evaluation report. Heavier dead loads than 20 psf, spans over 26 ft and ground snow over 70 psf also fall outside the tables and need engineering.