Carpentry Free · No signup

Baluster Spacing Calculator

Divide any railing opening into equal baluster gaps that pass the IRC 4-inch sphere rule, with cumulative tape-measure marks for the rail.

Formula-verified · IRC R312.1.3 · Runs entirely in your browser. Nothing is uploaded.

Railing inputs

IRC R312.1.3
in8' · 96"
8' · 96"
in
Gap layout
Even gaps makes the end gaps match every interior gap.
Maximum clear gap
Balusters needed
17pcs
equal gaps (ends match interior)
Clear gap
3-15/16"
3.917" · 99 mm
On-center
5-7/16"
5.417" · 138 mm
4" sphere rule
PASS
largest gap 3-15/16"
IRC R312.1.3 compliantLargest clear gap 3-15/16" — a 4" sphere cannot pass.
R312.1.3

Live blueprint

FRONT ELEVATION · BALUSTER LAYOUT96" INSIDE OPENING · 1-1/2" BALUSTERS · 4" MAX GAP123456789101112131415161717 BALUSTERS · 3-15/16" CLEAR GAP · 5-7/16" ON CENTERHORIZONTAL SCALE PROPORTIONAL · VERTICAL NOT TO SCALE
Front elevation · posts and rails shown navyMeasure from the left inside post face
  • Measure from one inside post face and mark every cumulative number. Never stack tape-measure errors by stepping off the last baluster.

Running tape-measure marks

Cumulative inches from the left inside post face. Mark the leading edge, then strike the centerline for drilling.

17 balusters · 3-15/16" clear gap · 5-7/16" on center
#Leading edgeCenterline
13-15/16"4-11/16"
29-5/16"10-1/16"
314-3/4"15-1/2"
420-3/16"20-15/16"
525-9/16"26-5/16"
631"31-3/4"
736-7/16"37-3/16"
841-13/16"42-9/16"
947-1/4"48"
1052-11/16"53-7/16"
1158-1/16"58-13/16"
1263-1/2"64-1/4"
1368-15/16"69-11/16"
1474-5/16"75-1/16"
1579-3/4"80-1/2"
1685-3/16"85-15/16"
1790-9/16"91-5/16"

End gap: 3-15/16" · Interior gap: 3-15/16" · 18 equal gaps in even mode.

Pre-calculated

Baluster count for common 4 ft – 10 ft railings

1-1/2" balusters · 4" max gap
Even-gap layout · 2×2 dressed balusters at 1-1/2 in · IRC R312.1.3 4-inch sphere limit
Inside opening Balusters Clear gap On center End gaps
4' (48") 8 4" 5-1/2" 4"
4' 6" (54") 10 3-9/16" 5-1/16" 3-9/16"
5' (60") 11 3-5/8" 5-1/8" 3-5/8"
5' 6" (66") 12 3-11/16" 5-3/16" 3-11/16"
6' (72") 13 3-3/4" 5-1/4" 3-3/4"
6' 6" (78") 14 3-13/16" 5-5/16" 3-13/16"
7' (84") 15 3-7/8" 5-3/8" 3-7/8"
7' 6" (90") 16 3-7/8" 5-3/8" 3-7/8"
8' (96") 17 3-15/16" 5-7/16" 3-15/16"
8' 6" (102") 18 3-15/16" 5-7/16" 3-15/16"
9' (108") 19 4" 5-1/2" 4"
9' 6" (114") 20 4" 5-1/2" 4"
10' (120") 22 3-13/16" 5-5/16" 3-13/16"

Every row passes the 4-inch sphere rule by construction. Sections wider than 10 ft are usually split by intermediate posts; enter each opening separately.

Show your math

Baluster spacing formulas

1. Even gaps — ends match the interior

balusters = ceil((opening − max gap) ÷ (max gap + baluster width))
clear gap  = (opening − balusters × baluster width) ÷ (balusters + 1)
on center  = clear gap + baluster width

The count is the smallest one that keeps every gap at or below the limit. There is always one more gap than there are balusters.

2. Custom fixed end margins

balusters    = ceil((opening − 2 × end margin + max gap) ÷ (max gap + baluster width))
interior gap = (opening − 2 × end margin − balusters × baluster width) ÷ (balusters − 1)

Fixed margins are checked against the sphere rule too. A 5-inch end margin fails even when the interior gaps pass.

3. Running tape marks

step            = clear gap + baluster width
leading edge i  = end gap + (i − 1) × step
centerline i    = leading edge i + baluster width ÷ 2

All marks are cumulative from the left inside post face. Stepping off each previous baluster compounds rounding and layout error across the rail.

Worked US example — 96 in opening, 1-1/2 in balusters

Balusters = ceil((96 − 4) ÷ (4 + 1.5)) = ceil(92 ÷ 5.5) = ceil(16.73) = 17.

Clear gap = (96 − 17 × 1.5) ÷ 18 = (96 − 25.5) ÷ 18 = 70.5 ÷ 18 = 3.9167 in (3-15/16").

On center = 3.9167 + 1.5 = 5.4167 in ( 5-7/16"). Largest clear gap 3-15/16" passes the 4-inch sphere test.

Layout: mark the first leading edge at 3-15/16", then every 5-7/16" to the last edge at 90-9/16". Eighteen gaps close the run exactly at 96 in.

US homeowner questions

Baluster spacing FAQs

How many balusters do I need for an 8-foot railing?

A 96-inch clear opening with 1-1/2 inch balusters and a 4-inch maximum gap needs 17 balusters. They produce 18 equal clear gaps of about 3-15/16 inches, with centers 5-7/16 inches apart. A 6-foot opening needs 11 balusters and a 4-foot opening needs 8.

Is 4 inches the maximum baluster gap?

Yes for most US residential guards. IRC R312.1.3 requires that a 4-inch sphere cannot pass through any opening, including the gaps at each post. Many inspectors prefer to see 3-7/8 inches or less on the tape because paint and fasteners can change the final gap. Metal balusters are often set at 3-1/2 inches to leave margin.

Should the end gaps match the interior gaps?

Equal gaps look best and are the default here. Start with the baluster count that keeps the widest gap legal, then divide the leftover space by the number of gaps plus one. If you prefer a fixed margin from each post, switch to custom ends; the calculator solves the interior gap and warns you if the end gap exceeds 4 inches.

How do I lay out balusters without stacking tape errors?

Measure every mark from the same inside post face, never from the previous baluster. The running tape table gives cumulative leading-edge and centerline positions in inches. Mark the leading edge first, then add half the baluster width for the centerline used to drill the rail.

Do I measure between posts or center to center?

Measure the clear inside opening between the post faces, not the post centers. The 4-inch sphere rule applies to the clear opening, and post dimensions vary between 3-1/2 inch 4x4 posts and 5-1/2 inch 6x6 posts. Enter the opening you can actually measure with a tape.

Powered by YardToRoof.com — free US carpentry calculators Open the full Baluster Spacing Calculator ↗