Baluster Spacing (IRC 4-Inch Rule)

Lay out guard balusters at a perfectly even gap that passes the IRC R312.1.3 4-inch-sphere rule: minimum count, clear gap with pass/fail, center marks from the post face, and an as-built count check with margin.


IRC 2021 R312.1.3 · IBC 2021 1015.4

Guard Opening Inputs (IRC R312.1.3)

in
in

IRC R312.1.3 rejects a 4 in sphere at any guard opening; the gap at each post counts too. Use a custom maximum only where a code exception applies: 4.375 in for guards on the open sides of stairs, or 6 in at the stair tread-riser-bottom-rail triangle.

Even-Spacing Layout

11
Minimum balusters
3.625in
Even clear gap
4.000in
Maximum allowed gap
4.375in
First center from left post
PASSES: 3.625 in gap <= 4.000 in limit

Opening Elevation (to scale)

Post faces, rails, and balusters drawn to scale from the computed centers.

Layout Marks from the Left Post Face

BalusterCenter (in)Leading edge (in)
#14.3753.625
#29.5008.750
#314.62513.875
#419.75019.000
#524.87524.125
#630.00029.250
#735.12534.375
#840.25039.500
#945.37544.625
#1050.50049.750
#1155.62554.875

About Baluster Spacing Calculator (IRC 4-Inch Rule)

The baluster spacing calculator lays out guard infill — wood balusters, metal pickets, or spindles — inside the clear opening between posts so that no gap lets a 4-inch sphere pass, the limit set by IRC R312.1.3 for guards on decks, stairs, landings, and balconies. Given the opening and the baluster width, design mode computes the minimum number of balusters, spaces them perfectly evenly, and lists the center-line positions to mark on the rail, measured from the left post face.

Check mode works the other way: enter the number of balusters already installed (or planned) and the tool reports the even gap they produce, whether it passes, and by how much — a negative margin means the layout fails and needs one more baluster. The 4-inch maximum can be overridden for the code exceptions: guards on the open sides of stairs may reject a 4-3/8-inch sphere (IRC R312.1.3 exception 2), and the triangle formed by the stair tread, riser, and bottom rail may reject a 6-inch sphere (exception 1).

How It Works

  1. Measure the clear opening between the inside faces of the posts (or newels) in inches and enter it.
  2. Pick a baluster width preset — 1-1/2 in for a nominal 2x2 wood baluster, 3/4 in for a typical round or square metal picket, 2 in for a wide flat baluster — or enter a custom face width.
  3. Keep the maximum gap at the 4 in IRC default, or enter a custom limit where an exception applies: 4.375 in for guards on the open sides of stairs (R312.1.3 exception 2), or 6 in at the tread-riser-bottom-rail triangle (exception 1).
  4. In design mode, the tool returns the minimum baluster count, the resulting even clear gap with a pass/fail badge, and a table of center positions from the left post face to mark the rail for drilling or fastening.
  5. In check mode, enter the as-built baluster count instead: the tool reports the even gap, whether it passes, and the margin to the limit — negative margin means add a baluster.

Worked Example

A 60-inch clear opening between deck posts is infilled with 1-1/2-inch (nominal 2x2) wood balusters under the 4-inch rule. The minimum count is ceil((60 - 4) / (1.5 + 4)) = ceil(10.18) = 11 balusters. Spaced evenly, the clear gap is (60 - 11 x 1.5) / 12 = 3.625 in, which passes the 4-inch-sphere rule with 3/8 in to spare. The first baluster center falls at 3.625 + 0.75 = 4.375 in from the left post face and the last at 55.625 in, mirroring it. Had only 10 balusters been used, the gap would be (60 - 15) / 11 = 4.09 in — an inspection failure by about 3/32 in.

Formulas

Minimum baluster count
n = max(0, ceil((L - g_max) / (w + g_max)))
Even clear gap
g = (L - n * w) / (n + 1)
Center-line positions from the left post face
c_i = g * (i + 1) + w * i + w / 2, i = 0 .. n - 1
Check-mode margin
margin = g_max - g

Standards & References

  • IRC 2021 R312.1.3 -- guard opening limitations (4-inch sphere)
  • IBC 2021 1015.4 -- guard opening limitations

Frequently Asked Questions

What is the 4-inch sphere rule for balusters?

IRC R312.1.3 requires that guards on decks, stairs, landings, and balconies have no opening that allows a 4-inch-diameter sphere to pass. It exists to keep a small child’s head and torso from fitting through the infill. In practice, every clear gap between balusters — and between the end balusters and the posts — must be under 4 inches, and inspectors carry a 4-inch ball or gauge to check it.

Is the spacing measured center-to-center or as a clear gap?

The code limit applies to the clear opening — the daylight between baluster faces — not the center-to-center spacing. For 1-1/2-inch balusters at a 4-inch clear gap the centers land 5-1/2 inches apart, so a common site shortcut is to lay out centers at (baluster width + gap). This calculator reports both: the even clear gap for the code check and the center positions for marking the rail.

How do I calculate the number of balusters for an opening?

Divide the opening minus one maximum gap by the baluster width plus the maximum gap and round up: n = ceil((L - 4) / (w + 4)) with everything in inches. A 60-inch opening with 1-1/2-inch balusters needs ceil(56 / 5.5) = 11 balusters. Rounding up is what guarantees the even gap lands under the limit; rounding down (10 balusters) would give a 4.09-inch gap and fail.

Why is my even gap less than 4 inches — can I just use fewer balusters?

Because the baluster count must be a whole number, the even gap almost never lands exactly on 4 inches; the minimum passing count usually produces a gap somewhat tighter, like the 3.625 inches in the 60-inch example. Dropping one baluster pushes the gap over the limit — that is exactly the boundary the rounding protects. Treat the sub-4-inch gap as free margin for layout tolerance, baluster crook, and post placement error.

Does the 4-inch rule apply on the stair itself?

Guards along the open side of a stair follow the same 4-inch sphere rule for the infill, but the IRC carves out two exceptions: the triangle formed by the tread, riser, and bottom rail may reject a 6-inch sphere, and openings in guards on the sides of stair treads may reject a 4-3/8-inch sphere. This calculator defaults to 4 inches and lets you enter a custom maximum such as 4.375 inches for those locations — confirm which allowance your inspector applies.

What baluster width should I enter for common materials?

Enter the actual face width the sphere would meet, not the nominal size: a nominal 2x2 wood baluster dresses to 1-1/2 inches, standard round or square aluminum and steel deck pickets are typically 3/4 inch, and wide flat aluminum or composite balusters run about 2 inches. For turned balusters use the narrowest diameter along the height, since the gap is largest — and the code is checked — at that point.