Skip to content
Calcora

Baluster Calculator

Balusters for a railing run with the code-max 4 inch gap.

Input sheet

Browse DIY guidesDo the project yourself, step by step

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

Tips & gotchas

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