Spindle Spacing Calculator

Compute the number of balusters and even on-center spacing for a railing.

Home IRC compliant Even spacing
Rate this calculator · 4.0 (2)

Baluster Spacing

IRC 4-inch sphere rule · even on-center

Instructions — Spindle Spacing Calculator

1

Measure the railing length

Measure between the inner faces of the two end posts in inches or centimeters. The calculator distributes balusters evenly across this length. For a 10-foot deck section, that is 120 inches between posts.

2

Enter baluster width

Typical wood balusters are 1.5 inches square. Iron balusters are usually 0.5 to 0.75 inches. Round balusters use diameter at the widest point. The calculator subtracts the total baluster width from the railing length to find available gap space.

3

Read the count and spacing

Output shows the minimum baluster count that keeps every gap at or under 4 inches (IRC R312 residential rule). For stairs, switch the maximum gap to 4-3/8 inches per IRC exception. Confirm the spacing on-site with a 4-inch test ball.

Rule of thumb: 3 balusters per linear foot of railing satisfies the 4-inch rule for 1.5-inch wide balusters. The calculator gives the exact minimum.
Symmetry tip: Lay out balusters from the center outward. Any rounding error appears at both ends instead of one, giving a more symmetric appearance.

Formulas

Spindle spacing is constrained by the building code: every gap between balusters must be ≤ 4 inches. With N balusters of width SW across a railing of length RL, the equal gap S must satisfy S × (N+1) + SW × N = RL.

Spacing Between Balusters
$$ S = \frac{RL - (N \times SW)}{N + 1} $$
For N balusters of width SW across railing length RL. There are N+1 gaps (one at each end plus N-1 between). For 120-in railing with 30 balusters of 1.5 in width: (120 - 45) / 31 = 2.42 in.
Minimum Baluster Count
$$ N_{min} = \lceil \frac{RL - S_{max}}{SW + S_{max}} \rceil $$
Smallest N where S ≤ S_max. Derived from solving S = (RL - N×SW) / (N+1) ≤ S_max for N. The calculator uses this formula directly.
IRC Maximum Gap (Residential)
$$ S_{max} = 4\,\text{in} = 101.6\,\text{mm} $$
IRC R312.1.3 requires that a 4-inch sphere not pass through any opening in the guard. This rule applies to all residential decks, balconies, and landings.
IRC Maximum Gap (Stairs)
$$ S_{stairs} = 4\frac{3}{8}\,\text{in} = 111.1\,\text{mm} $$
IRC R312.1.3 exception 2 allows up to 4-3/8 inches between balusters on stair sides. The triangle below the lowest tread allows 6-inch sphere.
On-Center Spacing
$$ OC = S + SW $$
Distance between baluster centers. This is the layout dimension used when marking the top rail. For 2.42-in spacing and 1.5-in balusters: OC = 3.92 inches.
Verification Check
$$ RL = (N \times SW) + ((N+1) \times S) $$
Sum of all baluster widths plus all gaps equals total railing length. Use this to confirm layout calculations before cutting.

Reference

IRC R312 — Guard / Baluster Rules
LocationMax gapTest method
Decks, balconies, landings4 in (102 mm)4-in sphere
Stair guards (sides)4-3/8 in (111 mm)4-3/8 in sphere
Triangle below stair tread6 in (152 mm)6-in sphere
Commercial (IBC)4 in (102 mm)4-in sphere
Minimum guard height (resi)36 in (914 mm)Tape measure
Minimum guard height (comm)42 in (1067 mm)Tape measure

Common baluster widths and resulting counts

Minimum balusters to satisfy 4-inch rule, across typical railing lengths.

1.5-in wood square
RailingCount
6 ft (72 in)13 balusters
8 ft (96 in)17 balusters
10 ft (120 in)22 balusters
12 ft (144 in)26 balusters
16 ft (192 in)35 balusters
0.5-in iron round
RailingCount
6 ft (72 in)16 balusters
8 ft (96 in)22 balusters
10 ft (120 in)27 balusters
12 ft (144 in)33 balusters
16 ft (192 in)44 balusters

Inspectors carry a 4-inch test sphere. If the sphere passes between any two balusters, between a baluster and the bottom rail, or through the triangular gap below the lowest stair tread (where 6-inch sphere is allowed), the guard fails inspection.

Article — Spindle Spacing Calculator

Spindle spacing calculator: baluster count and IRC code compliance

