Deck Calculator
Building a deck is one of the most common homeowner projects — and one of the most code-driven. The 2021 IRC Section R507 has five prescriptive tables that govern almost every dimension: joist span by species and spacing (R507.6), beam span by joist span supported (R507.5), post height by tributary area (R507.4), footing size by tributary area (R507.3.1), and ledger fastener spacing (R507.9.1.3). This calculator looks up all five for you.
Decking material is not interchangeable. Trex, TimberTech, AZEK, and Fiberon all require 16-inch on-center joist spacing perpendicular and 12-inch on-center diagonal — and only Deckorators Surestone (mineral-based composite) permits 24-inch on-center residential, which can drop the joist count by a full 33%. Pressure-treated 5/4×6 and 2×6 each have different spans. The calculator enforces the per-product ICC-ES rule rather than a single global default.
Built on 2021 IRC R507, AWC DCA 6 (the prescriptive companion), AWPA U1 use-category retention, ASTM A153/A653 hot-dip-galvanized hardware, ANSI/ASME B18.2.1 lag screws, and ICC-ES Evaluation Reports ESR-3168 (Trex), CCRR-0101 (TimberTech), ESR-4947 (Fiberon), and CCRR-0195 (Deckorators). Free, no signup.
Deck Calculator
Code-compliant deck framing, decking, footings, ledger, stairs, and railing — pulled directly from 2021 IRC Tables R507.6 / R507.5 / R507.4 / R507.3.1 / R507.9.1.3 and AWC DCA 6.
Deck size and site
Framing species and attachment
Joists and beams must be UC4A ground-contact treated per AWPA U1 (they are critical to safety and difficult to repair). Hem-Fir / SPF group with DF-L in the 40 psf base table.
Decking material and layout
Joist spacing is set automatically from the deck-board ICC-ES report. Trex, TimberTech, AZEK, Fiberon all require 16" o.c. perpendicular / 12" o.c. diagonal. Deckorators Surestone is the only major composite permitting 24" o.c. residential.
Stairs
Guard / railing
Related Calculators
Deck Stain Calculator
Instantly calculate deck stain gallons by wood type—cedar, pine, composite. Covers surface, railings & stairs separately. Free, fast, no signup needed.
Concrete Calculator
Instantly calculate cubic yards, 60lb/80lb bags & cost for slabs, footings & posts. Free concrete calculator, results in seconds—no signup needed.
Stairs Calculator
Code-compliant stair geometry, stringers & materials per 2021 IRC R311.7 / 2024 R318.7. Straight, L, U, winder, spiral & curved. AWC DCA 6 stringer spans. Free.
How to Use This Calculator
- Enter deck size: length runs in the joist direction (ledger to outer beam); width runs along the ledger / outer beam.
- Set height above grade and ground snow load (40 psf base for most US; 50/60/70 psf step into IRC R507 sub-tables).
- Enter your local frost depth and toggle "within 300 ft of saltwater" — saltwater proximity upgrades all hardware to Type 304/316 stainless per IRC R507.2.3.
- Pick framing species (PT Southern Pine #2 is the national default; DF-L / Hem-Fir / SPF are incised; Redwood and Western Cedars are a separate row in IRC R507.5/R507.6).
- Pick attachment: ledgered to house (most common) or freestanding (replaces the ledger with a second beam — no lateral hold-downs to band joist needed). For ledgered, pick fastener (1/2" lag screw or 1/2" through-bolt) and house sheathing thickness.
- Pick the deck board: PT 5/4×6, PT 2×6, cedar, redwood, Ipe / Cumaru tropical, Trex / TimberTech / AZEK / Fiberon composite, or Deckorators Surestone (24" o.c. permitted). The calculator looks up the per-product joist spacing automatically.
- Pick board layout (perpendicular 10% waste / diagonal 15% / picture frame 15% / herringbone 20%) and stock board length (8/10/12/16/20 ft).
- Toggle stairs (enter total rise and width) and railing (36" residential or 42" California / Washington / IBC commercial). Pick baluster type for the count math (1.5" square at 5.5" o.c. or 3/4" round at 4.75" o.c.).
- Click Calculate: see joist size with max span, beam size with max span between posts, post size with tributary area, footing diameter and depth, concrete bag count, ledger fastener count and spacing, joist hangers, deck board count with waste, stair geometry (riser height, tread depth, Blondel check, stringers), and railing balusters and rail posts.
How the Five IRC R507 Tables Combine
The five 2021 IRC R507 tables form a dependency chain. R507.6 sets the joist size from species, size, and spacing — your decking material drives the spacing (16" o.c. for most composites, 24" for Surestone). R507.5 then sets the beam size from the joist span supported and target post spacing. R507.4 sets the post size from the tributary area (joist span × post spacing / something) and the post height (deck height above grade). R507.3.1 sets the footing size from the same tributary area at 1,500 psf default soil bearing. R507.9.1.3 sets the ledger fastener spacing from the joist span supported and the fastener type. Plus IRC R507.9.2 mandates 2 × 1,500 lb hold-downs (Simpson DTT2Z) on every ledgered deck regardless of size. The calculator runs all six lookups in sequence so the framing, fasteners, and concrete are internally consistent.
Frequently Asked Questions
What size joists do I need for a deck?
Joist size comes straight from IRC Table R507.6. For pressure-treated Southern Pine #2 — the most common framing — 2x6 spans 9'-0" at 16" o.c., 2x8 spans 11'-10", 2x10 spans 14'-0", and 2x12 spans 16'-6". Douglas Fir-Larch / Hem-Fir / SPF (incised) span ~3% less and Redwood / Western Cedars span ~7% less. Span here means ledger to outer beam. Spacing is set by your decking material — 16" o.c. for nearly all composites and PVC; 24" o.c. only for Deckorators Surestone (the only major composite with that rating per CCRR-0195). Snow loads above 40 psf step into IRC R507.6 sub-tables (2)/(3)/(4) — typically one nominal size up at 60 psf and beyond.
How do I size a deck beam?
IRC Table R507.5 sizes the beam by the joist span it supports. A 2-2x10 Southern Pine beam supporting 12 ft of joist span allows 7'-1" between posts; supporting 14 ft allows 6'-6". Going up to 3-2x10 buys 8'-9" and 8'-3" respectively. DF-L drops those beam spans about 23% at the short end (6 ft joist span) and ~12% at the long end (18 ft). The 2021 IRC also added a single-ply column (1-2x10) for short joist spans. Beam span is prescriptively limited to 18 ft regardless of size — past that, engineered design is required. The calculator picks the smallest 2-ply or 3-ply beam that fits and tells you how many posts you need.
Can I use 4x4 deck posts?
Yes, in the 2021 IRC — for the first time prescriptively. IRC Table R507.4 permits 4x4 Southern Pine posts up to 14 ft tall at 20 sq ft tributary area, dropping to 4'-6" at 160 sq ft. DCA 6 historically required 6x6 minimum on every deck regardless of tributary area, and many local jurisdictions still enforce that as habit. 4x6 is a comfortable middle ground (14 ft at 40 sq ft, 8'-7" at 100 sq ft). 6x6 hits 14 ft up through 120 sq ft tributary in Southern Pine. All deck posts must be UC4A ground-contact treated per AWPA U1 and IRC R507.4.2 / R317.1.4.
What size footings do I need for a deck?
IRC Table R507.3.1 sizes the footing by tributary area at 1,500 psf default soil bearing. 5 sq ft → 8" diameter × 6" thick; 20 → 14" round; 40 → 19" round × 7" thick; 60 → 23" round × 9" thick; 80 → 27" × 11"; 100 → 30" × 12"; 120 → 33" × 13"; 140 → 35" × 14"; 160 → 38" × 15". Footings must extend below the local frost line — 12" Gulf Coast, 24"–30" Mid-Atlantic, 36"–42" Midwest, 48" Southern New England, 60"+ Mountain West and Northern Maine. Concrete volume is V = π × (D/2)² × Depth, with 80 lb bags yielding 0.6 cu ft each. Always round up and add 10% spillage.
How many lag screws do I need for a deck ledger?
IRC Table R507.9.1.3(1) sets the on-center spacing for 1/2-inch lag screws into a band joist with ≤ 1/2-inch sheathing at 50 psf (40 + 10 dead). For a 6 ft joist span: 30" o.c.; 8 ft: 23"; 10 ft: 18"; 12 ft: 15"; 14 ft: 13"; 16 ft: 11"; 18 ft: 10". Through-bolts at 1/2" allow significantly wider spacing. So a 16 ft (192") ledger with a 12 ft joist span needs 192 / 15 = 13 lag screws, staggered top-to-bottom in two rows. Edge distances (Table R507.9.1.3(2)): 2" from top of ledger, 3/4" from bottom; 3/4" from top of band joist, 2" from bottom; 2" from ends; 5" max vertical row separation.
Do I need lateral-load hold-downs on a deck?
Yes — IRC R507.9.2 makes lateral-load connection mandatory on every ledgered deck regardless of size. Standard prescriptive solution is two Simpson DTT2Z hold-downs (1,500 lb each) within 24" of each end of the deck, with 1/2" × 6" SDS rods through the band joist into a floor joist below. The four-location alternative is four DTT1Z hold-downs at 750 lb each, evenly spread along the ledger. This is non-negotiable — it's the most common reason ledgered decks fail catastrophically (the deck pulls itself off the house in shear).
Can I use composite decking on 24-inch on-center joists?
Generally no. Trex (ESR-3168), TimberTech / AZEK (CCRR-0101), Fiberon (ESR-4947), and most Deckorators wood-plastic composite lines all require 16-inch o.c. perpendicular and 12-inch o.c. diagonal joist spacing. The single major exception is Deckorators Voyage and Vault — both Surestone mineral-based composite — which permit 24-inch o.c. residential perpendicular per CCRR-0195. Surestone is also ~35% lighter than wood-plastic composite and warranted for ground/water contact. If you're using any other composite or PVC, plan for 16" o.c. and the joist count that goes with it.
How thick should my deck boards be?
Pressure-treated 5/4×6 (1" × 5-1/2" actual) is the most common wood deck board — sized for 16" o.c. joist spacing. PT 2×6 (1-1/2" × 5-1/2") allows 24" o.c. residential. Cedar and redwood are typically 5/4×6 or 1×6 nominal at 16" o.c. Composite boards run 0.82"–1.00" thick (Trex Select 0.82", Trex Enhance 0.94", TimberTech PRO 1.00", AZEK 1.00", Fiberon Concordia 0.93"). Tropical hardwoods (Ipe, Cumaru) are sized 5/4×6 nominal which actually measures ~1" × 5-1/2". The thicker the board, the wider the on-center spacing it tolerates — but always check the manufacturer's ICC-ES report rather than guessing.
What's the difference between UC3B and UC4A pressure treatment?
AWPA U1 Use Category — UC3B is above-ground retention (ACQ 0.25 pcf, MCA 0.06), UC4A is ground-contact retention (ACQ 0.40 pcf, MCA 0.15). AWPA U1 explicitly states that UC4A is required for members "difficult to maintain, repair or replace and critical to the performance and safety of the entire system" — and lists joists and beams as examples. So even on a deck where joists never touch the ground, they must be UC4A treated. UC3B is suitable for the deck boards themselves on ventilated installation. Look for the end tag on every piece.
Do I need stainless hardware near the ocean?
Yes — IRC R507.2.3 (and DCA 6 Min. Req.) require Type 304 or 316 stainless steel hardware on every connector, fastener, and screw within 300 ft of saltwater shoreline. 316 (with molybdenum) is preferred for direct splash, salt fog, or pool decks. Galvanized hardware in salt fog corrodes through within 5–10 years and pulls itself out of the lumber — this is one of the most common causes of catastrophic deck failure on coastal decks. Cost is typically 4–6× the HDG equivalent. Hawaii, parts of California, and many local jurisdictions extend the requirement to 500–1,000 ft inland because of trade-wind salt drift.
What are the IRC stair code requirements for a deck?
IRC R311.7: maximum riser height 7-3/4" (R311.7.5.1), minimum 4"; minimum tread depth 10" with nosing or 11" without nosing (R311.7.5.2); riser and tread variation 3/8" max within a flight; minimum stair width 36" clear above handrail; headroom 6'-8" minimum; max vertical rise per flight 12'-7" before a landing is required. Handrail required at 4 or more risers (R311.7.8) — height 34"–38" above tread nosing, Type I (1-1/4"–2" graspable) or Type II (4"–6-1/4" perimeter with finger recess), 1-1/2" wall clearance. Stringer rules: solid 2x12 spans up to 13'-3" with stringers ≤ 18" o.c.; cut stringers must leave ≥ 5" of residual material under the tread cut.
How tall should the deck guard rail be?
IRC R312 sets 36" minimum residential guard height — required where the walking surface is more than 30" above grade (within 36" horizontally of the edge). California Residential Code (CRC R312.1.2 amendment) and Washington State require 42" in many jurisdictions; IBC requires 42" universally for commercial. Stair guard height is 34" minimum measured from the nosing line. Sphere rule: 4" sphere shall not pass at general guards; 6" sphere at the stair triangle (riser/tread/rail intersection); 4-3/8" sphere at stair guard openings. Top-rail load: 200 lb concentrated at any point. The 2021 IRC relaxed the "any direction" requirement — guards no longer need to resist inward/upward force.