BALUSTER SPACING CALCULATOR

How many balusters, how far apart?

Enter the rail length and baluster width, get the count and equal gaps instantly.

in
in

Measure between the faces of the posts.

How do I calculate baluster spacing?

Find the smallest number of balusters that keeps every gap under the limit: n = (L − g) ÷ (b + g), rounded down, plus 1, where L is the length between posts, b the baluster width and g the largest gap. The gap is then (L − n × b) ÷ (n + 1). Example: 72 inches between posts with 1½-inch balusters and a 4-inch limit gives 68 ÷ 5.5 = 12.4 → 13 balusters and 14 gaps of (72 − 19.5) ÷ 14 = 3¾ inches.

What is the 4-inch sphere rule?

Section R312.1.3 of the 2021 International Residential Code says required guards must not have openings that allow passage of a sphere 4 inches in diameter, from the walking surface up to the required guard height. Keeping every gap between balusters just under 4 inches meets it.

Is the gap different on stairs?

Yes. The IRC lets guards on the open side of stairs have openings up to a 4⅜-inch sphere, and the triangle formed by the riser, tread and bottom rail up to a 6-inch sphere. Pick "Stair guard" to use 4⅜ inches; the triangle under the bottom rail is not a baluster gap and is not counted here.

When is a guard required and how tall?

Section R312.1.1 requires a guard where a walking surface is more than 30 inches above the floor or grade below within 36 inches of the open side. Section R312.1.2 makes it at least 36 inches high, or 34 inches on the open side of stairs, measured from the line connecting the nosings.

Where does the first baluster go?

With equal gaps, the first baluster's center sits one gap plus half a baluster from the post, and the rest follow at the on-center spacing (gap + baluster width). In the 72-inch example that is 3¾ + ¾ = 4½ inches from the post, then every 5¼ inches.

Should the gap be less than 4 inches or equal to 4 inches?

Less than. The code says a 4-inch sphere must not pass, so a gap of exactly 4 inches fails. That is why the calculator finds the count so that every gap is strictly below the limit, and spreads the total gap equally, so that it ends up a little under 4 inches.

Do I measure between posts or between the post faces?

Use the clear distance between the faces of the two posts, or between the post and the wall, since the balusters fit in that opening. If the balusters are fastened to a bottom rail and a top rail between posts, measure that clear span.

Worked example for a second span

Suppose the clear span between posts is 94 inches and the balusters are 1.5 inches wide. For a level guard with the 4-inch limit, you need ⌊(94 − 4) ÷ (1.5 + 4)⌋ + 1 = 17 balusters, which leaves 18 equal gaps of (94 − 17 × 1.5) ÷ 18 = 3.806 inches. The on-center spacing is 5.306 inches and the first baluster's center is 4.556 inches from the post. On a stair guard with the 4⅜-inch limit the same span needs 16 balusters, with gaps of 4.118 inches.

Common mistakes

  • Rounding the baluster count down by hand. If (L − g) ÷ (b + g) comes to 12.4, you need 13 balusters, not 12. Twelve would leave gaps of (72 − 18) ÷ 13 = 4.15 inches on a 72-inch span, just over the limit.
  • Marking the layout from one end only. Measuring from one post with a fixed spacing leaves a smaller or larger gap at the far end. Use equal gaps on both sides.

Source: International Code Council, 2021 International Residential Code, Sections R312.1.1–R312.1.3 (guards). Planning the stairs? Use the stair calculator. How we check our calculators.