NEWWalkthrough is live in Pro→App StoreGoogle Play

· FieldDojo Team · construction · 8 min read

Baluster Spacing: The 4-Inch Sphere Rule and the Math Behind It

How many balusters fit between two posts, and what gap passes inspection. The formula, IRC R312.1.3, and worked examples for 6 ft and 8 ft deck sections.

FieldDojo app — construction calculators

Baluster spacing is two questions in one. The code question is how wide a gap can be. The layout question is how many balusters make every gap in the section equal and under that limit. Get the count one short and each gap in the run fails together; guess high and you buy and fasten balusters the job did not need. This guide gives the formula, the code limit it has to meet, and four sections worked through.

Verify before you build. Section numbers and limits change between code editions, and jurisdictions adopt them with local amendments. Treat this guide — and the app — as a calculation aid, not as the code book: confirm every number against the edition your authority having jurisdiction enforces. How FieldDojo validates its calculations.

Written against the 2021 International Residential Code, published by the International Code Council.

What Is the Maximum Gap Between Balusters?

IRC R312.1.3 says a required guard must not have an opening that lets a 4-inch-diameter sphere pass through. The sphere is roughly the size of a small child’s head, and the inspector may carry one.

Read the wording closely: a 4 in sphere must not pass. A gap of exactly 4 in lets it through, so 4 in fails. The gap has to be less than 4 in, which is why layouts aim for 3¾ to 3⅞ in and leave room for a baluster that bows or a tape read a sixteenth off.

LocationLargest sphere that must not passSection
Guard on a deck, balcony, porch or landing4 inIRC R312.1.3
Guard on the open side of a stair4⅜ inIRC R312.1.3, Exc. 2
Triangle formed by the riser, tread and bottom rail6 inIRC R312.1.3, Exc. 1

Source: 2021 IRC R312.1.3 and its exceptions. One- and two-family dwellings; commercial work falls under IBC 1015.4.

A guard is required where the walking surface is more than 30 in above the floor or grade below (R312.1.1), and it has to be at least 36 in high (R312.1.2). Canada’s NBC and the UK’s Approved Document K both work to a 100 mm sphere, a little under 4 in (101.6 mm). Check the rule adopted where you build before you set the maximum.

The Baluster Spacing Formula

Measure the clear opening between the posts, face to face, and the width of one baluster. With n balusters in the opening there are n + 1 gaps, one more than the balusters, because a gap sits against each post.

Gap = (opening − n × baluster width) ÷ (n + 1)

The count you want is the smallest n that brings the gap under the maximum:

n > (opening − max gap) ÷ (baluster width + max gap)

Take the result and go to the next whole number above it. Then:

On-center spacing = gap + baluster width

On-center is the number you set a story stick or a spacer block to. The first baluster sits one gap from the post, so its centre is at gap + half a baluster width.

Worked Example: A 36-Inch Opening

Opening 36 in, 2×2 balusters (1½ in actual), 4 in maximum.

  • (36 − 4) ÷ (1.5 + 4) = 5.82, so n = 6 balusters
  • Gap = (36 − 6 × 1.5) ÷ 7 = 27 ÷ 7 = 3.857 in (3⅞ in)
  • On-center = 3.857 + 1.5 = 5.357 in (5⅜ in)

Check the count below it. Five balusters leave (36 − 7.5) ÷ 6 = 4.75 in, which fails.

Common Sections, Worked

All with a 4 in maximum:

Clear openingBalusterCountGapOn-center
36 in1½ in square63.857 in5.357 in
68½ in (6 ft on-center, 4×4 posts)1½ in square123.885 in5.385 in
72 in (6 ft clear)1½ in square133.750 in5.250 in
72 in (6 ft clear)¾ in round metal153.797 in4.547 in
92½ in (8 ft on-center, 4×4 posts)1½ in square173.722 in5.222 in

Two things in the table are worth a second look.

Post spacing is on-center; the opening is clear. Posts set 6 ft on-center with 3½ in posts leave 72 − 3.5 = 68½ in between them. Use 72 in the formula and you get 13 balusters where 12 are needed.

Thin balusters need more of them. In the same 72 in opening, ¾ in metal balusters take 15 where 1½ in wood takes 13. The gap limit does not change, and a thinner baluster fills less of the opening.

Where the “Three Per Foot” Rule Goes Wrong

