Cut&Count

Deck railing calculator

Posts, rails and balusters, spaced so a 4 in sphere cannot pass — with margin, so site tolerance cannot push you over.

Plan view of a 16 by 12 foot deck13 joists spaced 16 inches on centre along the 16 foot length, spanning the 12 foot width. The house side is carried on a ledger; the outboard edge is carried on a beam. 3 posts on footings 12 inches across. Boards run the length of the deck, parallel to the house. Stairs drop 36 inches to grade in 5 risers.House / ledger16 ft12 ft
Ledger, rim and beam Joists at 16″ on centre Deck boards Railing Post on footing
13 joists spaced 16 inches on centre along the 16 foot length, spanning the 12 foot width. The house side is carried on a ledger; the outboard edge is carried on a beam. 3 posts on footings 12 inches across. Boards run the length of the deck, parallel to the house. Stairs drop 36 inches to grade in 5 risers.
192sq ft deck
16′ × 12′footprint
3line items

Railing

Item Qty Unit
Guard posts Posts at no more than 6 ft apart on each open run (12 ft, 16 ft, 9 ft), plus one to close each run, less 2 shared corner posts = 8. 8 each
Top and bottom rails 37.0 ft of guard, with a top and a bottom rail: 37.0 x 2. 74 linear ft
2x2 balusters A 4 in sphere must not pass through the guard (IRC R312.1.3). With 1.50 in balusters and a 3.75 in design gap, they sit 5.25 in on centre: 444 in of guard / 5.25 = 85. 85 each
What this assumed
Guards assumed at least 36 in tall (IRC R312.1.2).
Balusters at 5.25 in on centre.

How this calculator works

The 4 inch sphere rule

IRC R312.1.3 says a 4 in sphere must not pass through any opening in a guard. Designing to exactly 4 in leaves no room for error: a baluster set a sixteenth of an inch off puts the whole run out of compliance. This calculator designs to a 3.75 in gap so ordinary site tolerance cannot fail the inspection.

Corner posts are shared

Two runs of railing that meet at a corner share one post. Counting each run independently and adding the totals double-counts every corner. On an attached deck that is two posts of overcount; on a freestanding deck, four.

The stair opening is not railed

Where stairs leave the deck, that width is an opening in the guard, not a run of it. Subtracting the stair width from the perimeter before counting posts and balusters is the difference between a materials list and a guess.

When a guard is required at all

IRC R312.1.1 requires a guard once the walking surface is more than 30 in above grade. Below that a railing is optional, and plenty of low decks are built without one. If your deck is under the threshold this calculator will tell you, and still count the materials if you want one anyway.

What we will not guess

Joist and beam span limits are structural-safety data. Until our span tables are verified line by line against the published AWC DCA6 tables, this site withholds them and says so, rather than printing a number that looks authoritative. Footing depth must reach below your local frost line, which varies from nothing in the far south to over eight feet in the far north. Confirm both with your local building department — see our methodology.

Other calculators