The gaps outnumber the balusters by one
The catch is the +1. A railing with N balusters has a gap at each post plus one between every pair, so N+1 gaps in total. Forget the end gaps and every space comes out too wide. Add balusters one at a time until the gap drops to 4 inches or less, the code maximum.
The 4-inch rule, and the stair exception
- Guards (IRC R312). No gap may pass a 4-inch (102 mm) sphere. The figure roughly matches a small child's head, which is the hazard it guards against.
- Stairs. Gaps may reach 4⅜ inches (111 mm) because of the sloped geometry. The triangle under the bottom rail must still block a 6-inch sphere.
- Rule of thumb. Three balusters per running foot lands the spacing under 4 inches on its own for typical 1.5-inch stock.
- Inspection. The inspector carries a 4-inch ball and tries every gap. If it does not pass, you are code-compliant.
Worked example: a 120-inch (10 ft) run
| Balusters (N) | Baluster width | Gap each | Passes 4 in? |
|---|---|---|---|
| 24 | 1.5 in | 3.38 in | Yes |
| 26 | 1.5 in | 3.00 in | Yes |
| 30 | 1.5 in | 2.42 in | Yes, snug |
| 20 | 1.5 in | 4.36 in | No, too wide |
With 24 balusters: (120 − 24 × 1.5) ÷ (24 + 1) = 84 ÷ 25 = 3.38 in. Round to the nearest 1/8 inch for marking out and work from the centre so the two end gaps come out even.
Common questions
What is the maximum gap between balusters?
Four inches (102 mm). Under the IRC 4-inch sphere rule, no gap in a guard may let a 4-inch ball pass. Stairs get a small exception at 4 3/8 inches, and the triangle below the bottom rail on stairs must block a 6-inch sphere.
How do I count the number of balusters I need?
The gaps always outnumber the balusters by one, because there is a gap at each end plus one between every pair. A run with N balusters has N+1 gaps. So gap = (run length minus total baluster width) divided by (N + 1). Add balusters until every gap is 4 inches or less.
Can I space balusters closer than 4 inches?
Yes. Four inches is the maximum, not a target. Tighter spacing looks more solid and is always allowed; you just use more balusters. A common rule of thumb is three balusters per foot, which naturally lands under the limit.


