Railing codes do not tell you how many balusters to buy; they set the largest opening a guard may have. In the United States, the International Residential Code (IRC R312.1.3) says a 4 in sphere must not pass through a required guard. In England, Approved Document K uses a 100 mm sphere for dwellings; in France, NF P01-012 limits the gaps between vertical bars to 110 mm. Everything else follows from the arithmetic: the rail length, the width of each baluster and that limit.
This baluster spacing calculator finds the smallest number of balusters that keeps every gap below the limit and then spreads them evenly, so the actual gap is the same between every pair and at both posts. It also gives the centre-to-centre spacing to mark on the rail. Switch to Whole run with posts for a long deck or balcony: it works out how many posts are needed at your maximum post spacing, the clear length of each section and the total number of balusters.
Codes also set the guard height — 36 in under the IRC for most residential guards, 900 to 1,100 mm in Europe — and a load the guard must resist, which depend on post anchoring rather than baluster spacing. For the deck itself see the deck calculator; for stair geometry, the stair calculator.
How to use this calculator
- Choose One section to space balusters between two posts, or Whole run with posts for a full railing.
- One section: enter the clear length between posts, measured along the rail. Whole run: enter the total length, the post width and the maximum post spacing.
- Enter the baluster width as seen from the front.
- Enter the maximum gap your code allows (4 in, 100 mm or 110 mm).
- Read the number of balusters, the actual gap and the centre-to-centre spacing; the steps show the layout.
The formula
With a clear length between posts, balusters of width and a maximum opening , balusters create equal gaps:
The gap must stay strictly below the limit, otherwise the test sphere just passes. Solving for the smallest whole :
Balusters are then marked every (centre to centre), the first one from the post face. For a run of length with posts of width at most apart, the number of sections is and each section's clear length is divided by the number of sections.
Worked example
Deck section, 72 in between posts, 2 × 2 balusters (1.5 in actual), IRC 4 in limit: (72 − 4) ÷ (1.5 + 4) = 12.36 → 13 balusters, leaving 14 equal gaps of 3.75 in. Mark a baluster every 5.25 in.
Metric section, 1.80 m between posts, 40 mm balusters, 100 mm limit: (1,800 − 100) ÷ 140 = 12.14 → 13 balusters with 91.4 mm gaps, 131.4 mm on centre.
Whole run of 6 m, 90 mm posts at most 1.8 m apart, same balusters: 4 sections and 5 posts, each section 1.3875 m clear, 10 balusters per section at 89.8 mm — 40 balusters in all.
Opening limits by country
| Rule | Limit | Notes |
|---|---|---|
| US — IRC 2021 R312.1.3 | 4 in sphere (102 mm) | 4 3/8 in on the open side of stairs; 6 in for the stair triangle |
| England — Approved Document K | 100 mm sphere | Applies to dwellings and places children may use; guarding should not be easily climbable |
| France — NF P01-012 | 110 mm between vertical bars | Horizontal rails at most 180 mm apart, with a non-climbable lower zone |
Local amendments exist — some US jurisdictions use 4 1/2 in — so check the edition your building department enforces.
Why equal gaps matter
Starting at one post and spacing balusters at the maximum gap leaves an odd, often illegal gap at the other end. Dividing the section into equal gaps looks better and guarantees that the largest opening is the one you calculated. Cut a spacer block to the actual gap and use it between every baluster; small rounding errors then stay invisible.
Frequently asked questions
What is the 4 inch sphere rule?
Under IRC R312.1.3, no opening in a required guard, from the walking surface up to the required guard height, may let a 4 in diameter sphere pass. It keeps a small child’s head from slipping through. The gap between balusters must therefore be less than 4 in, not equal to it.
How many balusters do I need per foot?
With 1.5 in balusters and gaps just under 4 in, about 2.2 per foot of rail (one every 5.25 to 5.5 in). With 3/4 in metal spindles, about 2.5 per foot. Use the calculator for an exact count per section, because the post positions change the result.
How far apart should railing posts be?
Wood deck guards are commonly limited to 6 ft (1.8 m) post spacing, the figure used in the American Wood Council’s DCA 6 guide; manufactured rail systems state their own tested maximum. Shorter spacing makes a stiffer rail.
Do stair balusters follow the same rule?
The IRC relaxes it slightly on the open side of stairs (4 3/8 in sphere) and allows a 6 in sphere at the triangle formed by the tread, riser and bottom rail. Measure the rail along the slope; the horizontal spacing is shorter than the gap measured square to the balusters.
What gap should I use in France or the UK?
In France, NF P01-012 allows at most 110 mm between vertical bars; in England, Approved Document K requires that a 100 mm sphere cannot pass in dwellings. Enter 110 or 100 mm as the maximum gap.
Sources
- International Code Council — 2021 IRC, Chapter 3, R312 Guards and window fall protection
- UK Government — Approved Document K: Protection from falling, collision and impact
- Agence Qualité Construction — Fiche réglementaire A02, garde-corps (NF P01-012)
- American Wood Council — DCA 6, Prescriptive Residential Wood Deck Construction Guide
Last updated: