Baluster spacing calculator

Enter your railing's total length, baluster width, and the maximum code-allowed gap to get an exact baluster count and evenly split spacing.

Rail run length
ft
Baluster width
in
Max gap allowedi
in
Result
Balusters needed17
Actual gap3.92 in

Estimate only — check your local code's exact max-gap requirement before building.

How baluster spacing is calculated

We find the smallest number of balusters where the leftover space, split evenly into gaps on both sides of every baluster, stays at or under your code's max gap — then we show the actual resulting gap so it's evenly balanced across the whole railing rather than crowded at one end.

Frequently asked questions

Most US residential codes require gaps small enough that a 4 in sphere can't pass through — check your local building department, since some jurisdictions use a stricter standard.

Real-world railings rarely divide evenly into whole 4 in gaps, and inspectors check the actual built gap — spacing slightly under 4 in and splitting evenly avoids failing inspection over a fraction of an inch.