How baluster spacing is calculated
Between two posts there's a clear opening. With n balusters there are n + 1 gaps (one at each post), so:
n = ⌈(opening − max gap) ÷ (baluster + max gap)⌉ and gap = (opening − n × baluster) ÷ (n + 1)
For a 68-1/2" opening with 1-1/2" balusters and a 3-7/8" maximum, that's 13 balusters with even gaps of 3-1/2".
Each railing run is first split into equal sections no wider than your maximum post spacing. If runs meet at corners, they share the corner post.
Example: three sides of a 16 × 12 ft deck
Railing on two 12 ft sides and one 16 ft side, 4×4 posts at up to 6 ft, 2×2 balusters: 8 posts, 7 sections and 81 balusters. Buy a few extra balusters for splits and bad cuts.
Leave a gap for stairs? Enter each side of the opening as its own run and untick “share corner posts” if they don't meet.
Frequently asked questions
How far apart should deck balusters be?
Under the International Residential Code, guard openings must not let a 4" sphere pass through (IRC R312.1.3). Most builders aim for about 3-1/2" to 3-7/8" to leave room for wood movement. The calculator spaces balusters evenly so every gap — including those at the posts — stays under your maximum.
How many balusters per foot?
With 1-1/2" balusters and gaps just under 4", it works out to roughly 2-1/2 to 3 balusters per foot of railing. The exact count depends on the clear width between posts.
How high does a deck railing need to be?
In the IRC, guards are required where the walking surface is more than 30" above the grade below, and must be at least 36" high for residential decks (IRC R312.1). Some areas require 42". Check your local code.
How far apart should railing posts be?
It depends on the railing system and how posts are attached. Many wood and composite systems allow 6 ft between posts, and some allow 8 ft. Use the maximum from your railing’s instructions.