Building & DIY

Spindle Spacing Calculator (Balusters, IRC 4-Inch Rule)

Works out how many balusters you need and the even gap between them for a railing. It keeps the gaps under the 4-inch sphere rule from the building code.

Reviewed and updated

How to use
  1. Enter the railing length, baluster width, and your target gap.
  2. Switch between inches and centimeters if you need to.
Estimates only, allow for waste and confirm against local building codes and supplier specs.
Was this helpful?

The gaps outnumber the balusters by one

gap = ( run N × width ) ÷ ( N + 1 )

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 widthGap eachPasses 4 in?
241.5 in3.38 inYes
261.5 in3.00 inYes
301.5 in2.42 inYes, snug
201.5 in4.36 inNo, 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.

From the blog

Guides & how-tos

All articles →