Baluster Spacing Calculator
An 8 foot clear rail with 1.5 inch balusters and a 4 inch maximum gap needs 17 balusters, a 3.9167 inch opening, and 5.4167 inch on-center spacing.
Last updated . Sphere gap starts at four inches. Rail starts at 8 ft. Width starts at 1.5 in.
A baluster spacing calculator for a straight guard. The count is the smallest whole number that keeps every clear opening at or under the maximum. On-center spacing is exact for equal end gaps.
Riser and tread layout: stair calculator. Deck boards beside the rail: deck calculator.
Baluster count and spacing
The 4 inch opening is the 2021 IRC R312.1.3 sphere, already filled in and changeable. End gaps match the gaps between balusters. Stair exceptions, 6 inches in the triangle and 4⅜ inches at the open side, are not this default. Measure the baluster. Do not type a nominal size.
Results
Count and the equal opening
The rail in the box is the clear distance between posts, not a center-to-center post spacing. Baluster width is the piece you measured. With n balusters there are n + 1 equal openings, including both ends. The smallest n that satisfies (rail − n × width) ÷ (n + 1) ≤ maximum gap is the count. On-center is (rail + width) ÷ (n + 1).
For 96 inches, a 1.5 inch piece, and a 4 inch cap: (96 − 4) ÷ (1.5 + 4) = 16.727…, so the count rounds up to 17. The opening is (96 − 25.5) ÷ 18 = 3.9167 inches. Centers fall every (96 + 1.5) ÷ 18 = 5.4167 inches.
The 4 inch cap is the sphere in 2021 IRC R312.1.3. A guard must not pass a 4 inch (102 mm) sphere from the walking surface to the required guard height. The section’s stair exceptions are a 6 inch sphere in the triangle and a 4⅜ inch sphere along the open side. This page does not apply those exceptions. The association page that quotes the section is stairways.org/blog/r312-1-3-opening-limitations-2021/.
Worked rail
| Input | Value |
|---|---|
| Clear rail | 8 ft (96 in) |
| Measured width | 1.5 in |
| Maximum clear gap | 4 in |
| Balusters | 17 |
| Clear gap | 3.9167 in · 99.48 mm |
| On-center | 5.4167 in · 137.58 mm |
Baluster questions
How many balusters fit an 8 foot rail at a 4 inch gap?
Leave the rail at 8 ft, the measured width at 1.5 in, and the maximum clear gap at 4 in. Balusters reads 17. Clear gap reads 3.9167 in · 99.48 mm. On-center reads 5.4167 in · 137.58 mm.
Why not 16 balusters?
Sixteen pieces 1.5 inches wide use 24 inches, leaving 72 inches for 17 openings. 72 ÷ 17 is 4.2353 inches, which is over the 4 inch sphere. Seventeen pieces leave 70.5 inches for 18 openings, 3.9167 inches, which passes.
What if the maximum gap is 4.25 inches?
Leave the 8 ft rail and the 1.5 in width. Set the maximum clear gap to 4.25 in. Balusters reads 16. Clear gap reads 4.2353 in · 107.58 mm. On-center reads 5.7353 in · 145.68 mm.
Where does the 4 inch default come from?
2021 IRC R312.1.3, as quoted by the Stairbuilders and Manufacturers Association, says required guards shall not have openings that allow a sphere 4 inches (102 mm) in diameter to pass. The stair triangle exception is 6 inches, and the open side of a stair is 4⅜ inches. Those exceptions are not filled in here. This form is the level guard between two posts. The quote is on stairways.org/blog/r312-1-3-opening-limitations-2021/.
What is on-center in this layout?
End openings equal the openings between balusters. On-center is the rail plus one baluster width, divided by the count plus one. For the default that is 97.5 ÷ 18 inches, 5.4167 inches.
What if the width box is cleared?
Clear the measured baluster width. Balusters, clear gap, and on-center read —. The note reads: Enter a measured baluster width greater than zero.
What if the rail box is cleared?
Clear the clear rail between posts. The note reads: Enter a clear rail length greater than zero.