← All tools/Tools/Home & DIY/Baluster Spacing Calculator
Baluster Spacing Calculator
Space balusters evenly along a rail, with every gap under the 4-inch code limit — safe, and straight to the eye.
Balusters needed
Even gap 3.92 in · on-centre 5.42 in · 1 section
How it works
Balusters n = ceil((rail length − max gap) ÷ (baluster width + max gap)). Even gap = (rail length − n × baluster width) ÷ (n + 1). On-centre spacing = even gap + baluster width. Code rule (most building codes): no opening wider than 4 in.
96 in rail, 1.5 in balusters, 4 in maximum gap: n = ceil((96 − 4) ÷ 5.5) = ceil(16.73) = 17 balusters. Even gap = (96 − 17 × 1.5) ÷ 18 = 70.5 ÷ 18 = 3.92 in, and on-centre spacing = 3.92 + 1.5 = 5.42 in — under the 4 in limit.
Frequently asked questions
Why 4 inches?
Most building codes say a 4-inch sphere must not pass between balusters, so a small child’s head cannot fit through. This calculator checks the even gap against that 4-inch limit.
Why round the baluster count up?
Rounding down would stretch the gap past your maximum. Rounding up to 17 balusters pulls the gap down to 3.92 in — safely inside the limit.
What is on-centre spacing?
The distance from the centre of one baluster to the centre of the next — the even gap plus one baluster width. Mark this distance along the rail to lay the balusters out.
What if my rail is longer than one section?
Set the number of identical sections and the calculator multiplies the baluster count. The gap and spacing are the same in every section.
Tell us what you think
Loving this tool, or stuck on something? Tell us — it takes a minute.
We’ll only use your name and email to reply if needed. The tool and page are filled in for you.