The 4-Inch Sphere Rule for Deck Railings and Stairs

Last updated: 2026-12-02 · SawhorseMath Editorial

Railing codes don't measure gaps with a ruler — they use an imaginary ball. If a sphere of a given size can pass through an opening, the opening fails. The idea is simple: a small child's head shouldn't fit through. Here's where each sphere size applies on a deck.

Where the 4-inch, 4 3/8-inch and 6-inch sphere tests applyLeft: a level deck guard, where no opening may pass a 4-inch sphere. Right: a stair guard whose bottom rail follows the line of the tread nosings. Openings at the sides of the stairs must not pass a 4 3/8-inch sphere, the triangle formed by a tread, its riser and the bottom rail must not pass a 6-inch sphere, and an open riser must not pass a 4-inch sphere.Deck guard: 4" spherestair sides: 4 3/8"triangle: 6"open riser: 4"Stair guard
Spheres drawn to relative size; not a construction drawing. The sphere must not pass through the opening — a gap equal to the sphere fails.

The three sphere sizes

These limits apply to required guards: open sides of decks, stairs and landings more than 30" above the floor or grade below, measured within 36" of the edge (IRC R312.1.1).

"Less than 4 inches" means less

A gap of exactly 4" fails — the sphere fits. Aim well under. We suggest aiming for about 3 1/2", which leaves room for boards that shrink or twist over time. Our baluster spacing calculator caps your gap at 3 7/8" so a rounded measurement can never read 4".

Open risers

Stairs may have open risers (no board between treads), but DCA 6 says the opening must not pass a 4" sphere — the rule our deck pages follow; our stair stringer calculator uses the IRC rule below. The 2021 IRC applies the 4" limit to open-riser openings more than 30" above the floor or grade below (R311.7.5.1), and some older editions exempted stairs with a total rise of 30" or less — check your town's edition before relying on any exception.

Benches and other guards

If a built-in bench takes the place of a guard, the openings under and around it must also stop a 4" sphere — and the guard height should be measured from the seat, not the deck. Glass, cable and other railing systems must meet the same opening rules, be approved by your building department, and be installed to the manufacturer's instructions.

How to check a railing

  1. Use a 4" ball (or a 4"-diameter round disc) as a gauge — not a tape measure or a square block, which can be stopped by a triangular or odd-shaped gap that a ball would slip through.
  2. Try it in every opening: between balusters, under the bottom rail, beside each post, and under benches.
  3. On stairs, use a 4 3/8" gauge at the sides of the treads and a 6" gauge in the bottom-rail triangle, and a 4" gauge in any open riser.
  4. Recheck after a season — wood balusters can shrink and twist.

Related

Source: American Wood Council, DCA 6 (2015 IRC edition). Code section numbers change between IRC editions — your local building department has the final word.