Skip to content
Code reference

The 4-Inch Sphere Rule and Baluster Spacing

Almost every American baluster conversation comes back to “the 4 inch rule”. The number is simple; what it measures, and what it does not, is where layouts go wrong.

What the rule says

The guard provisions of the International Residential Code include an opening limit: a required guard must not have openings that let a sphere 4 in in diameter pass through. In the 2018 and 2021 editions it sits at R312.1.3, “Openings”, inside R312.1 “Guards”. Editions get amended and adopted on different schedules, so check the edition your jurisdiction actually enforces rather than the one your lumberyard quotes.

Note what the sentence is about: openings, not spacing. It never mentions balusters, center-to-center distances or a tape measure. That is the whole reason a spacing calculator has to report a clear opening as its primary number.

Why it is a horizontal test

A sphere dropped against a guard travels however gravity takes it, but the test that matters is whether it can pass through the guard. Between two vertical balusters, the widest passage is the horizontal distance between their faces. So the code dimension is horizontal, and it is the same at every height along a vertical baluster.

This is why a stair needs care. If you divide the sloped rail into equal parts, the marks are further apart than the horizontal distance between the same two balusters. A layout that measures 4 in along the rail is really about 3-9/16 in horizontally on a 26° stair — conservative, but not the number you think you built. The spacing formula guide covers the conversion; the calculator does it for you and reports both.

Where the rule applies on a stair

Places to check the opening on a stair guard
Check this What to measure Why it is missed
Between balusters Horizontal clear distance between faces, at the widest point People measure center to center and stop there
At each end of the run Post face to the first baluster face An equal-gap layout is assumed to fix the ends; it does not if the span was mismeasured
The triangle at the open side The opening formed by the tread, the riser and the bottom rail Many editions address this separately with a different sphere size, so the 4 in number does not automatically cover it
Under the bottom rail The gap between the rail or shoe and the tread Shoe-mounted systems can leave a gap that no baluster spacing fixes

What the rule does not cover

A guard has to do more than keep a sphere out. The same section of the code and its neighbors also govern the height of the guard, the height and graspability of the handrail, how the posts are anchored, and how much load the infill has to resist. None of those are spacing questions, and a perfect baluster layout can still fail on any of them.

This is the honest limit of any spacing calculator, including this one: it solves the opening, and it tells you when your inputs cannot satisfy the opening you asked for. It does not certify the railing.

When the limit is not 4 inches

Four inches is the common US residential figure, not a universal constant. Commercial and industrial work can follow a different standard. Some jurisdictions amend the residential number. Manufacturers of panel, cable and glass infill publish their own maximums, usually tighter. Historic and specialty railings may be evaluated under another code path entirely.

The practical answer is boring and reliable: read the adopted edition, or ask the inspector who will sign the job off, then type that number into the maximum clear opening field. The planner will hold it, and it will refuse to round a gap up past it.

Checking a finished railing

  1. Test the horizontal opening between two balusters at the widest point of the profile, not at the narrowest.
  2. Test the first and last opening against the posts.
  3. Test any opening where a baluster meets a rail, a shoe or a tread, including a shoe gap.
  4. Test the triangular opening at the open side of the stair if your edition addresses it.
  5. Record the results with the date and the measurement, so a later question has an answer.

Related

Important. This calculator provides layout estimates based on the dimensions and assumptions entered. It does not replace applicable building codes, manufacturer installation instructions, or professional inspection. Verify all measurements and local requirements before installation.