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.

See 2026 deck building cost ranges per sq ft →

View material estimation guides →

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

Length runs in the joist direction; width runs along the ledger / outer beam

Pricing deck framing lumber by the board foot? Calculate it

Framing species and attachment

Drives every prescriptive span — joist, beam, post, ledger fastener

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

Drives joist spacing — composites need 16" o.c., Surestone is 24" o.c., wood depends on board thickness

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.

Not sure what 16" on-center means, or how far a joist can span? See the diagram

Stairs

IRC R311.7 — riser ≤ 7-3/4", tread ≥ 10" with nosing or 11" without

Guard / railing

IRC R312 — required where deck > 30" above grade

Planning rail sections? Calculate the railing run in linear feet

How a deck frame goes together

Three things decide whether a deck is safe and lasts: how the load travels from the boards down to the footings, how far the joists can span at a given size and spacing, and how the ledger attaches to the house without rotting or pulling off. Here is each one.

The frame-anatomy section is why a deck take-off is a stack of separate framing lines, not one lumber number. Load runs decking to joists to the ledger and beam, down the posts, into footings below the frost line, and each of those members is counted on its own. The diagram is also why a joist can cantilever only so far past the beam — a limit the calculator holds.

How a deck carries its load to the ground: decking → joists → the ledger (at the house) and the beam → posts → footings below the frost line. The joist can cantilever past the beam up to about ¼ of its span.Source: 2021 IRC R507 (decks); AWC DCA 6 prescriptive deck guideSee the Parts of a deck frame diagram →(opens in a new tab)

The span-and-spacing plan explains two inputs homeowners routinely confuse. Spacing is the center-to-center distance across the joists; span is how far each joist reaches from ledger to beam, and a bigger joist or tighter spacing spans farther. The calculator needs both because together they set the joist size and count — mixing them up sizes the frame wrong.

Span and spacing are different measurements: spacing is center-to-center across the joists; span is how far each joist reaches from ledger to beam. A bigger joist — or tighter spacing — spans farther (IRC R507.6, Southern Pine #2).Source: 2021 IRC Table R507.6 (40 psf live + 10 psf dead); AWC DCA 6 Table 2See the Deck joist span vs. spacing diagram →(opens in a new tab)

The ledger-flashing cross-section is the connection behind most deck collapses, which is why the estimate includes flashing membrane and lateral ties, not just fasteners. The layers lap in a set order so water sheds outward, and the ledger is through-bolted, not nailed. These are small quantities that carry the whole deck — the diagram shows why they are non-negotiable.

A rotted or under-fastened ledger is the #1 cause of deck collapses. Flash it in order — membrane behind the ledger, ledger through-bolted to the band joist, then cap flashing tucked behind the house wrap so each layer laps the one below — and add the lateral ties that resist pull-off.Source: IRC R507.9 (ledger + lateral connection) / R507.2.4 (flashing); AWC DCA 6See the Deck ledger flashing and lateral connection diagram →(opens in a new tab)

The guard-and-handrail diagram is why the rail is a code job, not a trim job. A deck guard has to stand at least 36 inches high and no gap in it may let a 4-inch ball pass, while a stair down off the deck adds a graspable handrail 34–38 inches above the nosings. The same rules govern the deck edge and the stair, so the diagram covers both.

Handrail 34–38″ above the nosings; guard ≥36″ at landings and open sides. Infill blocks a 4″ ball — 4⅜″ on the open stair itself, 6″ in the tread-riser-rail triangle. — IRC R311.7.8 & R312Source: IRC R311.7.8 (handrail height/grip), R312.1 (guard height & sphere rules)See the Stair handrail and guard rules diagram →(opens in a new tab)

Share this calculator with your customers

Run a contractor site, supply store, or blog? Drop this free deck calculator straight onto your own page so your visitors can estimate materials without leaving. No signup, works on any website — just copy and paste.

📚

Want to Learn More?

Deck-building reference based on 2021 IRC R507 and AWC DCA 6: joist spans, beam spans, footings, ledger fasteners, decking, stairs, and railings.

Read the Deck Construction Guide

Size a dumpster for this debris

Don't guess at the container size — overage fees run $100–$300+ when you hit the weight cap or fill past the line. See the right size for this material.

Get the right dumpster size →

Related Calculators

Explore Decks & Fences: calculators, diagrams & guidesEvery calculator, cross-section diagram, and guide for this trade in one place.

How to Use This Calculator

  1. Enter deck size: length runs in the joist direction (ledger to outer beam); width runs along the ledger / outer beam.
  2. Set height above grade and ground snow load (40 psf base for most US; 50/60/70 psf step into IRC R507 sub-tables).
  3. 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.
  4. 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).
  5. 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.
  6. 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.
  7. Pick board layout (perpendicular 10% waste / diagonal 15% / picture frame 15% / herringbone 20%) and stock board length (8/10/12/16/20 ft).
  8. 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.).
  9. 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. The joist span diagram shows how far each size reaches at 16 and 24 inch spacing.

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. The deck frame diagram shows how the beam carries the joists down to the posts.

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. The ledger connection diagram shows the flashed, through-bolted ledger.

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. The guard and handrail diagram shows the 36″ guard height and the 4-inch gap rule.