Spindle Spacing Calculator
Spindle count = (run − max gap) ÷ (spindle width + max gap), rounded up; the leftover space is then split into equal gaps under 4 in. A 72 in run with 1½ in spindles takes 13 spindles with 3.75 in gaps, marked at 5.25 in on centre. For the stair itself, use the Stair Calculator.
How it's calculated: n = ⌈(run − max gap) ÷ (spindle width + max gap)⌉; gap = (run − n × width) ÷ (n + 1); on-centre = gap + width.
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.
- How many balusters do I need for a 6 foot railing?
- 13 balusters of 1½ in width for a 72 in clear run, giving 3.75 in gaps — under the 4 in limit. Wider balusters need fewer; the calculator finds the smallest count that keeps every gap under your maximum.
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.