Baluster Calculator

Calculate how many balusters a railing run needs and the actual on-center spacing.

⏱ Updated: 18 Sep 2026

Calculator

Free baluster calculator: find how many balusters a railing run needs and the actual on-center spacing.

Balusters Needed
On-Center Spacing
in
Actual Gap
in

Defaults to a 4" max gap, the common IRC guard baluster spacing convention (a 4" sphere may not pass through). Confirm the exact figure against your local building code before building — some jurisdictions differ.

Enter railing length, baluster width, and max gap to find how many balusters a run needs, with the actual on-center spacing.

How to Use the Baluster Calculator

Enter the railing's clear span between posts, the baluster's own width, and the maximum gap your code allows, and the baluster count and actual spacing recalculate immediately. Loosen the gap number and the count drops; tighten it and it climbs.

Guard rails fail their purpose in one of two ways: too few balusters, leaving a gap wide enough for a child's head or body to slip through, or balusters spaced by the raw gap number instead of the on-center distance, which quietly undershoots the code minimum. This calculator solves the second failure mode by converting between the two directly.

Where the 4-Inch Rule Comes From

The 4-inch maximum gap between balusters comes from the International Residential Code's guard requirements (IRC R312.1.3): a 4-inch sphere must not be able to pass through any opening in a guard, a threshold chosen because it's roughly the size of a young child's head. Some jurisdictions tighten this further for stair guards, so treat the default here as a starting point, not a substitute for checking local code.

On-Center Spacing vs. Gap

max on-center spacing = baluster width + max gap
baluster count = ceil(railing length ÷ max on-center spacing) + 1
actual spacing = railing length ÷ (baluster count − 1)

Rounding the count up rather than down is deliberate — it guarantees the actual gap lands at or under the limit instead of sneaking over it.