200+ free tools. No sign-up. No hidden fees.Explore the toolkit ↗
Find a tool ↗

Home›Baluster Spacing Calculator

Baluster Spacing Calculator

Work out even baluster spacing for a railing — how many balusters, how wide the gaps, and the exact layout — so the gaps pass the 4-inch sphere code rule. The trick is that the count and the gap solve each other.

Calculate your baluster spacing

Measure the opening between the two posts, not the whole railing length. The gap must be under 4 in so a 4-inch sphere cannot pass through (IRC R312) — a rule written for child safety.

Your results

–
balusters needed
–
gap between balusters (in)
–
on-center spacing (in)
–
code check

How the baluster spacing formula works

The count and the gap solve each other: pick the smallest count that keeps every gap under the limit, then spread the leftover evenly.

Baluster count: n = ceil((opening − max gap) ÷ (baluster width + max gap))

Even gap: gap = (opening − n × width) ÷ (n + 1) — there are n + 1 gaps: one at each post plus one between each pair

On-center: gap + width — the distance from the centre of one baluster to the next

Code rule (IRC R312): gap < 4 in — a 4-inch sphere must not pass through any opening

This is the CalcWright / TrowlCalc / NRTechStudio method, and all three agree on the published example: a 96 in opening with 1½ in balusters and a 4 in maximum gap needs 17 balusters — (96 − 4) ÷ (1.5 + 4) = 16.73, rounded up — with an even gap of (96 − 17 × 1.5) ÷ 18 = 3.92 in and an on-center spacing of 5.42 in. The same sources’ table: 10 ft → 22 balusters (3.78 in gap), 12 ft → 26 balusters (3.89 in gap).

Worked example

An 8 ft (96 in) opening between two posts, 1½ in balusters, 4 in maximum gap, $3 per baluster:

Balusters: (96 − 4) ÷ (1.5 + 4) = 16.73 → 17 balusters

Gap: (96 − 17 × 1.5) ÷ 18 = 70.5 ÷ 18 = 3.92 in

On-center: 3.92 + 1.5 = 5.42 in

Code check: 3.92 < 4 in — PASS

Cost: 17 × $3 = $51

A 10 ft (120 in) opening needs 22 balusters with a 3.78 in gap ($66); a 12 ft (144 in) opening needs 26 balusters with a 3.89 in gap ($78). With 2 in wide balusters the same 96 in opening needs 16 balusters and the gap opens to 3.76 in — wider balusters mean fewer pieces but a tighter look.

How much do balusters cost? (US, 2026)

Prices are 2026 US ranges from Home Depot / Lowe’s listings. Metal and composite balusters cost more than wood but never need painting. Check local prices before ordering.

ItemTypical price
Wood baluster (1½ in, 32 in)$2–$4 each
Metal baluster (round or square)$3–$8 each
Composite baluster$5–$10 each
Baluster shoes / connectors$1–$3 each
Top and bottom rail (per lin ft)$2–$5

Waste allowance

There is no waste allowance on this tool — balusters are counted exactly, and the even gap is computed from that exact count. Buy one spare baluster per railing section: if one is cut wrong or a screw splits it, a spare saves a trip to the store. If your posts are not perfectly plumb, the end gaps will differ by a fraction of an inch — measure the opening at the rail, not at the deck.

Frequently asked questions

How far apart should balusters be?

Balusters must be spaced so the gap between them is under 4 inches — the IRC 4-inch sphere rule. For a typical 8 ft opening with 1.5 in balusters that means 17 balusters with a 3.92 in gap, or 5.42 in on center. Measure the opening between posts, not the whole railing length.

What is the 4 inch rule for balusters?

The IRC (R312) says no opening in a guard railing may allow a 4-inch sphere to pass through. In practice that means every gap between balusters — including the gaps next to the posts — must be under 4 inches. It is a child-safety rule, and inspectors test it with a 4-inch ball.

How many balusters do I need for 10 feet?

A 10 ft (120 in) opening with 1.5 in balusters and a 4 in maximum gap needs 22 balusters, with a 3.78 in even gap and a 5.28 in on-center spacing. A 12 ft opening needs 26 balusters.

How do you calculate baluster spacing on stairs?

The same formula works on stairs if you measure the opening along the slope between the newel posts. The gap is measured horizontally on the level rail and along the rake on a stair — use the stair railing length, not the horizontal run, and the 4-inch sphere rule still applies.

Should baluster spacing be even or on-center?

Even gap is what you see and what the code checks — every gap identical, including the ones next to the posts. On-center spacing is just the working number for your tape measure: mark the center of each baluster every 5.42 in and the gaps come out even automatically.

Related calculators