The model, stated exactly
The IRC guard and baluster rule is a sphere test: a 4-inch sphere must not pass between balusters, so the clear gap between balusters must be 4 inches or less. For a rail section of length L inches and baluster width w inches, n balusters leave n + 1 gaps (one between each pair of balusters, plus one at each end, where the end posts act as boundaries). The clear gap is therefore (L − n × w) ÷ (n + 1). The smallest count that keeps the gap at or under 4 inches is n = ceil((L − 4) ÷ (w + 4)), computed with an epsilon-safe ceiling (a tiny 1e-9 tolerance is applied before rounding up) so a case that lands exactly on 4.00 inches never rounds up to one extra baluster. Center-to-center spacing, when it is useful for layout, is defined as (L − w) ÷ (n − 1): the distance between the centers of the first and last balusters spread across the section. End gaps equal the clear gap by construction, so spacing every baluster at the clear gap from its neighbors and from the posts gives a uniform run.
The worked example, line by line
Setup: 96 inches of rail, 1.5-inch wood balusters.
Line 1 — baluster count. (96 − 4) ÷ (1.5 + 4) = 92 ÷ 5.5 = 16.73, rounded up to 17 balusters.
Line 2 — clear gap. (96 − 17 × 1.5) ÷ 18 = 70.5 ÷ 18 = 3.92 inches — under the 4-inch limit, so the sphere test passes.
Line 3 — center-to-center spacing. (96 − 1.5) ÷ 16 = 94.5 ÷ 16 = 5.91 inches between adjacent baluster centers.
Try these
120 inches at 1.5 inches. (120 − 4) ÷ 5.5 = 21.09, rounded up to 22 balusters; clear gap = (120 − 33) ÷ 23 = 3.78 inches.
96 inches at 0.5 inches (iron). (96 − 4) ÷ 4.5 = 20.44, rounded up to 21 balusters; clear gap = (96 − 10.5) ÷ 22 = 3.89 inches.
48 inches at 1.5 inches. (48 − 4) ÷ 5.5 = 8.00 exactly, so 8 balusters; clear gap = (48 − 12) ÷ 9 = 4.00 inches — the boundary case, which passes at exactly 4 and needs no extra baluster.
Baluster spacing reference table — print this table
Every cell is computed with the same formula as the calculator: the smallest baluster count that keeps the clear gap at or under 4 inches, and the clear gap that count produces. Read across a row for your rail length, down a column for your baluster width. Iron balusters (0.5 inches) are the slender metal spindles common on modern stairs; wood balusters (1.5 inches) are the standard turned or square wood spindle; wide wood balusters (2.5 inches) are the chunky square or box newel-style spindles. All gaps are in inches and all are at or under the 4-inch limit.
| Rail length (in) | Iron 0.5 in: balusters | Iron 0.5 in: clear gap (in) | Wood 1.5 in: balusters | Wood 1.5 in: clear gap (in) | Wide wood 2.5 in: balusters | Wide wood 2.5 in: clear gap (in) |
| 36 | 8 | 3.56 | 6 | 3.86 | 5 | 3.92 |
| 48 | 10 | 3.91 | 8 | 4.00 | 7 | 3.81 |
| 60 | 13 | 3.82 | 11 | 3.63 | 9 | 3.75 |
| 72 | 16 | 3.76 | 13 | 3.75 | 11 | 3.71 |
| 96 | 21 | 3.89 | 17 | 3.92 | 15 | 3.66 |
| 120 | 26 | 3.96 | 22 | 3.78 | 18 | 3.95 |
| 144 | 32 | 3.88 | 26 | 3.89 | 22 | 3.87 |
Output · formula · meaning
| Output | Formula | What it means |
| Baluster count | ceil((L − 4) ÷ (w + 4)) | 17 at the defaults — the smallest count that keeps every gap at or under 4 inches. |
| Clear gap | (L − n × w) ÷ (n + 1) | 3.92 inches at the defaults — the open space between balusters, and between each end baluster and its post. Must be 4 inches or less. |
| Center-to-center spacing | (L − w) ÷ (n − 1) | 5.91 inches at the defaults — the distance between adjacent baluster centers, useful for marking layout on the rail. |
| Gap count | n + 1 | 18 at the defaults — one gap between each pair of balusters, plus one at each end. |
Who uses this
- The homeowner replacing a stair railing: measures an 8-foot rail, enters 96 inches at 1.5 inches, and learns the section takes 17 wood balusters at a 3.92-inch gap — the count for the lumber order.
- The DIYer switching to iron balusters: enters the same 96 inches at 0.5 inches, gets 21 balusters at a 3.89-inch gap, and discovers the slimmer spindles need four more pieces than wood for the same rail.
- The contractor checking a bid: enters 120 inches at 1.5 inches, gets 22 balusters, and spots immediately whether a supplier's count matches the 4-inch rule or pads the order.
- The home inspector or buyer: reads the table, measures a gap with a tape, and checks in seconds whether an existing railing passes the sphere test or needs a baluster added.
Accuracy & limitations
The 4-inch rule is the IRC guard and baluster sphere test, stated here as the standard rule rather than copied from any single source — and local codes vary: some jurisdictions apply a 4-inch rule only to guards above a certain height, some apply a stricter rule to stair guards, and some older homes were built under earlier codes. Always confirm against your local building code and your inspector before building. The calculator has its own limits: it counts one straight rail section only, with uniform spacing and equal end gaps. It assumes every baluster has the same width — mixed widths, tapered spindles, and decorative baskets change the effective width and must be measured at their widest point. It does not account for newel posts mid-run, angled transitions, or volutes, which split a rail into separate sections that must be calculated one at a time. Measure the sloped rail length along the stair, not the horizontal run: on a stair the rail follows the slope, so the horizontal run understates the length and understates the count. Very short rails (4 inches or less) need no baluster by the sphere test; the calculator reports a minimum of one. Error policy: a rail length or baluster width that is missing, non-numeric, zero or less, or unrealistically large (over 1200 inches of rail, over 120 inches of width), and a baluster width equal to or greater than the rail length, are reported as errors rather than calculated, so no result ever shows NaN.
Cite this calculatorBright Side Kit. “Baluster Spacing Chart & Calculator: 4-Inch Rule Guide.” brightoolbox.com, 2026.Bright Side Kit. "Baluster Spacing Chart & Calculator: 4-Inch Rule Guide." https://brightoolbox.com/baluster-spacing-chart/ Accessed October 24, 2026.
Embed this calculatorPaste this into any web page to embed the live calculator. The “Powered by Bright Side Kit” link below it must stay intact.