What size rafter for a 12-foot span? A 2x8 SPF No.2 at 16 in on center, with asphalt shingles and 30 psf ground snow. That is the short answer. The longer answer depends on spacing, pitch, roofing material and your local snow zone - and by the time you factor in decking boards and a coat of stain, the total material list for an outdoor structure gets surprisingly long.
This article walks through rafter sizing, deck board quantities and stain coverage using three calculators built for exactly these questions. Real numbers, real scenarios, no guesswork.
The answer: 2x8 handles most residential roofs
At standard framing - 16 in o.c., 30 psf ground snow, asphalt shingles - a 2x8 (actual 1.5 x 7.25 in) carries a 12-foot span with a section modulus of 13.14 in3 against the required 8.06 in3. That is 63% more capacity than the minimum. Comfortable margin.
But change one variable and the answer shifts:
| Scenario | Span | Snow | Roofing | Result |
|---|---|---|---|---|
| Standard ranch | 12 ft | 30 psf | Shingles | 2x8 |
| Same house, tile roof | 12 ft | 30 psf | Concrete tile | 2x8 |
| Push to 14 ft span | 14 ft | 40 psf | Shingles | 2x8 |
| Wide span, heavy snow | 20 ft | 40 psf | Shingles | 2x12 |
The jump from 2x8 to 2x10 usually happens around 15-16 ft of span. Below that, 2x8 covers most residential scenarios. The Rafter Calculator runs the full ASD bending check so you do not have to flip through IRC tables.
What if the span is not 12 feet?
Here is the quick reference. Every value comes from the calculator at 16 in o.c., asphalt shingles, 30 psf ground snow:
| Span | Min. rafter | Required S (in3) | Available S (in3) |
|---|---|---|---|
| 8 ft | 2x6 | 3.58 | 7.56 |
| 10 ft | 2x6 | 5.60 | 7.56 |
| 12 ft | 2x8 | 8.06 | 13.14 |
| 14 ft | 2x8 | 10.97 | 13.14 |
| 16 ft | 2x10 | 14.33 | 21.39 |
| 18 ft | 2x10 | 18.15 | 21.39 |
| 20 ft | 2x12 | 22.40 | 31.64 |
Notice how 2x6 works up to 10 ft, then 2x8 carries the load from 12 to 14, 2x10 handles 16-18, and 2x12 kicks in at 20. The jumps are not linear - each size step buys you roughly 3-4 more feet of span.
The deck underneath: 58 boards for a 20 x 12 ft patio
Roof framing is half the project. The other half is the surface you walk on. A 20 x 12 ft deck with standard 5.5 in composite boards, 3/16 in gaps and 10% waste needs 58 boards and 696 linear feet of material.
Where do those numbers come from? The Decking Calculator divides the width by the board-plus-gap module (5.5 + 0.1875 in = 5.6875 in) to get 26 rows, multiplies by the boards per row (ceil(20/12) = 2), adds 10% waste, and rounds up.
The cost column matters too. At $4.50 per linear foot for mid-range composite, those 696 linear feet come to $3,132 in boards alone. Pressure-treated pine at $1.50/lf would be $1,044 - but you will spend $200-400 on stain every two years. Which brings us to the third calculator.
Three containers of stain - if you account for the wood
The stain label says 250 sq ft per gallon. Your 240 sq ft pine deck should take exactly one gallon per coat, two coats, two gallons total. Buy two 1-gallon cans and call it done.
Except pine is softwood. Open grain. The first coat soaks in deeper than the label assumes. The Wood Stain Calculator applies a 1.15x absorption multiplier for softwood, bumping the real consumption to 1.1 gallons per coat. Two coats: 2.2 gallons. Two cans will not do it. You need three.
At $35 per gallon, that third can adds $35 to the project. A small price compared to running out mid-coat, driving back to the store, and hoping the batch color still matches.
The full shopping list for one structure
Put all three calculators together and a 20 x 12 ft covered deck with a 40 ft long gable roof looks like this:
| Item | Quantity | Unit cost | Total |
|---|---|---|---|
| Composite deck boards (5.5 in x 12 ft) | 58 boards / 696 lf | $4.50/lf | $3,132 |
| Rafters 2x8 x 15 ft (SPF No.2) | 62 rafters / 843 bf | $0.75/bf | $632 |
| Deck stain (pine, 2 coats) | 3 x 1 gal | $35/gal | $105 |
| Material subtotal (boards + rafters + stain) | $3,869 | ||
That does not include joists, fasteners, sheathing, roofing material or labor. But these three line items - deck surface, roof framing, surface treatment - are the ones people most often underestimate or miscalculate.
Spacing changes everything
The default assumption in most span tables is 16 in on center. But switching to 12 in o.c. or 24 in o.c. changes the rafter size, the count and the total board feet significantly:
| Spacing | Min. size (12 ft span) | Rafters (40 ft bldg) | Board feet |
|---|---|---|---|
| 12 in o.c. | 2x6 | 82 | 846 |
| 16 in o.c. | 2x8 | 62 | 843 |
| 24 in o.c. | 2x8 | 42 | 571 |
At 12 in o.c. you can drop to a 2x6 - but you need 82 rafters instead of 62. The total board feet ends up almost identical (846 vs 843). At 24 in o.c. the count drops to 42 but you still need 2x8. The real savings at 24 in is 32% fewer rafters and less labor - not a smaller lumber size.
Tools discussed in this article
Rafter Calculator - size roof rafters for any span, spacing, snow load and roofing material. Returns minimum lumber dimension, rafter count, board feet and cost.
Decking Calculator - calculate deck board quantity, linear footage and material cost from deck dimensions, board size and gap width.
Wood Stain Calculator - find out how many containers of stain, oil or sealant you need for decks, fences and siding. Adjusts for wood absorption and coat count.
More tools from Construction
Roof Calculator - roofing material, underlayment and flashing for any roof shape
Roof Pitch Calculator - convert between degrees, percent slope and rise/run
Concrete Calculator - volume, cement bags and aggregate for slabs and footings
Rebar Calculator - reinforcement bars for slabs, footings, beams and columns
Insulation Calculator - R-value, thickness and material for walls and attics
Flooring Calculator - laminate, vinyl or hardwood packs for any room
Tile Calculator - tile count, adhesive and grout for floors and walls
Brick & Mortar Calculator - bricks, mortar bags and waste for walls
AAC Block Calculator - autoclaved aerated concrete blocks and adhesive
Paint Calculator - gallons of paint or primer for walls and ceiling
Plaster Calculator - plaster and render quantities for interior and exterior
Paving Stone Calculator - pavers, base material and edging for driveways and patios
Self-Leveling Screed Calculator - compound bags for floor leveling
House Building Cost Calculator - total construction cost estimate by area and finish level