User Rating 0.0
Total Usage 0 times
in
Spans between posts. 1 = two end posts only.
in
in
in
IRC code: 4 in (102 mm). Use less for safety margin.
in
Quick Presets:
Enter dimensions and press Calculate
Is this tool helpful?

Your feedback helps us improve.

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.

baluster calculator baluster spacing railing calculator deck railing stair railing baluster quantity 4 inch rule IRC code

Formulas

The minimum number of balusters n required between posts is derived from the clear span and maximum allowable gap smax.

Lclear = Ltotal Nposts × wpost

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:

n = ceil(Lclear smaxwbal + smax)

Once n is known, the actual equal spacing is:

sactual = Lclear n × wbaln + 1

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 TypeTypical WidthMaterialMax Spacing (IRC)Common Use
Square Wood1.5inPine / Cedar4inDeck railings
Turned Wood1.75inOak / Poplar4inInterior stairs
Round Metal0.625inSteel / Aluminum4inModern railings
Square Metal0.75inIron / Steel4inExterior decks
Flat Bar Metal1.0inSteel4inContemporary design
Composite Square1.5inPVC / Composite4inLow-maintenance decks
Glass Panel0.375inTempered Glass4inModern interiors
Cable Rail0.1875inStainless Steel4inDeck / Loft railings
Colonial Spindle1.25inHardwood4inTraditional stairs
Wrought Iron0.5inIron4inClassic exterior
Aluminum Round0.75inAluminum4inPool fences
Wood Dowel1.0inBirch / Maple4inInterior guards
IBC Commercial1.5inSteel / Aluminum4inCommercial buildings
Heavy Timber3.5inDouglas Fir4inLodge / Rustic
Stainless Tube1.5in304 SS4inMarine / Coastal

Frequently Asked Questions

The 4in (102mm) rule in IRC R312.11.3 prevents a young child's torso from passing through the opening. A 4in sphere represents the approximate size of a small child's head. Some jurisdictions enforce 3.5in for extra safety. Always verify your local amendment to the code.
Wider balusters occupy more linear space, reducing the number of gaps. For example, switching from 0.625in round metal balusters to 1.5in square wood balusters on a 72in span can reduce the count by 2-3 balusters because each wider baluster displaces nearly an inch of gap space.
On stairs, balusters are installed plumb but measured along the rake angle. The clear opening measured perpendicular to the rake is smaller than the on-center spacing measured along the slope. In practice, most inspectors measure the gap with a 4in sphere at the widest point (usually at the top rail). This calculator computes the horizontal run spacing. For steep stairs (above 35°), the actual clear gap is roughly s × cos(θ), providing additional margin.
Yes. IRC R312.11.3 also applies to the gap between the bottom rail and the walking surface. On decks, the gap between the bottom rail and deck boards must also not pass a 4in sphere (or 6in sphere on certain commercial guards per IBC). This calculator focuses on baluster-to-baluster spacing. Verify bottom rail clearance separately on site.
Enter the total railing length and specify the number of sections (bays). The calculator divides the available length equally among bays after subtracting post widths. If your actual bays are unequal, run the calculator once per bay using each bay's measured post-to-post dimension as the railing length with 1 section.
Professional builders typically target 3.5in to 3.75in actual spacing to account for wood shrinkage, installation tolerance, and inspector measurement variation. This calculator lets you set a custom maximum gap below 4in. A 0.25in margin is considered prudent.