# Deck Railing Baluster Spacing Calculator — 4-inch Sphere Rule

> Free deck railing calculator: find the even, code-compliant baluster spacing under the 4-inch sphere rule. Get baluster counts, gap sizes, a per-section set-out list and total rail length — metric or imperial, all in your browser.

Even, code-compliant baluster spacing under the 4-inch sphere rule — with counts, gaps and a mark-out list.

- **HTML page:** https://siteometry.com/en/tools/deck-railing-calculator
- **Category:** [Framing & Carpentry](https://siteometry.com/en/tools/category/framing-carpentry)
- **Figures live on the page:** tables, diagrams and worked figures the text refers to ("the table below") are drawn by the page and are not reproduced here. Each section below links to its anchor on the page.
- **Runs in the browser:** Siteometry calculators need no account and send no input anywhere — every number below is computed on the visitor's own device.

## How to space deck railing balusters

1. **Choose units** — Pick metric or imperial; every field and result follows your choice.
2. **Add your sections** — Add a railing run for each straight span and enter its length.
3. **Set baluster & gap rule** — Choose a baluster width and the gap rule your code requires.
4. **Pick how you measured** — Enter a clear opening, or a post-to-post length plus a post size to deduct.
5. **Read the take-off** — Get the count, even gap, pass/fail verdict and a centerline mark-out list.

_On the page: https://siteometry.com/en/tools/deck-railing-calculator#howto_

## Deck railing baluster spacing, solved

Getting balusters evenly spaced under the code limit is fiddly by hand: pick a count, work out the gap, check it against the rule, and adjust until it fits — for every section of a different length. This calculator does that solve for you. Enter a clear opening (or a post-to-post length and post size) and a baluster width, and it returns the smallest baluster count whose every gap sits below your chosen limit.

It works across as many railing sections as you have, rolls the counts up into a single buy-list with total rail length, and gives you a per-section mark-out list of baluster centerlines for setting out on site. Everything runs in your browser, and nothing you type leaves your device.

_On the page: https://siteometry.com/en/tools/deck-railing-calculator#deck-railing-intro_

## How this calculator works

In even mode the tool finds the minimum number of balusters so that all of the gaps — including the two end gaps against the posts — are strictly below the code limit, then splits the opening into that many equal gaps. In fixed on-center mode you set a target spacing instead, and the tool reports the resulting count, the actual gap, and whether it still passes the sphere rule.

_On the page: https://siteometry.com/en/tools/deck-railing-calculator#how-calculator-works_

## Railing anatomy

A guard railing spans between two posts. A top rail and bottom rail run post-to-post, and the vertical balusters fill the space between them. The measurement that matters for code is the clear gap — the open distance between two adjacent balusters, and between a baluster and a post.

_On the page: https://siteometry.com/en/tools/deck-railing-calculator#railing-anatomy_

## The 4-inch sphere rule

Residential guards are governed by a sphere rule: the openings must be small enough that a 4-inch (100 mm) diameter sphere cannot pass through. If a 4-inch ball fits between your balusters, the gap is too wide. That is why the safe target is a clear gap of just under 4 inches — the calculator keeps every gap strictly below the limit, never exactly on it.

_On the page: https://siteometry.com/en/tools/deck-railing-calculator#sphere-rule_

## Even vs uneven spacing

The common mistake is to space balusters at a round on-center figure and let whatever is left over become the end gap. That leftover gap at the post is often wider than all the others — and it counts against the rule just as much. Even spacing divides the whole opening into equal gaps so no single gap can slip over the limit.

_On the page: https://siteometry.com/en/tools/deck-railing-calculator#even-spacing_

## Code limits & exceptions

The most common limits are the 4-inch (100 mm) guard sphere for decks and landings, and a 4⅜-inch (111 mm) sphere for the balusters on the open side of a stair. This tool models level, vertical balusters against those limits.

The stair triangular-opening exception — the larger 6-inch sphere allowed in the triangle formed by the tread, riser and bottom rail — is not modelled here, because that opening is not a plain vertical-baluster gap. Treat any figure from this tool as a planning estimate and confirm the exact requirement with your local building authority.

_On the page: https://siteometry.com/en/tools/deck-railing-calculator#code-limits_

## Frequently asked questions

Common questions about baluster spacing, end gaps and the sphere rule.

### What is the 4-inch sphere rule?

Residential guards must not have openings large enough for a 4-inch (100 mm) diameter sphere to pass through. In practice that means the clear gap between balusters — and between a baluster and a post — must stay just under 4 inches. This calculator keeps every gap strictly below the limit.

### Do the end gaps against the posts count?

Yes. With N balusters there are N+1 gaps, including the two at the ends against the posts. Those end gaps must meet the sphere rule just like the interior ones, which is exactly why spacing at a round on-center figure and letting the remainder fall at the ends can fail. Even mode divides the opening into equal gaps so none can slip over the limit.

### How many balusters do I need?

The tool finds the smallest baluster count whose every gap is below your limit. As a rule of thumb it is roughly the opening length divided by the baluster width plus the maximum gap, but the exact count depends on staying strictly under the limit — the calculator solves it precisely for each section and totals them.

### How is the even gap calculated?

For a clear opening L with N balusters of width b, the equal gap is g = (L − N·b) / (N + 1), because N balusters create N + 1 gaps. The calculator increases N until g drops below the code limit, then reports that count and gap.

### Is stair railing spacing different?

Yes. On the open side of a stair, the balusters are allowed a slightly larger opening: a 4⅜-inch (111 mm) sphere must not pass, rather than the 4-inch sphere used for level guards. Choose the 4⅜-inch stair-guard rule for stair sections.

### What about the 6-inch triangular opening on stairs?

At the open side of a stair, the triangular area formed by the tread, riser and bottom rail is allowed a larger 6-inch sphere. That exception applies to that specific triangle, not to the plain vertical-baluster gaps this tool models, so it is out of scope here — check it separately against your local code.

### Can I work in metric or imperial?

Both. Switch units at any time and every length, gap and price converts. The gap-rule and post-size defaults also swap to the sensible choice for the system — the 4-inch guard for imperial, the 100 mm guard for metric.

### Is the calculator private?

Yes. Every calculation runs in your browser. Nothing you enter is uploaded or stored on a server, and the tool works offline once the page has loaded.

_On the page: https://siteometry.com/en/tools/deck-railing-calculator#faq_

## Related calculators

- [Deck Joist & Beam Span Calculator](https://siteometry.com/en/tools/deck-joist-beam-span-calculator)
- [Deck & Patio Cost Calculator](https://siteometry.com/en/tools/deck)
- [Stair Calculator](https://siteometry.com/en/tools/stair-calculator)
- [Fence Calculator — Posts, Rails, Pickets & Concrete](https://siteometry.com/en/tools/fence-calculator)
