Home › Baluster Spacing Calculator
Balusters for a deck or stair railing — how many you need, and the exact even spacing that keeps every gap within the code limit.
No cost line here — this one is geometry / sizing, not a material quantity. Cost depends on the material and installer you choose.
Balusters n = ceil((rail length − max gap) ÷ (baluster width + max gap)) · Actual gap = (rail length − n × baluster width) ÷ (n + 1) · Centre-to-centre spacing = baluster width + actual gap
A 96 in rail with 1.5 in balusters and a 4 in maximum gap: n = ceil(92 ÷ 5.5) = 17 balusters. Spaced evenly, the actual gap = (96 − 25.5) ÷ 18 = 3.92 in, at 5.42 in on centre — safely under the 4 in limit.
Most building codes require guardrail openings small enough that a 4 in sphere cannot pass through — a long-standing child-safety rule, because a small child's body can slip through a gap that their head cannot. Check your local code; stairs and some jurisdictions use slightly different rules.
Yes — mark the centre of the rail and work outward in both directions, so the two end gaps come out equal. Laying out from one end leaves one odd gap at the far end, and the eye finds it immediately.
Yes — the maths is the same for any vertical baluster or spindle of a known width, wood or metal. Horizontal cable rail is judged differently, because cables deflect under pressure — check how your local code treats it before relying on a simple gap measurement.