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.
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
| Baluster | Width | About per foot (3¾ in gaps) |
|---|---|---|
| Wood 2×2 | 1½ in | 2.3 |
| Metal round or square | ¾ in | 2.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
Decks, Stairs & FencesHow Tall Can a Fence Be? Standard Fence Heights and RulesThe standard fence height for a home is 6 feet in back and side yards and 3 to…Read the guide →8 min read
Decks, Stairs & FencesDeck Joist Spacing and Deck Board GapsMost decks use joists spaced 16 inches on center. That is the common limit for standard 5/4 wood…Read the guide →8 min read
Decks, Stairs & FencesHow Far Apart Should Fence Posts Be? Spacing and Depth by Fence TypeMost wood fence posts should be 6 to 8 feet apart, measured center to center, with 8 feet…Read the guide →8 min read