Baluster Calculator
Balusters for a railing run with the code-max 4 inch gap.
Input sheet
DIY at your own risk. Calcora's calculators and guides are general estimates and information only — not professional, engineering, legal, or safety advice. Always verify local building codes and permit requirements, and hire a licensed pro for electrical, gas, plumbing, structural, or any work you're not fully comfortable doing yourself.
Baluster spacing is a code problem disguised as a shopping problem: the gaps must stop a 4 in sphere, and the balusters must land evenly so the run looks right. This calculator gives the count that satisfies both.
How it works
Balusters = run length ÷ (baluster width + max gap), rounded up. The actual gap spreads the leftover space evenly: (run − balusters × width) ÷ (balusters + 1).
The count formula treats each baluster plus one maximum-width gap as a repeating unit: run length ÷ (baluster width + max gap), rounded up. Rounding up is what guarantees every actual gap lands under the 4 in limit.
The actual-gap metric then spreads the leftover space evenly: total run minus all the baluster widths, divided by the number of gaps (balusters + 1). That even spacing is what installers lay out with a story pole or spacing jig.
Balusters = run (in) ÷ (baluster width + max gap), rounded up. Actual gap = (run − balusters × width) ÷ (balusters + 1).
Worked examples
A 20 ft railing run with 1.5 in balusters and the 4 in code max. → 44 balusters at a 3.87 in actual gap.
240 ÷ 5.5 = 43.6 → 44 balusters. Actual gap = (240 − 66) ÷ 45 = 3.87 in — comfortably under 4.
One 8 ft section between posts, same baluster. → 18 balusters at a 3.63 in gap.
96 ÷ 5.5 = 17.5 → 18. Gap = (96 − 27) ÷ 19 = 3.63 in.
Tips & gotchas
- Calculate per section between posts, not the whole run at once — each section's spacing must work on its own.
- Buy a handful extra; splits and paint-grade rejects show up in every box of balusters.
- On stairs the 4 in sphere rule applies measured along the rake, and the triangle at each tread/riser/rail gets its own 6 in sphere rule.
FAQ
Why 4 inches?
Building code requires that a 4 in sphere cannot pass through — sized so a small child's head cannot fit between balusters.
Is 4 inches the rule everywhere?
It is the IRC standard for guards in the U.S. — a 4 in sphere must not pass. Always confirm locally; some jurisdictions and commercial codes differ.
Does the gap rule apply to the bottom rail?
Yes — the space between the deck surface and a bottom rail must also reject the 4 in sphere, so keep it under 4 in too.
Related calculators
Concrete Calculator · Paint Calculator · Flooring Calculator · Mulch Calculator · Gravel & Driveway Calculator