Baluster Spacing Calculator

How many balusters a railing section needs, the equal gap between them, and where to mark each one, with every gap kept under the code sphere.

Rail section

Units
Where is the railing?
How did you measure the span?
1 1/2 in for a 2x2, 3/4 in for many metal balusters.
More options
Optional: overrides the code sphere, e.g. a tighter design target.

13 balusters, 3 3/4 in gaps, 5 1/4 in on centre across 6 ft 0 in. Results and details

Worked example: edit any value

Baluster spacing

Balusters 13
Gap between 3 3/4 in
On centre 5 1/4 in
First centre 4 1/2 in from the left post

Clear span 6 ft 0 in

Gaps are kept below the 4 in sphere (IRC 2024 R321.1.3). Measure the finished gaps after installing; bowed balusters and loose rails change them.

Baluster spacing13 balusters with equal gaps of 3 3/4 in between posts 6 ft 0 in apart.gap 3 3/4 in4 in sphereclear span 6 ft 0 in
To scale. The circle is the code sphere: it must not fit through any gap.

Marks from the left post

BalusterCentre from left postLeft edge
14 1/2 in3 3/4 in
29 3/4 in9 in
315 in14 1/4 in
420 1/4 in19 1/2 in
525 1/2 in24 3/4 in
630 3/4 in30 in
736 in35 1/4 in
841 1/4 in40 1/2 in
946 1/2 in45 3/4 in
1051 3/4 in51 in
1157 in56 1/4 in
1262 1/4 in61 1/2 in
1367 1/2 in66 3/4 in
How this result was calculated
  1. Fewest balusters that keep every gap below the limitn = ⌊(S − D) ÷ (b + D)⌋ + 1 = ⌊(72 − 4) ÷ (1.5 + 4)⌋ + 1 = 13A gap exactly equal to the sphere would let it through, so the gap must be strictly smaller.
  2. Equal gapsgap = (S − n·b) ÷ (n + 1) = (72 − 13 × 1.5) ÷ 14 = 3.75 in
  3. Marking outfirst centre = gap + b/2 = 4.5 in; then every 5.25 inMark every centre from the same post face (table above) so rounding does not add up.
All values (table)
All values (table)
ItemValueNote
Clear span (horizontal)6 ft 0 inPost face to post face
Balusters13
Gap3 3/4 inlimit 4 in
On-centre spacing5 1/4 ingap + baluster width
Baluster width1 1/2 in

The sphere rule

Codes do not give a baluster spacing; they give a test. Under the IRC, required guards must not let a 4 in sphere pass through any opening, with two exceptions: 4 3/8 in on the open side of a stair, and 6 in for the triangle formed by a riser, tread and bottom rail (2024 R321.1.3; R312.1.3 in 2021). A gap exactly the size of the sphere fails, so the calculator keeps every gap strictly smaller.

Equal gaps look right and are easy to mark. With n balusters there are n + 1 gaps, and the calculator picks the smallest n that brings the gap under the limit.

Worked example

A 72 in section between posts with 1 1/2 in balusters on a deck:

  • n = ⌊(72 − 4) ÷ (1.5 + 4)⌋ + 1 = ⌊12.36⌋ + 1 = 13 balusters.
  • Gap = (72 − 13 × 1.5) ÷ 14 = 3.75 in; on centre 5.25 in; first centre 4.5 in from the post.
  • On the open side of a stair, a 66 in horizontal span needs 11 balusters with 4.125 in gaps under the 4 3/8 in rule.

These are automated test fixtures, with a property test that one fewer baluster would always break the limit.

On a stair rail

Vertical balusters on a sloping rail are spaced horizontally, so measure the horizontal distance between posts, or enter the length along the rail and the stair angle (from the stair angle calculator) and the tool converts it. Many builders put two balusters on each tread; check that the gaps still pass with your tread depth.

Questions people ask

These are questions Google showed under "People also ask" for related searches (checked 2026-10-24), answered here with the same tested formulas the calculators use.

How far should balusters be apart?

Close enough that a 4 in sphere cannot pass between them, which in practice means gaps a little under 4 in. On the open side of a stair the IRC allows a 4 3/8 in sphere (2024 R321.1.3). With 1 1/2 in balusters, gaps under 4 in work out to just under 5 1/2 in on centre; the calculator finds the exact equal spacing for your span.

What is the 4 ball rule for railing?

It is shorthand for the code test: a 4 in diameter ball (sphere) must not pass through any opening in a required guard, from the walking surface up to the guard height (IRC 2024 R321.1.3). It exists so small children cannot slip through. Two exceptions: 4 3/8 in on the open side of stairs, and 6 in for the triangle formed by a riser, tread and bottom rail.

How many balusters do I need for a 12x12 deck?

It depends on how many sides have railing and where the posts are. One example: a 12 ft side with 3 1/2 in posts only at the corners leaves 137 in clear, which needs 25 balusters of 1 1/2 in for gaps under 4 in (3.83 in each). Three such sides would be 75. Most decks add mid-span posts, which changes the count, so enter each section separately.