Deck railing calculator
Deck railing calculator: post spacing and balusters
Enter each straight run of railing and the post spacing your system allows. Get the posts, the fewest balusters that keep every gap under 4 inches, the rails and the hardware — run by run.
Enter your runsOptional
What will it cost?
Every material the calculator worked out gets its own price. Each field starts at a typical US figure so you have something to work from — change any of them to what your own supplier charges.
These prices are approximate. They are national US retail figures, and what you actually pay varies with your region, your supplier, the season and how much you buy at once. Treat them as a starting point, not a quote — always price the job from your own supplier's current figures before you order.
Your prices
Tools for the job
What makes this job easier
Tools and materials that suit this kind of job. These are affiliate links: if you buy through one, Renovimo may earn a commission at no extra cost to you. It never changes the figures on this page.
Garvee
4 × 4 post base brackets, 8-pack
Anchors posts to a footing or slab, clear of standing water.
Check price
Garvee
Adjustable steel deck gate
Closes the top of the deck stairs; adjusts to the opening.
Check price
Garvee
Stair handrail, 6 ft
A graspable rail for deck and porch steps — code asks for one at four risers.
Check price
Garvee
20V cordless hammer drill
Drills masonry and concrete for anchors, and drives screws everywhere else.
Check price
Garvee
6 in random orbital sander
Smooths stair treads, rails and trim before finishing.
Check price
Garvee
Pergola bracket kit for 4×4, 12 pieces
Corner, base and tee brackets for a 4×4 frame on footings.
Check price
Not the tool you were after? Browse the whole range at Garvee — the store these picks come from.
Based on your result
What you'll need
Set the posts first and measure the real clear span between them before cutting balusters — a post a quarter inch out changes the gaps.
- Railing posts
- Bolted through the rim, never just screwed to it
- Calculate above
- Balusters
- Cut to one length and gapped with a spacer block
- —
- Top and bottom rails
- A 2 × 6 cap over a 2 × 4, or the system rail
- —
- Rail brackets
- One at each end of every rail
- —
- Spacer block
- Cut to the gap the result gives, so every baluster lands alike
- 1
Wood deck railing calculator: runs and posts
How far apart should deck railing posts be? Six feet on center is the common maximum for wood railing; the calculator splits each run into equal sections no longer than the spacing you enter, so the posts land evenly.
The maths
How this deck post spacing calculator works
The code does not set a baluster count. It sets a test: a 4 in sphere must not pass through any opening in the guard. With n balusters in a clear span there are n + 1 gaps, so the question is simply the smallest n that brings every gap under 4 inches.
clear span = run ÷ sections − post width
gap = (clear span − n × baluster) ÷ (n + 1)
n = ⌊ (clear span − 4) ÷ (4 + baluster) ⌋ + 1
posts = sections + 1
- 01
Split each run into sections
The run over the maximum post spacing, rounded up, so the posts are evenly spaced and none is further apart than the system allows.
- 02
Take the posts out
The clear span is the section less one post width: the space the balusters actually fill.
- 03
Find the fewest balusters
The smallest count for which every gap is under 4 in. One fewer and a gap reaches 4 in; the calculator checks both.
- 04
Share the corners
Runs are listed in order round the deck, and each corner post serves both runs it joins.
- 05
Add the rails and hardware
A top and a bottom rail on every run, a bracket at each rail end, and two screws top and bottom on every baluster.
Good to know
Deck railing questions, answered
Six feet on center is the common maximum for wood railing, and many aluminium and composite systems are rated for 6 or 8 ft sections. The railing system’s installation instructions set the figure; the calculator takes whatever you enter.
With 4 × 4 posts at 6 ft centres the clear span is 68½ in, and 1½ in wood balusters need 12 of them to keep every gap under 4 in — 3.88 in each. Metal ¾ in balusters need 14.
No opening in a deck guard may let a 4 in sphere pass through. It is written that way so a small child’s head cannot fit between the balusters, and it applies to the gaps between balusters and under the bottom rail.
At least 36 in above the deck surface for a home under the IRC, measured to the top of the rail. Some jurisdictions ask for more; check with the building department.
The IRC requires a guard where the deck surface is more than 30 in above the grade below at any point within 36 in of its edge. Below that height a railing is optional, though often still a good idea.