Baluster spacing calculator
Enter the clear distance between two posts, the baluster width and your maximum gap. The calculator finds the fewest balusters that keep every opening under the limit and the exact, even gap.
13 balusters with 3 1/2″ gaps.
The formula
balusters = ⌈(clear − gap) ÷ (baluster + gap)⌉, then the actual gap = (clear − balusters × width) ÷ (balusters + 1). Spacing them this way leaves equal gaps at both posts.
Balusters per section
| Post spacing (o.c.) | Clear | Balusters | Gap |
|---|---|---|---|
| 3′ | 32 1/2″ | 6 | 3 3/8″ |
| 4′ | 44 1/2″ | 9 | 3 1/8″ |
| 5′ | 56 1/2″ | 11 | 3 5/16″ |
| 6′ | 68 1/2″ | 13 | 3 1/2″ |
The 4-inch sphere rule comes from the IRC guard requirements and is used by many US jurisdictions; one IRC-based deck detail also limits guard posts to 6 ft apart and requires guards at least 36″ high where the deck is more than 30″ above grade (City of Alexandria, Typical Deck Details). Other countries use different limits — some 100 mm, some 125 mm. Treat this as a guideline and check your local code.
To count posts, rails and balusters for a whole deck, use the deck calculator.
FAQ
What is the 4 inch sphere rule?
Under the IRC, guards must not let a 4-inch diameter sphere pass through any opening. That keeps a small child's head from fitting between balusters. Aim for about 3 1/2″ so the gap stays under 4″ after wood shrinks.
How many balusters per 6 ft section?
With 4×4 posts 6 ft on center (68 1/2″ clear) and 1 1/2″ balusters at a 3 1/2″ maximum gap: 13 balusters with 3 1/2″ gaps.
How many balusters per foot?
About 2.4 per foot of railing for 1 1/2″ balusters with gaps just under 3 1/2″ — roughly 12 balusters per 5 ft of clear span.