How this baluster calculator works
Baluster spacing is a code problem, not a taste one: the clear gap has to stay under 4 in. So the tool finds the fewest balusters that keep every gap under the max, then spreads them evenly:
gap = (opening − balusters × width) ÷ (balusters + 1)
At the defaults — an 8 ft opening, 1.5 in balusters, 4 in max — that is 17 balusters with 3.92 in gaps at 5.42 in on center, about $51; the full chain is in the worked example. Round up and the gaps only tighten, which is exactly the safe direction.
Balusters, spacing, and the guard rule
A guardrail is a few terms, and one of them is the law:
- Baluster / spindle: the vertical infill between the rails — 1.25 to 2 in square in wood, slimmer in metal.
- Clear gap: the open space between adjacent balusters — the number code limits to under 4 in.
- On-center: gap plus baluster width — the mark-to-mark spacing you lay out.
- Opening: the clear run between posts, where the balusters divide evenly.
- The 4 in sphere rule: a 4 in ball must not pass any gap — the guard code (IRC R312) that sets the spacing.
Spacing evenly, and landing under 4 inches
The mistake is starting at one end at a fixed spacing and letting the last gap fall where it may. Even and legal is the goal:
- Divide, don’t march: find the count for a sub-4-inch gap, then split the opening into equal spaces.
- Baluster width matters: a wider baluster eats the opening faster, so fewer are needed — but the gap still has to stay under 4.
- Metal is slim: ½–¾ in balusters need more of them to keep the gaps closed.
- Stairs too: the same 4 in rule runs on the rake; measure each opening between newels.
- Round up: when in doubt, one more baluster tightens every gap and stays clearly legal.
One habit worth keeping: measure and lay out each opening on its own. Posts are rarely spaced perfectly, so a count that lands right for one bay can leave the next with a gap a hair over 4 in — and the inspector checks the worst one, not the average.
Balusters by railing length, and common sizes
Table 1 runs a 1.5 in baluster and 4 in max out to common openings; Table 2 is the width of the common baluster types.
| Opening | Balusters |
|---|---|
| 5 ft | 11 |
| 6 ft | 13 |
| 8 ft | 17 |
| 10 ft | 22 |
| 12 ft | 26 |
| Type | Width |
|---|---|
| Metal round | ½–¾″ |
| Wood square | 1.25–2″ |
| Turned wood | ≈ 1.75″ |
How to lay out balusters
- Measure the clear opening between posts or newels — each run separately.
- Enter the baluster face width — 1.5 in for a common wood square, less for metal.
- Leave the max gap at 4 in (or tighter for a margin under code).
- Read the count and the exact even gap, then mark from both ends toward the middle.
- Repeat per opening, including the stair rake, where the same 4 in rule applies.
Worked example: an 8 ft railing
The default, worked line by line — an 8 ft (96 in) opening, 1.5 in balusters, 4 in max gap, $3 each:
gaps = 17 + 1 = 18
gap = (96 − 17 × 1.5) ÷ 18 = 70.5 ÷ 18 = 3.92 in
on-center = 3.92 + 1.5 = 5.42 in · cost = 17 × $3 = $51
The 3.92 in gap sits just under the 4 in line, which is the whole point — 16 balusters would open the gaps past 4.1 in and fail. That is why the count always rounds up: one more baluster closes the gap, and there is no rounding the other way that stays legal.
What this baluster estimate doesn’t include
The count is the balusters; a finished guardrail needs the rest of the assembly:
- Posts and newels. The structural uprights the railing spans between.
- Top and bottom rails. The rails the balusters fasten to.
- Connectors. Baluster shoes, screws or hidden fasteners.
- Stair rake. Angle-cut balusters and their own even spacing on the stairs.
- Guard height. The 36 or 42 in guard height and post spacing, set by code and load.
Baluster FAQ
How do you calculate baluster spacing?
Fit the fewest balusters so no clear gap exceeds 4 in: with n balusters between two posts there are n+1 gaps, and the minimum n is (opening − 4) ÷ (baluster width + 4), rounded up. An 8 ft opening with 1.5 in balusters needs 17, landing on 3.92 in gaps at 5.42 in on center. The tool solves it so every gap is equal and under code.
How far apart should balusters be?
The clear gap between balusters must be less than 4 in — the code guard rule. That fixes the maximum spacing: with a 1.5 in baluster, on-center spacing tops out around 5.5 in. Space them evenly across the opening rather than to a fixed dimension, so the two end gaps match the rest.
How many balusters do I need for an 8 foot railing?
Seventeen for a standard 1.5 in square baluster — an 8 ft (96 in) opening at 17 balusters gives 18 gaps of about 3.92 in each, just under the 4 in limit. Wider 2 in balusters drop it to 16; a metal baluster under an inch would need a couple more to keep the gaps closed.
How many balusters for a 10 foot railing?
A 10 ft (120 in) opening with 1.5 in balusters takes 22, giving 23 gaps of about 3.78 in each. The count is not simply proportional — each added post opening restarts the two end gaps — so run the actual opening rather than scaling from a shorter one.
What is the 4 inch rule for railings?
The IRC guard rule: a 4 in sphere must not pass through any opening in a required guard, so the clear gap between balusters has to stay under 4 in. It keeps a small child from slipping through or getting stuck. This calculator sizes the count so the gap lands under 4 in every time.
How do I space balusters evenly?
Work out the count for a sub-4-inch gap, then divide the opening into that many equal spaces — do not just start at one end at a fixed spacing, or the last gap comes out odd. Measure between the posts, let the calculator set the count and the exact gap, and mark from both ends toward the middle.
What size are balusters?
Wood balusters are commonly 1.25 to 2 in square; a 1.5 in square is the default here. Turned wood spindles run about 1.75 in at the widest, and metal balusters are slim — ½ to ¾ in — which means more of them to keep the gaps closed. Enter the actual face width for an accurate count.
Sources and standards
The spacing is geometry pinned to one code rule:
- IRC R312 guard rule: a 4 in sphere must not pass through guard openings — the sub-4-inch gap.
- Even-division geometry: n balusters make n+1 gaps; gap = (opening − n × width) ÷ (n + 1).
- Guard height: 36 in for dwellings, 42 in for many decks and commercial — separate from spacing.
- The inspector governs: local amendments can tighten the rule — build to your jurisdiction.
Embed this baluster calculator on your site
Run the baluster calculator on your own site, free. Paste the snippet where you want it; the visible credit link is the only condition.