A common shortcut is three balusters per foot of rail. At 1½ in wide that puts them 4 in on-center with 2½ in gaps: it passes, and it uses more material than the section needs. A 72 in opening gets 18 balusters by the shortcut and 13 by the formula. Over a 40 ft deck perimeter that is about 30 extra balusters and 60 extra fasteners.

The shortcut also says nothing about the two end gaps. Lay out from one post at a fixed on-center and the last gap is whatever is left over, which is where a 4½ in opening next to a post comes from. The formula divides the leftover evenly, so every gap in the section is the same.

Stair Guards

On the open side of a stair the limit is a 4⅜ in sphere, and the measurement that matters is the gap square to the balusters, which is the horizontal distance between them when they are plumb. Lay out along the level, on the tread nosing line projected to horizontal, or measure along the rake and convert: horizontal spacing = rake spacing × cos(stair angle).

A 72 in horizontal run with 1½ in balusters needs 12 on the stair (gap 4.154 in, under 4⅜) where a level guard of the same length needs 13. Many builders hold the 4 in rule on stairs anyway, so one spacer block does the whole job and the rail passes under any reading of the exception. The stair rise and run guide covers the riser and tread limits for the flight itself.

Laying It Out on the Rail

  1. Measure the clear opening at the top rail and at the bottom rail. If they differ, the posts are out of plumb; fix that first or lay out to the wider one.
  2. Run the count and the gap.
  3. Cut a spacer block to the gap. A block is faster than a tape and it cannot drift.
  4. Start at one post with the block, set a baluster, block, baluster, and so on. Check the last gap before you fasten the last three balusters; a sixteenth of error per gap adds up to nearly an inch across 14 gaps.
  5. Or work from the centre: with an odd count a baluster sits on the centre line of the opening, with an even count a gap does.

Frequently Asked Questions

What is the maximum gap between balusters?

Under IRC R312.1.3 the opening must not let a 4-inch sphere pass, so the gap has to be less than 4 inches. A gap of exactly 4 inches fails. Stair guards on the open side of a flight are allowed up to a 4⅜-inch sphere.

How many balusters do I need for a 6 foot section?

For a 72-inch clear opening with 1½-inch balusters and a 4-inch maximum, 13 balusters, with 3¾-inch gaps. If the 6 feet is measured post centre to post centre with 4×4 posts, the clear opening is 68½ inches and the count is 12, with gaps of 3⅞ inches.

How many balusters do I need for an 8 foot section?

Posts 8 feet on-center with 4×4 posts leave 92½ inches clear. With 1½-inch balusters that is 17 balusters at gaps of 3.72 inches, about 3¾ inches.

How do you calculate baluster spacing?

Subtract the total width of the balusters from the clear opening and divide by the number of gaps, which is one more than the number of balusters: gap = (opening − n × width) ÷ (n + 1). Raise n until the gap is under the code maximum.

Is baluster spacing measured on-center or between balusters?

The code limit is the clear gap between balusters. On-center spacing is the gap plus one baluster width, and it is the number used for layout. A 3¾-inch gap with 1½-inch balusters is 5¼ inches on-center.

Do horizontal cable or rod infills follow the same rule?

Yes, the 4-inch sphere rule applies to any opening in a required guard, whatever the infill. Cable deflects under load, so cable systems are usually spaced about 3 inches apart to keep a 4-inch sphere from being pushed through; follow the manufacturer’s listed spacing.

How FieldDojo Handles This

The Baluster Spacing calculator in FieldDojo takes the opening, the baluster width and the maximum gap, and returns the count, the gap and the on-center spacing in feet and inches to the sixteenth. It shows its work: the gap with one baluster fewer, and why that count fails. The maximum starts at 4 in for US users, with IRC R312.1.3 on the result, and at 100 mm in metric. It never accepts a gap equal to the maximum.

For rails, pickets or anything else that needs even gaps with no code limit, Equal Spacing takes a length and a count and lists the position of every piece. Saved to a project, a deck or fence calculation can add its materials to the project’s list in one tap.

Get FieldDojo on the App Store → or on Google Play → — free on both.


Related trade guides:

All 65 calculators are free, work offline, and cite the code section on every result. FieldDojo Pro adds unlimited history, unlimited projects, cloud sync and the Pro report style and editor.

Back to Blog

Related Posts

View All Posts »