Spindle spacing on a residential deck or balcony must keep every gap at or below 4 inches per IRC R312, measured by a 4-inch test sphere. For a 10-foot railing with 1.5-inch wood balusters, the minimum count is 22 balusters with 3.78-inch gaps. Stair sides allow up to 4-3/8 inches.

Spindle spacing seems like simple geometry until you realize that one missed calculation can fail a building inspection or, more importantly, trap a child's head. The 4-inch sphere rule encoded in the International Residential Code (IRC) and International Building Code (IBC) is not arbitrary — it reflects decades of injury data and matches the head dimension of a typical small child. This calculator solves for the minimum baluster count that satisfies the rule while keeping gaps even and visually clean.

What is spindle spacing?

Spindle spacing, also called baluster spacing, is the clear gap between two adjacent vertical members in a guard or railing. The members themselves are called spindles (a woodworking term) or balusters (an architectural term). Same component, different vocabulary. Both terms appear in code documents and building plans interchangeably.

The measurement is taken at the narrowest point between balusters. For square wood balusters that is the flat-to-flat width. For round iron balusters that is the surface-to-surface gap, which equals the on-center distance minus the diameter. The 4-inch sphere test enforces this narrowest-gap measurement directly: if the sphere cannot pass at any orientation, the spacing is compliant.

The IRC 4-inch spindle rule

IRC R312.1.3 states that guards must have intermediate rails or ornamental closures arranged so that a 4-inch diameter sphere cannot pass through any opening. The same rule appears in IBC 1015.4 for commercial construction. This is the central safety requirement for any railing protecting against falls.

The rule has two stated exceptions. First, the open side of stair guards allows a 4-3/8 inch sphere because diagonal layout makes strict 4-inch geometry awkward. Second, the triangle below the lowest tread of a stair allows a 6-inch sphere because that opening is typically inaccessible to a child climbing. Outside these exceptions, the 4-inch limit is firm.

Did you know

The 4-inch sphere standard originates from a 1976 National Bureau of Standards study on child head dimensions. The 95th percentile head diameter for children aged 2-5 is approximately 4.4 inches. The 4-inch rule provides a margin below this measurement and accounts for compression of soft tissue when a child's head is forced through a gap.

How to calculate baluster spacing

The baluster spacing formula is S = (RL - N × SW) / (N + 1), where RL is the railing length between posts, N is the number of balusters, and SW is each baluster width. The formula gives equal gaps when balusters are distributed evenly across the railing.

The minimum baluster count comes from setting S = 4 inches (the code maximum) and solving for N: N_min = ceil((RL - 4) / (SW + 4)). Round up to the next whole baluster. The resulting spacing will always be less than 4 inches because the formula rounds count upward, not spacing.

A worked example: 120-inch railing with 1.5-inch wood balusters. N_min = ceil((120 - 4) / (1.5 + 4)) = ceil(116 / 5.5) = ceil(21.1) = 22 balusters. Actual spacing: (120 - 33) / 23 = 3.78 inches. Code compliant with margin.

! Always round baluster count UP

Rounding the count down lets gaps exceed 4 inches and fails inspection. The calculator always rounds up. Even when the math gives N = 21.001, the answer is 22 balusters. Wasting one baluster of material is far cheaper than rebuilding a non-compliant railing.

Baluster spacing by material

Baluster material affects the count because each material has a typical width. Wood square balusters are usually 1.5 inches. Wood turned (decorative) balusters can range from 1.5 to 2.5 inches at the widest point. Iron pickets are typically 0.5 or 0.625 inches square or round. Composite balusters often match wood at 1.5 inches.

The thinner the baluster, the more balusters you need. For a 10-foot railing: 1.5-inch wood needs 22 balusters; 0.625-inch iron needs 26 balusters; 0.5-inch iron needs 27 balusters. The total spindle width matters because it shrinks the available gap space across the railing.

The stair spindle exception

Stair railings get a 4-3/8 inch maximum gap because the diagonal layout creates geometric problems. If balusters are mounted perpendicular to the stair stringer, the spacing measured between adjacent balusters at the angle of the stair would exceed the 4-inch horizontal spacing without the exception. The 4-3/8 inch allowance preserves a consistent visual rhythm.

The triangular gap formed at the bottom step between the lowest tread, the lowest riser, and the bottom rail is allowed to pass a 6-inch sphere. This unusual exception exists because the triangle is hard to climb and not a typical entrapment risk. Designers can also choose to close this triangle entirely for aesthetic or safety reasons.

