STUD & SLAB

Baluster Spacing Calculator

Enter your railing opening and baluster size to get the exact count and a perfectly even layout that passes the 4 inch sphere rule.

Clear distance, inside face to inside face.

A 2x2 baluster is 1.5 inches wide.

Code is 4 inches. Use 3.875 for margin.

Balusters needed

13

Gap between each

3.75 in

Center to center

5.25 in

Layout: mark the first baluster 3.75 in from the post, then every 5.25 in on center. All 14 gaps come out identical and under the code maximum.

How the math works

The trick that makes every gap identical: imagine adding one extra baluster width to the opening. Dividing that by the sum of the maximum gap and one baluster width, then rounding up, gives the number of spaces that guarantees every gap lands at or under the code limit.

From there the identical gap is simple: total opening minus the wood (balusters times their width), spread evenly across the spaces. The center-to-center number is that gap plus one baluster width, which is the single measurement you repeat with a tape or spacer block during install.

FAQ

What is the 4 inch sphere rule?
Residential code requires that a 4 inch sphere cannot pass through any opening in a guardrail. In practice, the clear gap between balusters must be less than 4 inches. Many builders lay out at 3.875 inches to leave margin for lumber variation.
How do I calculate equal baluster spacing?
Add one baluster width to the opening, divide by the max gap plus one baluster width, and round up. That is your number of spaces; balusters are one fewer. The actual identical gap is the opening minus all baluster widths, divided by the number of spaces.
Do I measure from the post face or post center?
Measure the clear opening between the inside faces of the posts. Post centers would include the posts themselves and throw off the gap math.