Baluster spacing calculator
Calculate equal baluster spacing with code-compliant maximum gap. IRC requires that a 4" sphere cannot pass between balusters.
Drop calc results into projects and quotes, invoice through your own Stripe, get paid. Built by a contractor.
Try TradeMaster Pro →Baluster Spacing Code Requirements
The IRC requires that a 4-inch sphere cannot pass through any opening in a guard or railing (IRC R312.1.3). This means the clear gap between balusters must be less than 4 inches.
The calculator finds the number of balusters needed to keep gaps under the maximum, then calculates the actual equal spacing. The result is always slightly under the max gap — ensuring code compliance while keeping the spacing as even as possible.
Do I include the post in the baluster count?
No. Posts are structural and separate from balusters. Enter the total railing length (post face to post face) and the calculator determines how many balusters fit between them.
Why the 4-Inch Rule Matters
The IRC 4-inch sphere rule exists specifically to prevent small children from getting their heads stuck between balusters — a hazard that has caused fatalities. The rule applies to all guards and railings, interior and exterior. On stair railings, the code allows a slightly larger opening: a 4-3/8" sphere may pass through the open triangle formed by the riser, tread nosing, and bottom rail (IRC R312.1.3 exception).
Guard height is 36 inches minimum for residential decks and balconies (IRC R312.1.2), while commercial applications require 42 inches. Handrails on stairs are separate from guards and must be 34 to 38 inchesabove the tread nosing (IRC R311.7.8.1). For interior stairs with 1-1/4" balusters, the typical on-center spacing lands between 3-7/8" and 4" to maintain gaps under the 4-inch maximum.