Tip

Layout balusters from the center of the railing outward rather than from one end. Center-out layout splits any rounding error symmetrically, putting half at each end. End-to-end layout puts all the error at one end where it looks unbalanced. Mark the center, snap a chalk line, and step outward with your on-center dimension.

Common spindle spacing mistakes

The most common error is measuring on-center spacing instead of gap spacing. The IRC measures the clear gap between baluster surfaces, not center-to-center distance. For 1.5-inch wide balusters, 4-inch on-center equals only 2.5-inch gap — compliant. But 5-inch on-center gives 3.5-inch gap — still compliant. And 6-inch on-center gives 4.5-inch gap — failed. Always confirm gap, not on-center.

A second mistake is forgetting the end gaps. Many DIY layouts place balusters on the post centers and assume the gap rule applies only between balusters. But the gap between the first baluster and the post must also satisfy 4 inches. The formula here accounts for N+1 gaps (two ends plus N-1 internal).

Spindle spacing shorthand
S_max 4 in (102 mm) residential
S_max stairs 4-3/8 in (111 mm)
S_max triangle 6 in (152 mm)
Guard height resi 36 in (914 mm) min
Guard height comm 42 in (1067 mm) min
Test method 4-in sphere passes through

International baluster codes

The 4-inch sphere rule is essentially universal in jurisdictions following the International Code Council framework. The UK Building Regulations Part K specifies a 100 mm sphere — almost identical at 3.94 inches. Australia's NCC Volume 2 uses 125 mm in some applications but defaults to 100 mm for residential. The EU broadly follows 100 mm via national codes, though Germany and Scandinavia use 110 mm in some configurations.

The practical effect is that a deck built to IRC 4-inch standards passes inspection almost everywhere. Going stricter (closer baluster spacing) never violates code. Going looser (wider spacing) almost always does. When designing for international use, default to the IRC 4-inch limit and confirm any local exceptions before construction.

  • 4 inches maximum gap between balusters on decks, balconies, and landings (IRC R312)
  • 4-3/8 inches maximum on the open side of stair guards (IRC R312 exception)
  • 6 inches maximum in the triangle below the lowest stair tread
  • 36 inches minimum guard height residential, 42 inches commercial
  • 1.5 inches typical wood square baluster width
  • 0.5 inches typical iron picket width
  • 22 balusters minimum for 10-foot railing with 1.5-inch wood balusters
  • 1976 NBS study that set the 4-inch sphere standard

FAQ

4 inches (102 mm) for residential decks, balconies, and landings under IRC R312.1.3. The rule is that a 4-inch sphere must not pass through any opening in the guard system. For stairs, the maximum gap increases to 4-3/8 inches (111 mm).
Use the formula S = (RL - N × SW) / (N + 1), where RL is the railing length, N is the baluster count, and SW is the baluster width. There are N+1 equal gaps (one at each end plus N-1 between balusters). Pick the smallest N where S ≤ 4 inches.
For 1.5-inch wide balusters: 22 balusters minimum to satisfy the 4-inch rule. Calculation: (120 - 4) / (1.5 + 4) = 21.1, round up to 22. The resulting gap is (120 - 33) / 23 = 3.78 inches, comfortably under code.
The 4-inch sphere matches the head size of a small child. The rule prevents head entrapment and accidental falls through gaps. The limit was set by the National Bureau of Standards in the 1970s after a series of childhood guard-related injuries.
Yes. IRC R312.1.3 Exception 2 allows up to 4-3/8 inches between balusters on the open side of stairs, because diagonal railings make true 4-inch gaps geometrically awkward. The triangular gap below the lowest tread permits a 6-inch sphere.
Calculate spacing along the arc length of each curved section, not the straight-line chord. The IRC rule applies to the actual surface a sphere would test against — the arc. Divide the curved section into chord pieces of 6 inches or less and run the calculator on each.
No. The 4-inch sphere rule applies to any opening regardless of material. Cable rails, mesh inserts, and decorative panels all must pass the same test. Some manufacturers stamp products as "4-inch sphere compliant" on the packaging.
Mark the center of the railing, then work outward using the on-center spacing (S + SW). For 22 balusters in 120 inches with 1.5-inch width: on-center is 3.78 + 1.5 = 5.28 inches. Mark from center: ±2.64, ±7.92, ±13.20 and so on.