Skip to content

Baluster Spacing Calculator

Enter your railing length and spindle width to get the number of balusters, the exact even gap and center‑to‑center spacing — checked against your code’s 4‑inch sphere rule.

Checks IRC, IBC, OSHA & ADA Live 3D model & cut list Imperial & metric

The clear run between the newel posts.

The thickness of one spindle along the run. Square spindles are often 1¼″ (32 mm).

IRC 2021 rejects a 4 3/8" sphere through any opening.

Balusters needed

21

22 equal gaps

Gap between

4 3/16"

106 mm

Center-to-center

5 7/16"

138 mm

Max sphere

4 3/8"

IRC 2021

Guard infill · IRC R312.1
Rejects the 4 3/8" sphere pass

With 21 balusters the gap is 4 3/16" — no 4 3/8" sphere can pass through.

Mark the run every 5 7/16" center-to-center, starting one gap (4 3/16") in from each post. Every gap is identical, so the layout looks even and meets code.

The 4‑inch sphere rule, explained

Guard rails keep people — and small children — from slipping through. So the building codes do not specify a number of balusters; they specify a maximum opening: the infill must be close enough that a 4″ sphere cannot pass through any gap (IRC R312.1.3). Get the spacing right and the railing is both safe and compliant; get it wrong and an inspector will fail it.

  • IRC (US residential) rejects a 4″ sphere at guards, and allows up to 4⅜″ in the triangular opening formed at the stair treads.
  • IBC (US commercial) uses the same 4″ sphere for the lower portion of a guard.
  • Many international codes set the limit at ≈4″; pick your code above and Stairs Calc applies that exact figure.

Because the rule is about the gap, the wider your balusters, the more of them you need to keep the gaps under the limit. Stairs Calc solves it the same way a finish carpenter lays it out: the smallest whole number of balusters whose equal gaps all reject the sphere.

How to space balusters evenly

The trick is to space from the clear run between the newel posts, not the overall rail, and to put an equal gap at each post so nothing sits hard against a newel. For a railing run, one baluster width, and a maximum gap, the count is:

  1. Measure the clear railing length between the two posts and the width of one baluster along the run (square spindles are commonly 1¼″).
  2. Take the maximum gap from your code — the sphere limit — and compute balusters = ⌈(railing − maxGap) ÷ (width + maxGap)⌉, rounding up so every gap stays under the limit.
  3. Split the leftover space into equal gaps: with N balusters there are N + 1 gaps, so each gap is (railing − N × width) ÷ (N + 1).
  4. Mark the run every center‑to‑center spacing (one gap plus one width), starting one gap in from each post.

Enter your railing length and baluster width above and Stairs Calc returns the number of balusters, the exact even gap, the center‑to‑center spacing, and a live check that the gap rejects your code’s sphere.

[ 01 / 01 ] FAQ

Frequently asked questions

How far apart should balusters be spaced?

Balusters must be close enough that a 4″ sphere cannot pass between them — the "4‑inch rule." With common 1¼″ spindles that lands around a 4″ clear gap, so the practical spacing is roughly 5¼″ center‑to‑center. Stairs Calc computes the exact even gap and spacing for your railing length.

What is the 4‑inch sphere rule for balusters?

Guard infill must not allow a 4″ sphere to pass through any opening (IRC R312.1.3). Some codes are stricter — IBC uses 4″ and the IRC actually allows up to 4⅜″ in the triangular opening at the stair treads. Stairs Calc applies the limit for the building code you select.

How do I calculate the number of balusters I need?

Divide the railing run by the maximum allowed gap plus one baluster width, then round up: balusters = ⌈(railing − maxGap) ÷ (width + maxGap)⌉. That guarantees every gap stays under the sphere limit. Stairs Calc does this and gives you the exact even gap so the spacing looks uniform.

Should there be a baluster at the bottom and top post?

You measure the clear run between the newel posts, so the layout puts an equal gap at each post and even gaps between the balusters in between — never a baluster hard against a post. Stairs Calc lays out one gap in from each post, then repeats the center‑to‑center spacing.

Balusters, glass, or cable — which railing infill should I choose?

All three fill the same guard between a top and bottom rail; the difference is look, cost, and how they meet the 4″ sphere rule. Vertical balusters are the classic, lowest‑cost option and pass by spacing. Glass panels give an unobstructed view and pass automatically because there are no gaps, but cost more and show fingerprints. Horizontal cables look minimal and modern, but must be tensioned tightly (about 3″ apart) and some codes restrict horizontal infill where children could climb it like a ladder. Stairs Calc renders and exports any of them so you can compare.

Related stair calculators

Written by the Stairs Calc editorial team. Methodology and code references: see our methodology.

Built and maintained by builders, drafters and engineers who plan stairs for a living — every code limit is transcribed from the published standard and cited to its exact section.

Last reviewed 2026-06-20 against IRC 2021/2024

Stairs Calc gives accurate geometry and checks it against published building-code limits, but results are estimates for planning. Codes are adopted and amended locally and change over time. Always confirm dimensions against your local adopted code and a licensed professional before you build.