This baluster calculator counts balusters (spindles) for a railing run and computes their exact equal spacing — sized so the clear gap between balusters stays within the 4-inch sphere rule that building codes enforce wherever a fall is possible.
The Count Comes From the Gaps, Not the Balusters
The layout puzzle inverts naive counting: a run of n balusters has n + 1 clear gaps: one against each post (2) plus n − 1 between balusters. Solving (L − n·w)/(n + 1) ≤ 4 in for the smallest sufficient n gives the defaults: a 144-in run with 1.5-in balusters needs 26 balusters, landing an actual clear gap of 3.89 in at a center-to-center pitch of 5.39 in. The method guarantees EQUAL gaps everywhere including at the posts — the mark of a professional layout (and the visual difference between a railing that reads as rhythm and one that reads as leftovers). Carpenters lay it out with a story stick or an elastic “baluster tape”: mark the pitch 26 times from one end without ever measuring a gap directly, because cumulative pitch marks can’t drift the way individual gap measurements do.
Why 4 inches: the sphere rule approximates a small child’s head/torso — guard openings must not pass a 4-in sphere (IRC for guards; stair triangles get 6 in in many editions, and the space between the bottom rail and a stair tread’s nosing line has its own limit). Commercial and multi-family codes often hold the same 4 in; pool barriers tighten to their own standards. This calculator takes the max gap as an INPUT for exactly that reason — set 4 for typical residential guards, tighten it where your code or conscience says, and the count follows.
Worked Examples (Verified)
- Defaults (12-ft deck rail): 26 balusters, 3.89-in gaps, 5.39-in centers.
- Slim metal balusters (0.75 in): same run → n = ⌈140/4.75⌉ = 30 balusters, gap 3.92 in — skinny spindles need more of themselves.
- Short porch rail (72 in): n = ⌈68/5.5⌉ = 13 balusters, gap = (72 − 19.5)/14 = 3.75 in.
Baluster Discipline
- Measure the run between post FACES (newel to newel), not overall rail length — balusters live between posts.
- Stairs change everything: balusters sit on treads (2–3 per tread typical) and spacing is measured along the rake; this flat-run math sizes level rails and landing guards — apply per-tread counting on stairs.
- Center the layout on openings and corners: where two runs meet, symmetric spacing from the corner reads intentional; starting both runs at the corner guarantees it.
- Leave the end gaps equal — a wide final gap at one post is the layout error everyone sees and the 4-in inspector measures first.
- Buy 2–3 spare balusters per run: one will be warped, one will be cut wrong on the stairs’ angle, and matching profiles vanish from catalogs.
Related Tools
- Stair Calculator — rise, run and stringers
- Deck Board Calculator — the deck below the rail
- Construction Calculators — the full collection
Frequently Asked Questions
How many balusters do I need?
n = ceil((run − max gap) ÷ (baluster width + max gap)), then the actual gap = (run − n × width) ÷ (n + 1). For 144 in, 1.5-in balusters, 4-in rule: 26 balusters with 3.89-in actual gaps at 5.39-in centers. This calculator runs the iteration and returns count, actual gap and pitch for layout.
What is the 4-inch sphere rule?
Guard openings must be small enough that a 4-inch-diameter sphere cannot pass through — a child-safety criterion in the IRC and IBC for railings, guards and stair balustrades. Exceptions exist (the triangular opening at a stair tread/riser/bottom-rail allows a 6-in sphere in many editions; some commercial/historic provisions differ), which is why this page takes max gap as an input rather than hard-coding one jurisdiction’s edition.
How do you space balusters evenly?
Divide the run into n + 1 equal spaces (the count this calculator solves), giving pitch = baluster width + actual gap. Mark centers cumulatively at the pitch from one post face — never measure gap-to-gap, which accumulates error. A story stick marked with all centers at once, or a jig block cut to exactly the actual gap width and butted sequentially, is the traditional drift-proof method.
Should spacing be measured center-to-center or gap-to-gap?
Codes regulate the CLEAR GAP (sphere test), layouts are marked CENTER-TO-CENTER (pitch). The two differ by the baluster width: pitch 5.39 in with 1.5-in balusters = 3.89-in clear. Confusing them in either direction fails: marking 4-in CENTERS with 1.5-in balusters gives 2.5-in gaps (wasteful), marking 4-in GAPS gives 5.5-in centers — legal but if the balusters were 2 in wide the gap logic still holds while a pitch-based purchase count would short you.
How does stair railing spacing differ?
Balusters mount on treads and are counted per tread (commonly 2, sometimes 3, at even positions on each tread) while the clear opening is measured along the sloped rail with the same sphere — the effective horizontal pitch shrinks by the tread geometry. The flat-run formula here sizes level guards; on stairs, lay out per tread and verify the sloped gap (the worst gap is between the bottom rail and the tread nosings, which has its own 4-in check in most codes).
What about horizontal railings and cable rails?
Same sphere rule, different product: horizontal members and cables must also block the 4-in sphere, and cables deflect — inspectors press them; installers space cables at ~3–3.25 in so tensioned deflection stays under 4 in. Some jurisdictions restrict horizontal “ladder effect” rails near pools or entirely in certain occupancies. The count math on this page (members + gaps) transfers directly with cable diameter as “width.”
Do I count balusters for both sides of a deck?
Each guarded run is its own calculation — run lengths between posts differ, and counts don’t pool (spacing must be uniform WITHIN a run for the equal-gap guarantee). Corners and stair openings break runs; total purchase = Σ runs + spares. Gates in the railing get balusters by the same rule applied to the gate frame’s width.
Is this baluster calculator free?
Yes — free, instant, no sign-up. Enter run length, baluster width and your code’s max gap for the count, actual gap and center-to-center pitch.