Spindle Spacing Calculator
Evenly spaced baluster / spindle layout for a railing run.
Result appears here
Fill in the fields and press Calculate.
Formula, calculation, assumptions and sources
Spindles n = ⌈ (Run − max gap) ÷ (spindle width + max gap) ⌉
Clear gap = (Run − n × width) ÷ (n + 1)
On-centre = clear gap + spindle width
Run the calculation to see each step with your own numbers.
A 6 ft (72 in) clear run, 1½ in square spindles, 4 in maximum gap.
n = ⌈(72 − 4) ÷ (1.5 + 4)⌉ = ⌈12.36⌉ = 13
Clear gap = (72 − 13 × 1.5) ÷ 14 = 3.75 in ✓ under 4 in
On-centre = 3.75 + 1.5 = 5.25 in
- Equal gaps across the run, with a gap at each end (spindle pattern: gap-spindle-gap-…-spindle-gap).
- Run is the clear opening between newel posts or wall.
- The 4-in rule applies to guards on decks, balconies and open stairs; the triangular opening at the bottom of a stair rail has its own 6-in rule.
- Gap or on-centre — which do I mark?
- Mark on-centre (gap + spindle width) from a consistent edge, or mark the gap from spindle to spindle. Both give the same layout; on-centre is easier with a story pole.
- Why less than 4 inches?
- The building code requires that a 4-inch sphere cannot pass through a guard, to stop a small child getting through or stuck. Some inspectors want 3-7/8 in for a margin — lower the maximum-gap input if yours does.
- Does the 4-inch rule apply to the triangle at the bottom of the stairs?
- No — the triangular opening formed by the tread, riser and bottom rail has its own 6-inch rule. This calculator handles the vertical guard infill.
Geometry
Standard even-spacing algebra.
4-inch rule
IRC R312.1.3 — a 4-inch-diameter sphere must not pass through the required guard infill. Shown for reference; verify local amendments.
About the Spindle Spacing Calculator
The Spindle Spacing Calculator lays out evenly spaced balusters along a railing run so the clear gap between them stays under 4 inches — the opening a 4-inch sphere must not pass, which is the code rule for guards on decks, balconies and open stairs. Enter the clear run between posts and the spindle width; it returns the number of spindles, the exact even gap, and the on-centre spacing to mark.
What you enter
- Clear run between posts — Post face to post face.
- Spindle width — The width of one baluster where it faces the gap.
- Maximum clear gap — IRC: less than 4 in (a 4-in sphere must not pass). Some jurisdictions use 3⅞ in for a safety margin.
What you get back
- Spindles needed — the exact result of the calculation.
- Clear gap (each) — Must be under your maximum. If it isn't, the spindle count rounded down — add one.
- On-centre spacing — Mark your layout at this interval (gap + one spindle width).
The formula, a worked example, the assumptions behind it and the sources are shown in full below the calculator.
Related calculators
- Stair Calculator — Stair rise, run, stringer length and step count for a total height.
- Fence Calculator — Posts, rails, pickets and concrete for a fence run of a given length.
- Concrete Calculator for Fence Posts — Concrete volume to set a run of fence posts, allowing for the posts displacing concrete in each hole.
Part of the Stairs calculators.