Free baluster spacing calculator

Baluster Spacing Calculator

How many balusters you need, with an even gap under 4 inches.

Maximum gap

Code (IRC R312.1.3): a 4" ball must not pass between balusters.

Layout marks

Centre of each baluster, measured from the face of the left post.

BalusterCentre atLeft edge at

How to use the baluster calculator

  1. Measure the clear space between the two posts.
  2. Pick the baluster width — 1 1/2" for 2×2 wood, 3/4" for most metal.
  3. Read the count and gap, then mark the centres from the layout table.

The spacing formula

Gap = (opening − n × baluster width) ÷ (n + 1)

The calculator takes the smallest number of balusters n that brings the gap under the limit, so every gap is equal and the balusters at each end sit one gap from the posts. For stairs, measure the space between posts along the rail.

Building the deck too? See the deck calculator and the stair calculator.

Frequently asked questions

What is the code for baluster spacing?

Under the IRC (R312.1.3), guards must not let a 4" sphere pass through, so the gap between balusters has to be less than 4". The triangle under a stair rail may pass a 6" sphere, and the space under the bottom rail a 4 3/8" one on stairs. Many states and towns adopt these numbers; check yours.

How do I calculate baluster spacing?

Find the fewest balusters that keep the gap under 4": gap = (space between posts − balusters × baluster width) ÷ (balusters + 1). For 72" between posts and 1 1/2" balusters, 13 balusters give gaps of exactly 3 3/4".

How many balusters do I need per foot?

About 2.3 per foot with 1 1/2" balusters and gaps just under 4" — roughly one every 5 1/4" on centre. Count per section between posts, since each section starts and ends with a gap.

How do I mark the baluster layout?

Use the layout table: it gives the centre of each baluster from the face of the left post. Mark the centres on the bottom rail, or cut a spacer block to the gap width and work across.