Baluster Spacing Calculator
Enter the clear opening between posts, the width of one baluster, and the largest gap you are allowed. The calculator returns the fewest balusters that keep every gap at or under the limit, spaced evenly.
For residential guards, the IRC requires that a 4 in sphere cannot pass through any opening. Some places and some stair rails use different limits, so confirm locally.
Get new calculators and the Pro quote tool
One short email when something new is ready. We store your email, the choice below and this page's name, and use them only for that. Remove my email any time · Privacy
Worked example
Inputs: clear opening between posts 72 in; baluster width 1.5 in; maximum gap allowed 4 in.
- n balusters leave n + 1 equal gaps, so each gap = (72 − n × 1.5) ÷ (n + 1).
- Require each gap ≤ 4: n ≥ (72 − 4) ÷ (1.5 + 4) = 12.36, round up to 13.
- Gap with 13 balusters: (72 − 19.5) ÷ 14 = 3.75 in, which is under 4 in.
- Center-to-center: 3.75 + 1.5 = 5.25 in.
Result: 13 balusters needed.
Where the formula comes from
International Residential Code R312.1.3 (guard openings must not allow a 4 in sphere to pass). Even-spacing algebra is shown in the worked example. Stair rails and local codes can differ.
Estimates only. Results are planning figures, not engineering or code advice. Check your local building code and confirm quantities with your supplier.
Frequently asked questions
Is the limit always 4 inches?
For most residential guards the IRC uses a 4 in sphere. Some jurisdictions are stricter, and stair guards have additional rules about the triangular opening at the steps. Check with your building department.
What counts as the opening?
The clear distance between the inside faces of the two posts, not post center to post center.
Can I use this for stair railings?
Not directly. Stair railings are angled and have extra opening rules at the treads. This tool is for level runs between posts.
Should I round the gap down?
The calculator already picks enough balusters that the even gap is at or below your limit. Buy a couple of extras to allow for damaged pieces.