Baluster Calculator
Find how many balusters (spindles) your railing needs with even, code-compliant spacing. Enter the railing length between posts, the number of sections, the baluster width, and the maximum gap, and get the baluster count, the exact gap and on-center spacing, a pass/fail check against the US 4-inch rule, and estimated cost — with spacing options, a by-width table, and a downloadable PDF.
| Balusters | Gap | On-center | Code |
|---|---|---|---|
| Enter a railing to compare | |||
| Width | Balusters | Gap | Total |
|---|---|---|---|
| Enter a railing to compare | |||
How to use the baluster calculator
Enter the clear opening between your posts, the number of sections, the baluster width and the maximum gap, and get the baluster count, the exact gap and on-center spacing, a pass/fail check against the 4-inch code rule, and a cost estimate — plus a reference chart for common opening lengths.
Measure between the posts
Enter the clear opening in inches — inside face to inside face of the two newel posts, not post-to-post.
Set sections and width
Add how many equal runs you have, then tap a common baluster width or type your own.
Set the max gap
The default is the 4-inch code limit. Lower it for a tighter look, and add a price per baluster to cost the order.
Read the count & save a PDF
See balusters, gap, on-center and the code check, compare spacing options, and download the report for the yard.
How baluster spacing is calculated
The whole layout comes from one rule: no gap may let a 4-inch sphere through. Find the smallest number of balusters that keeps every gap under that limit, then spread them so each gap is equal.
Worked example — a 96-inch opening, 1½-inch balusters, 4-inch max gap
Balusters: roundup((96 − 4) ÷ (1.5 + 4)) = roundup(16.7) = 17
Gaps: 17 + 1 = 18
Actual gap: (96 − 17 × 1.5) ÷ 18 = 3.92 in
On-center: 3.92 + 1.5 = 5.42 in
17 balusters per section, every gap 3.92 inches — under 4, so it passes. Mark one center every 5.42 inches.
Baluster spacing charts
The lookups that come up most — baluster counts by opening length, the effect of baluster width, on-center spacing, and the code sphere sizes for guards and stairs.
| Opening | Balusters | Gaps | Actual gap | On-center |
|---|---|---|---|---|
| 24 in | 5 | 6 | 2.75 in | 4.25 in |
| 36 in | 7 | 8 | 3.19 in | 4.69 in |
| 48 in | 9 | 10 | 3.45 in | 4.95 in |
| 60 in | 11 | 12 | 3.63 in | 5.13 in |
| 72 in | 13 | 14 | 3.75 in | 5.25 in |
| 84 in | 15 | 16 | 3.84 in | 5.34 in |
| 96 in | 17 | 18 | 3.92 in | 5.42 in |
| 120 in | 22 | 23 | 3.78 in | 5.28 in |
| 144 in | 26 | 27 | 3.89 in | 5.39 in |
Counts are the minimum that keep every gap under 4 inches, spaced evenly. Longer openings land close to the limit — drop a baluster and the gap goes over, so these are the practical minimums.
| Width | Typical baluster | Balusters | Actual gap | On-center |
|---|---|---|---|---|
| 3/4 in | Round or metal | 19 | 3.86 in | 4.61 in |
| 1 in | Slim metal | 18 | 3.89 in | 4.89 in |
| 1-1/2 in | 2×2 wood | 17 | 3.92 in | 5.42 in |
| 2 in | Heavy wood / newel-style | 16 | 3.76 in | 5.76 in |
| 2-1/2 in | Decorative turned | 15 | 3.59 in | 6.09 in |
Wider balusters need fewer pieces but push the on-center wider — always calculate with the face width of the baluster you’re actually buying, not a round number.
| Location | Max sphere | Why |
|---|---|---|
| Guard infill (general) | under 4 in | The baseline rule for balusters on decks, landings and balconies |
| Stair triangle | under 6 in | Opening formed by tread, riser and bottom rail at the open side of stairs |
| Stair guard infill | under 4-3/8 in | Gap between balusters along the raking guard on the stairs themselves |
| Required guard height | 36 in min | Measured from the walking surface to the top of the rail (residential) |
| When a guard is required | 30 in drop | A guard is required where the surface is more than 30 in above the grade below |
Figures follow the US IRC baseline. Local jurisdictions amend the code — commercial work under the IBC uses 42-inch guards — so confirm the numbers with your building department before you build.
| Baluster width | Gap 3.5 in | Gap 3.75 in | Gap 3.9 in |
|---|---|---|---|
| 3/4 in | 4.25 in OC | 4.50 in OC | 4.65 in OC |
| 1 in | 4.50 in OC | 4.75 in OC | 4.90 in OC |
| 1-1/2 in | 5.00 in OC | 5.25 in OC | 5.40 in OC |
| 2 in | 5.50 in OC | 5.75 in OC | 5.90 in OC |
On-center is just the gap plus one baluster width. Lay out by on-center — one mark per baluster — instead of measuring each gap, and the spacing stays true across the whole run.
Balusters fill only the clear opening between the posts, so that inside distance — not the post centers — is what the spacing math divides up. Get the count right and the gaps fall out evenly; the inspector then checks them with a 4-inch sphere.
- Measure inside the posts — post-to-post makes the opening look bigger and over-counts balusters.
- Gaps outnumber balusters by one — there’s a gap at each post as well as between every pair.
- Lay out by on-center — one mark per baluster is faster and more accurate than measuring each gap.
Everything the calculator works out
One set of measurements gives you the count, the exact spacing, a code check, the cost, and a comparison across baluster widths — plus a report you can take to the yard or the inspector.
The figures behind every railing
Built for anyone laying out a railing
A deck rail, an interior stair, a balcony guard — the spacing rule is the same, and getting the count and the gap right the first time is the difference between a clean install and a failed inspection.
Filling multiple equal runs between posts and needing a count for the whole deck, with gaps that clear the 4-inch sphere on the first walkthrough.
- Measure each run’s clear opening
- Add runs as sections for a total
- Target about 3⅞″ for a margin
Replacing worn spindles on a staircase and matching the original look while bringing the spacing up to current code.
- Use the baluster’s real face width
- Check the 6″ stair-triangle rule too
- Lay out by on-center marks
Pricing a railing package, confirming a layout passes before the framing is covered, or handing a client a clear spacing spec.
- Compare widths before ordering
- Save the PDF with the job file
- Confirm local code amendments
7 tips for spacing balusters without errors
The assumptions that quietly fail an inspection or leave an ugly end gap — and the checks that catch them before you cut.
Baluster spacing FAQ
The measuring, spacing and code questions people ask most when laying out a railing.
Take the clear opening between the posts, subtract one baluster width, then divide by the baluster width plus the maximum gap, and round up: roundup((opening − maxGap) ÷ (width + maxGap)).
For a 96-inch opening with 1½-inch balusters and a 4-inch max gap, that’s 17 balusters, which lands the actual gap just under 4 inches. The calculator does this and spaces every gap evenly.
Under the US IRC (R312.1.3), guards must not allow a 4-inch sphere to pass, so the clear gap has to stay below 4 inches. Builders usually target about 3⅞ inches for a margin.
Two exceptions use a different sphere: the triangular opening at the open side of a stair tread may pass a 6-inch sphere, and the gap at the bottom rail on stairs allows 4⅜ inches. Confirm with your local building department, since some areas amend the code.
Even spacing means every gap is identical and every gap stays under the limit. Once you know the count, the gap is (opening − total baluster width) ÷ gaps, where gaps is always one more than the number of balusters.
On-center spacing — center of one baluster to center of the next — is the gap plus one baluster width. Marking on-center is the fastest accurate layout, because you make one mark per baluster instead of measuring each gap.
On-center (OC) spacing is the distance from the centerline of one baluster to the centerline of the next. It equals the clear gap plus one baluster width, and it stays constant across an evenly spaced rail.
It’s the number to mark out with — a single pencil mark per baluster center, rather than measuring a gap, placing a baluster, and measuring again. A 1½-inch baluster with a 3.9-inch gap has an on-center of 5.4 inches.
Measure the clear opening between the posts — inside face of one newel to inside face of the next — not the post centers. The balusters fill only that open space, so the clear distance is what the math needs.
If you measured post-to-post by mistake, subtract the combined thickness of the two half-posts facing the opening. A post-to-post figure makes the opening look larger and inflates the baluster count.
With 1½-inch balusters and gaps just under 4 inches, you get roughly 2.2 balusters per foot, about one every 5.4 inches on-center. Thinner ¾-inch metal balusters pack closer, near 2.5 per foot, because each takes less of the gap allowance.
That’s a planning rule of thumb, not a substitute for the real calculation — the exact count depends on the opening length, since the end gaps have to divide evenly and stay under code.
Yes. A wider baluster eats into the opening, so it leaves less room for gaps and shifts where the even-spacing math lands. Going from ¾-inch metal to 2-inch wood balusters on the same rail noticeably changes the count needed to keep every gap under 4 inches.
Always calculate with the actual face width of the baluster you’re buying. The by-width table shows the count side by side for common widths so you can see the effect before ordering.
Plain wood spindles typically run about $2–$5 each and metal balusters about $3–$8 each, with decorative or hollow-iron styles higher. Multiply your total count by the per-piece price for a materials figure.
That covers balusters only — newel posts, handrail, shoe rail, connectors and fasteners are separate and often cost more than the balusters. Buy a few spares; a cracked or bowed baluster is common and a return trip isn’t worth it.
Estimation Only — Confirm With Your Local Building Code: This calculator spaces balusters evenly across the clear opening you enter and checks the result against the US IRC baseline, under which a guard must not allow a 4-inch sphere to pass (IRC R312.1.3). Enter the clear distance between newel posts, not post-to-post, and use the actual face width of your baluster. Stairs are governed by separate rules — a 6-inch sphere at the triangular tread opening and 4⅜ inches along the raking guard — which you must verify separately. Required guard heights, when a guard is needed, and the exact spacing rules vary by jurisdiction, occupancy and whether the IRC or IBC applies, and local amendments are common. Counts and costs are estimates only. For estimation purposes only; confirm spacing, heights and code requirements with your building department before you build.


