Baluster spacing is one of the few things an inspector will check with an actual tool, and it's the most common reason a deck railing fails. The rule is simple; getting even gaps that also satisfy it is where the arithmetic bites.
The 4-inch sphere rule
No gap anywhere in the railing may allow a 4-inch sphere to pass through. Not the gaps between balusters, not the gap at either end, not the space under the bottom rail.
The reason is grim and worth stating: 4 inches is roughly the size of an infant's head. The rule exists because a child can slip through a gap body-first and become trapped by the head. That's why inspectors check it with a real sphere and why there's no negotiating it.
Why even spacing is harder than it looks
Here's the trap. People divide the rail length by the gap and call it done โ but a railing section has one more gap than it has balusters. Ten balusters between two posts means eleven gaps.
Get that off by one and your spacing drifts, leaving an obviously wrong gap at one end. It's the single most common baluster mistake, and it's visible from across the yard once built.
Then recalculate the actual gap: gap = (rail length โ total baluster width) รท (balusters + 1). That second step is what makes the spacing come out even.
Rounding always changes your gap slightly, so the real gap is never exactly the number you started with. Our baluster calculator does both steps and gives you the true even spacing, and the spindle spacing calculator handles the same problem for stair and porch spindles.
Railing height
| Situation | Typical required height |
|---|---|
| Residential deck over 30 in high | 36 in |
| Commercial deck | 42 in |
| Stair railing (graspable) | 34โ38 in from nosing |
| Deck under 30 in high | Usually no railing required |
The 30-inch threshold is where most codes start requiring a railing at all โ but "usually" is doing work in that table. Codes vary by jurisdiction and get updated, so confirm with your local building department rather than trusting any table on the internet, including this one.
The gaps people forget
Under the bottom rail. Same 4-inch rule. A wide gap at the bottom fails just as surely as one between balusters, and it's easy to leave when you're focused on the verticals.
At the posts. The gap between the last baluster and the post counts too. This is exactly what the "one more gap than balusters" maths is protecting you from.
Stair triangles. On stairs, codes typically allow a 6-inch sphere for the triangular opening formed by the tread, riser and bottom rail โ but the 4-inch rule still applies to the balusters themselves. Two different limits on the same run of railing.
Horizontal railings and the "ladder effect"
Horizontal cable and slat railings look fantastic and many jurisdictions restrict them, especially in residential settings. The concern is that horizontal members form a climbable ladder for children.
Some areas ban them outright in homes, some allow them with conditions, some don't care. Cable railing also has a tension issue โ cables stretch, and a cable that passed at 3.5 inches can sag past 4 within a year unless it's tensioned properly and re-tensioned. Ask your inspector before you buy the system, not after.
Before you build
Call your building department and ask three questions: required railing height, whether horizontal railings are permitted, and which code year they're enforcing. Five minutes on the phone beats rebuilding a railing.
Then run your numbers through the baluster calculator before you buy โ knowing you need 43 balusters rather than "about 40" is the difference between one trip to the yard and two. Our decking calculator covers the rest of the deck.
Try the free calculator
Skip the manual math โ get instant numbers for your own project:
Frequently Asked Questions
How far apart should deck balusters be?
Close enough that a 4-inch sphere cannot pass between them. Most builders target 3.5 to 3.75 inches to leave margin for lumber movement.
What is the 4-inch sphere rule?
No gap in a deck railing may let a 4-inch sphere pass through, because that's roughly the size of an infant's head and a child could become trapped.
How tall does a deck railing need to be?
Typically 36 inches for residential decks over 30 inches high, and 42 inches for commercial. Confirm with your local building department, as codes vary.
How do I calculate baluster spacing evenly?
Remember a railing has one more gap than balusters. Work out the baluster count, then divide the leftover space by (balusters + 1) to get the true even gap.