Baluster Calculator
Calculate baluster spacing, quantity, and layout for deck and stair railings. Meets IRC 4-inch max gap code requirements.
About
Incorrect baluster spacing is a leading cause of building code violations in residential construction. The International Residential Code (IRC R312.11.3) mandates that a 4in sphere must not pass through any opening in a guard or railing assembly. Failure means failed inspections, costly rework, and potential liability if a child passes through the gap. This calculator determines the exact number of balusters and the uniform spacing required for a given railing length, accounting for post widths and baluster cross-section dimensions. It solves for n (baluster count) such that the resulting gap s never exceeds the code-maximum, then redistributes the remaining space equally. The tool approximates layout assuming uniform baluster cross-sections and plumb installation. Non-plumb rake sections on stairs will have slightly reduced clear openings due to the angle, which this tool does not adjust for. Measure actual post-to-post spans on site rather than relying on plan dimensions.
Formulas
The minimum number of balusters n required between posts is derived from the clear span and maximum allowable gap smax.
where Ltotal is the overall railing length, Nposts is the number of intermediate posts (excluding end posts already subtracted from span), and wpost is the post width. For a single span between two posts:
Once n is known, the actual equal spacing is:
where wbal is the baluster width/diameter, smax = 4in per IRC R312.11.3. The total material count across all spans is n multiplied by the number of bays (sections between posts).
Reference Data
| Baluster Type | Typical Width | Material | Max Spacing (IRC) | Common Use |
|---|---|---|---|---|
| Square Wood | 1.5in | Pine / Cedar | 4in | Deck railings |
| Turned Wood | 1.75in | Oak / Poplar | 4in | Interior stairs |
| Round Metal | 0.625in | Steel / Aluminum | 4in | Modern railings |
| Square Metal | 0.75in | Iron / Steel | 4in | Exterior decks |
| Flat Bar Metal | 1.0in | Steel | 4in | Contemporary design |
| Composite Square | 1.5in | PVC / Composite | 4in | Low-maintenance decks |
| Glass Panel | 0.375in | Tempered Glass | 4in | Modern interiors |
| Cable Rail | 0.1875in | Stainless Steel | 4in | Deck / Loft railings |
| Colonial Spindle | 1.25in | Hardwood | 4in | Traditional stairs |
| Wrought Iron | 0.5in | Iron | 4in | Classic exterior |
| Aluminum Round | 0.75in | Aluminum | 4in | Pool fences |
| Wood Dowel | 1.0in | Birch / Maple | 4in | Interior guards |
| IBC Commercial | 1.5in | Steel / Aluminum | 4in | Commercial buildings |
| Heavy Timber | 3.5in | Douglas Fir | 4in | Lodge / Rustic |
| Stainless Tube | 1.5in | 304 SS | 4in | Marine / Coastal |