Guard infill opening limits (US model codes)
The figures below summarize the commonly applied US model-code sphere rules; the code adopted and amended in your jurisdiction governs.
| Location | Sphere rule | Approx. metric | Source |
|---|---|---|---|
| Guard infill (general) | 4 in sphere must not pass | ~10.2 cm | IRC R312.1.3 / IBC |
| Triangle at stair tread/riser/rail | 6 in sphere must not pass | ~15.3 cm | IRC/IBC stair guard exceptions |
| Between stair balusters (common practice) | 4 in sphere (4⅜ in exception in IBC contexts) | ~10.2–11.1 cm | IRC/IBC |
- Guard height, strength and where guards are required at all (typically at walking surfaces more than 30 in / 76 cm above grade under the IRC) are separate requirements from opening size — this calculator addresses spacing only.
- Local jurisdictions amend the model codes; verify the adopted code and any amendments with the local building department before building or replacing a guard.
What is baluster spacing and the 4-inch rule?
Balusters are the vertical members that infill a guard or handrail between posts, and their spacing is a life-safety requirement, not an aesthetic one. The US model codes — the International Residential Code (IRC R312) and International Building Code (IBC) — require that openings in most guard infill be small enough that a 4-inch (102 mm) sphere cannot pass through. The rule exists to keep small children from slipping through or getting trapped in railing openings; many other jurisdictions apply a similar ~10 cm limit.
The layout problem is finding the smallest number of balusters that keeps every gap at or below the maximum while spacing them evenly across the span. This calculator solves it directly: it computes the minimum baluster count for the span, baluster width and gap limit entered, then reports the actual even gap that count produces and the resulting on-center spacing for marking out the rail. Entering a maximum gap slightly under the code figure (9.9 cm rather than 10.2 cm) leaves a margin for layout and cutting tolerances.
How to use this baluster spacing calculator
- Measure the clear span between posts (the space the balusters must fill) in centimeters and enter it.
- Enter the width of one baluster face — 3.2 cm is typical for a nominal 2×2 wood baluster.
- Enter the maximum permitted gap; 9.9 cm gives a safety margin under the ~10 cm (4 in) sphere rule.
- Read the baluster count, the actual even gap, and the on-center spacing to mark along the rail.
The formula behind baluster spacing
The minimum count comes from requiring that n balusters divide the span into n + 1 gaps no larger than the maximum: n = ceil((Span − MaxGap) ÷ (BalusterWidth + MaxGap)). The actual gap then redistributes the leftover space evenly: gap = (Span − n × BalusterWidth) ÷ (n + 1). The on-center spacing — the distance between the same edge of consecutive balusters — equals the gap plus the baluster width.
Worked example: a 240 cm span with 3.2 cm balusters and a 9.9 cm maximum gap needs ceil((2400 − 99) ÷ (32 + 99)) = 18 balusters. The even gap works out to (2400 − 18 × 32) ÷ 19 = 9.6 cm — comfortably under the ~10 cm sphere limit — with an on-center spacing of 12.8 cm.
Common mistakes
- Spacing balusters 10 cm on center instead of leaving 10 cm maximum clear gaps — on-center spacing includes the baluster width, and the code limit applies to the clear opening.
- Starting from one post with the maximum gap and letting the leftover land at the far post, producing one oversized (non-compliant) or one sliver gap — distribute the gap evenly as this calculator does.
- Measuring the span outside-to-outside of the posts instead of the clear space between them.
- Designing exactly at the 10.2 cm limit with no tolerance — cutting and layout error can push a gap over the limit; designing at 9.5–9.9 cm leaves margin.
Frequently asked questions
What is the maximum gap between balusters?
Under the US model codes (IRC R312.1.3 and the IBC), openings in most guard infill must be small enough to reject a 4-inch (102 mm) sphere — in practice, clear gaps of about 10 cm or less. Local amendments can be stricter, so the locally adopted code governs.
How many balusters do I need for a 240 cm railing span?
With 3.2 cm wide balusters and a 9.9 cm maximum gap, a 240 cm span needs 18 balusters, giving an even clear gap of 9.6 cm and an on-center spacing of 12.8 cm.
Why use 9.9 cm instead of the full 10.2 cm code limit?
Designing slightly under the limit leaves a tolerance margin: small layout errors, bowed balusters or cutting variance can otherwise push an individual gap past the sphere limit and fail inspection. A 3–7 mm margin costs at most one extra baluster on a typical span.
Does the 4-inch rule apply to stairs?
Guard infill along stairs follows the same 4-inch sphere principle, with specific exceptions in the model codes — notably the triangle formed by the tread, riser and bottom rail, where a 6-inch sphere limit applies instead. The adopted local code and its amendments govern.
What is on-center spacing?
On-center (o.c.) spacing is the distance from a point on one baluster to the same point on the next — the clear gap plus one baluster width. It is the figure to mark repeatedly along the rail when laying out, while the code limit applies to the clear gap between faces.
References
- International Code Council (ICC) — International Residential Code (IRC), Section R312 (Guards): 4-inch sphere rule for guard infill openings and guard height requirements.
- International Code Council (ICC) — International Building Code (IBC), Section 1015 (Guards): opening limitations for guards in non-residential occupancies.
- US Consumer Product Safety Commission (CPSC) — child entrapment guidance underlying the ~4-inch opening limits in railing and guard standards.