Baluster Spacing Calculator

Enter the space between two posts, the width of your balusters and the largest gap you want. The calculator tells you how many balusters you need and the exact, equal gap between them.

Balusters between two posts
Space between posts (inside to inside)
ft
in
in
in
sections
–balusters per section

–actual gap
–center to center
–balusters for all sections
–first baluster from post

Most US codes require that a 4 inch sphere cannot pass through a guard. Keep the gap under 4 inches.

The 4 inch rule

Most US codes say a 4 inch sphere must not pass through a guardrail, so the gap between balusters has to be less than 4 inches. Many builders aim for 3½ to 3¾ inches to leave room for boards that shrink or twist. The calculator keeps every gap at or under the largest gap you enter.

Baluster spacing formula

  • Balusters = (space between posts − largest gap) ÷ (baluster width + largest gap), rounded up
  • Actual gap = (space between posts − balusters × baluster width) ÷ (balusters + 1)

There’s always one more gap than balusters, because there’s a gap next to each post.

Worked example

A section 6 ft (72 in) between posts, with 1½ inch balusters and a largest gap of 3¾ inches:

  • (72 − 3.75) ÷ (1.5 + 3.75) = 13, so 13 balusters
  • Gap: (72 − 13 × 1.5) ÷ 14 = 3¾ inches
  • Center to center: 1½ + 3¾ = 5¼ inches

Balusters per foot

BalusterWidthAbout per foot (3¾ in gaps)
Wood 2×21½ in2.3
Metal round or square¾ in2.7

For an exact count, always work it out section by section, because the space between posts is rarely the same everywhere.

Layout tips

  • Measure between the posts, inside face to inside face, for each section.
  • Cut a spacer block exactly as wide as the gap and use it between every baluster.
  • Start from the middle of the section if you want the end gaps to match perfectly.

Frequently asked questions

How far apart should balusters be?

Close enough that a 4 inch sphere can’t pass through. In practice, a gap of 3½ to 3¾ inches.

How many balusters do I need for a 6 ft railing?

With 1½ inch balusters and gaps up to 3¾ inches, 13 balusters.

How many balusters per foot of railing?

About 2.3 for 1½ inch wood balusters and 2.7 for ¾ inch metal ones, with gaps of 3¾ inches.

Does the 4 inch rule apply on stairs?

The International Residential Code allows a slightly larger 4⅜ inch opening along the open side of stairs, and a 6 inch opening in the triangle under the bottom rail. Check your local code.

Should I measure from the post center?

No. Measure the clear space between the faces of the posts.


Results are exact for the measurements you enter. Confirm railing rules with your local code. See How We Calculate for the formulas we use.

Guides for this project

All Decks, Stairs & Fences guides →