Spindle Spacing Calculator

in
in
in

Calculate the number of spindles/balusters and exact gap between them to comply with IRC 4-inch rule.

Formula

n = ⌈(span + maxGap) / (spindle width + maxGap)⌉; actual gap = (span − n × width) / (n + 1)
  • IRC §R312.1.3: Max opening = 4 in for guards; 4-3/8 in for stairs.
  • Ceiling function ensures gap never exceeds the maximum.
  • Posts are not counted — measure span between posts.

96 in span, 1.5 in spindles, 4 in max gap

Inputs
  • Rail Span: 96 in
  • Spindle Width: 1.5 in
  • Maximum Allowed Gap: 4 in

n = ⌈(96+4)/(1.5+4)⌉ = ⌈100/5.5⌉ = 19. Actual gap = (96−28.5)/20 = 3.375 in ≤ 4 in ✓.

Frequently asked questions

Does the 4-inch rule apply to stairs?
For stair guardrails: the maximum opening is 4-3/8 inches (IRC §R312.1.3). For horizontal intermediate rails on stairs, the maximum is 4 inches at a 36-degree sphere.