trowelmath
Deck materials
Framing · Deck materials

Deck calculator

Joists, decking, posts, footings, and railing — itemized, not rolled into one square-footage number. Imperial or metric, with the decking counted from the board's real width instead of the number printed on the tag.

D
Detail D — Deck materials
Deck area
Joists
Decking rows
Decking (lineal)
Decking boards
Joists to buy
Posts
Footings
Boards if figured from nominal width
Balusters
Rail posts

01 How the math works

A deck is five separate counts, not one. Joists span one direction and repeat along the other. Decking runs across the joists. Posts carry the beam. Railing wraps the open sides. Rolling all of it into a single "square feet of deck" hides the two places orders go wrong: the decking board width and the joist end-count.

Joists = ceil(run ÷ spacing) + 1
Decking = ceil(deck depth ÷ (board width + gap)) → rows
Posts = ceil(beam length ÷ post spacing) + 1 → per beam
Balusters = ceil(railing length ÷ baluster spacing)

The +1 on joists and posts is the piece bare division drops. A 16 ft run at 16 in on-center has twelve bays, which needs thirteen joists, not twelve — the extra one is the joist at the far end. Decking is counted in rows across the deck's depth, then multiplied by the run to get lineal feet, then divided by board length for a board count.

02 Worked example

Take a 12 ft × 16 ft deck (3.66 m × 4.88 m): 16 ft along the house, 12 ft deep, joists running out from the ledger. Joists at 16 in (406 mm) on-center along the 16 ft run: (16 × 12 ÷ 16) + 1 = 13 joists, each 12 ft (3.66 m) long.

Decking is 5/4×6 laid across the joists, running the 16 ft direction. A 5/4×6 is 5-1/2 in (140 mm) wide, and it lays with a gap — set here at 1/8 in (3.2 mm) — so each board covers 5-5/8 in (5.625 in), not 6. Rows across the 12 ft (144 in) depth: ceil(144 ÷ 5.625) = 26 rows. At 16 ft per row that's 416 lineal feet; with a 10% cutting-and-culling allowance and 16 ft boards, 29 boards.

One beam on posts at 8 ft (2.44 m) on-center along the 16 ft run: (16 ÷ 8) + 1 = 3 posts and 3 footings. Figure that same decking from the nominal 6-inch width and you get 24 rows — two short. The tag says six inches; the board is five and a half, and it has never once shown up six inches wide.

03 When this calculator is wrong

The decking count uses the board's actual 5-1/2 in face plus the gap you set, which is the one correction most deck calculators skip. Feed a calculator the nominal 6 in and it under-orders decking by roughly 7% — on this 12×16 deck, two full rows. A 2×4 sold as four inches is 3-1/2. There is no deck board as wide as its name, and that is settled fact in PS 20, the American Softwood Lumber Standard. Where the calculator still simplifies:

04 What to do with the result

Order the decking by the board count, not the square footage — the rows are already counted from real widths. Buy joists to the exact count plus one spare; a bowed joist is cheaper to swap on the ground than to fight on the frame. Footings go in first and set everything above them, so check the post count and footing size against your local frost depth before you dig.

If the deck sits more than 30 in (762 mm) above grade, code requires a 36 in (914 mm) guard with openings a 4 in (102 mm) sphere can't pass — that 4 in rule is the baluster spacing the railing line is built on (IRC R312). Local code can override any of this, and the table at the permit desk is the one that wins.

05 Common questions

How many joists do I need for a deck?
Count is ceil(run ÷ spacing) + 1, where the run is the dimension the joists repeat along. A 16 ft run at 16 in on-center is (16 × 12 ÷ 16) + 1 = 13 joists. The +1 is the joist at the far end that plain division drops.
How do I calculate how many deck boards I need?
Count rows across the deck's depth using the board's actual width plus the gap, not the nominal width. A 5/4×6 is 5-1/2 in (140 mm) wide; at a 1/8 in gap it covers 5-5/8 in. Rows × the run length gives lineal feet; divide by board length for a board count and add waste.
How far apart should deck joists be?
16 in on-center is the residential default; 12 in stiffens the deck (and is common under diagonal or thin composite decking), 24 in is the widest most decking allows. The spacing that's actually allowed depends on joist size and span — see IRC R507.
How much decking do I need for a 12×16 deck?
In 5/4×6 run the 16 ft direction, that's 26 rows across the 12 ft depth = 416 lineal feet. With a 10% allowance and 16 ft boards, 29 boards. A calculator using the nominal 6 in width would tell you 24 rows — two short.
Do I need to leave a gap between deck boards?
Yes — the gap drains water and lets the board move. Fresh pressure-treated southern pine is often laid tight and opens up to 1/8–3/16 in as it dries; kiln-dried and composite boards are set at 1/8–1/4 in per the maker. Follow the manufacturer's spacing chart for the product you buy.