How to use the baluster spacing calculator
Spacing balusters by eye or with a fixed spacer block usually leaves an odd gap at one post. This calculator finds the fewest balusters that keep every gap under your limit and then spreads them evenly, so the gaps at the posts match the gaps between balusters. It also gives the on-centre spacing for marking out, the total count for several identical sections and the number per tread for a stair.
- Choose units. US mode works in inches, metric in millimetres.
- Measure the clear space between the inside faces of the two posts, at the rail.
- Enter the baluster width as installed. A 2 × 2 is 1.5 in, and square metal balusters are often ½ or ¾ in.
- Set the maximum gap. Use a little less than the code sphere: 3.75 in for the US 4 in rule or about 95 mm for a 100 mm rule.
- Add the number of sections and a tread depth if you want totals for a whole deck or a count per stair tread.
Baluster spacing formula
Balusters per section, n = ceiling((clear space − max gap) ÷ (baluster width + max gap))
Equal gap = (clear space − n × baluster width) ÷ (n + 1)
On-centre spacing = equal gap + baluster width
Balusters per tread = ceiling(tread depth ÷ (baluster width + max gap))
The first line comes from the fact that a section with n balusters has n + 1 gaps. Rounding up guarantees the equal gap is no bigger than your maximum. Mark the first baluster centre at one gap plus half a baluster from the post, then step along by the on-centre spacing.
| Baluster | Gap limit | Balusters per 8 ft section | Equal gap |
|---|---|---|---|
| 1.5 in wood (2 × 2) | 3.75 in | 18 | 3.63 in |
| 1.5 in wood (2 × 2) | 3.5 in | 19 | 3.38 in |
| 0.75 in metal | 3.75 in | 21 | 3.65 in |
| 0.5 in metal | 3.75 in | 22 | 3.70 in |
Worked examples
An 8 ft deck section
The clear space between posts is 96 in, with 1.5 in balusters and a 3.75 in limit. The count is ceiling((96 − 3.75) ÷ 5.25) = ceiling(17.57) = 18 balusters. The equal gap is (96 − 27) ÷ 19 = 3.63 in, and the on-centre spacing is 5.13 in.
A metric balcony
A 2,400 mm section uses 40 mm balusters with a 95 mm limit to satisfy a 100 mm sphere rule. The count is ceiling((2,400 − 95) ÷ 135) = 18, the equal gap is (2,400 − 720) ÷ 19 = 88.4 mm and the centres are 128.4 mm apart.
A whole deck and its stair
A deck has three 70.5 in sections of 2 × 2 balusters. Each needs ceiling(66.75 ÷ 5.25) = 13 balusters with 3.64 in gaps, 39 in total. The stair has 10 in treads, so it needs ceiling(10 ÷ 5.25) = 2 balusters per tread, which gives 5 in centres and 3.5 in gaps.
Who this calculator helps
- Architects detailing guards and checking that a baluster spec meets the sphere rule before it goes to site.
- Deck builders and carpenters working out counts for ordering and marking out even spacing.
- Building inspectors and plan reviewers checking guard openings quickly.
- DIY builders replacing or adding balusters on stairs, porches and decks.
Practical tips
- Plan the stair geometry first with the stair calculator, and the deck framing with the deck calculator.
- For a garden boundary rather than a guard, use the fence calculator to count posts, rails and pickets.
- Cut a spacer block to the equal gap, not the code maximum, so every gap is the same.
- Check the bottom rail too: the gap between the bottom rail and the deck must also stop the sphere.
- Buy a few spare balusters for splits, knots and miscuts.
Comparing railing styles for a client? Swap them on a photo of the deck or stair with AI Exterior Redesign.