Pitch & Plank

All calculators

Baluster spacing calculator

Enter the opening between two posts to get the number of balusters and an even gap that stays under the code limit.

Measurements

Opening between posts

Inside face to inside face

in

A 2x2 is 1.5 in. Round metal ones are often 0.75 in.

in

Code needs gaps under 4 in

Results

Balusters
14
Gap between balusters
3 3/8" (3.4 in)
Center to center
4 7/8"
Post to first center
4 1/8"
6' 0"3 3/8"

How it works

Rounding up gives the fewest balusters that keep every gap at or under your limit. The gaps next to the posts are the same as the gaps between balusters, so the section looks even.

Example: a 72 inch opening with 1.5 inch balusters and a 3.5 inch limit. (72 − 3.5) ÷ (1.5 + 3.5) = 13.7, so 14 balusters. Gap = (72 − 14 × 1.5) ÷ 15 = 3.4 inches, which is 3 3/8 in.

Laying it out

  1. Measure each opening on its own. Posts are rarely the same distance apart.
  2. Mark the center of the first baluster from the post, using the post to first center number.
  3. Step off the center to center distance for the rest. Marking all the centers from one end with a tape avoids small errors adding up.
  4. Cut a scrap block to the gap width and use it as a spacer while you fasten.

The 4 inch rule

The International Residential Code says a 4 inch ball must not fit through any opening in a deck guard rail. So the clear gap has to be less than 4 inches. Many builders aim for 3.5 inches to leave room for boards that warp or shrink. The rail along the open side of a stair is allowed slightly wider gaps, up to a 4 3/8 inch ball.

Common questions

What is the code for baluster spacing on a deck?

Under the International Residential Code, a 4 inch sphere must not pass through any opening in the guard, so gaps must be under 4 inches. A guard is required when the deck is more than 30 inches above the ground, and it must be at least 36 inches tall. Some states and cities require a taller rail.

How many balusters do I need per foot?

About 2.4 per foot with 1.5 inch balusters and a 3.5 inch gap, so roughly 14 for a 6 foot section. The calculator gives the exact count for your opening.

What is the on-center spacing for 2x2 balusters?

With a 3.5 inch gap it is 5 inches. The calculator usually lands a little under that, because it evens out the gaps to fit your opening exactly.

Should the gap next to the post match the others?

Yes, that looks best and it is what this calculator gives you. Every gap, including the two at the posts, is the same size.

Put this calculator on your site

Paste this code into any web page to show the calculator there. It is free to use.

Sources

Facts on this page were last checked against these sources in October 2026.

Related calculators