Baluster Spacing Calculator
Enter your railing length, baluster width, and maximum gap to get the number of balusters and the exact, evenly distributed spacing that keeps every gap under the 4-inch code limit.
Results
- Balusters needed
- 17
- Even gap between
- 3.917 in
- Gaps (incl. ends)
- 18
Estimates only. Round up and buy a little extra to account for waste, spills, and breakage.
This calculator spaces balusters evenly across a railing section while keeping every gap under the 4 inch code limit.
The 4 inch sphere rule means no opening in a guardrail may allow a 4 inch ball to pass, which is what drives the spacing math.
Also works as a spindle spacing calculator, railing baluster calculator, and 4 inch sphere rule checker.
How to use the baluster spacing calculator
- Enter the railing length in in.
- Enter the baluster width in in.
- Enter the maximum gap in in.
- Optionally add a price to estimate the total project cost.
- Read your quantities instantly — no sign-up, and you can print the estimate to take to the supplier.
Worked example
Inputs
- Railing length
- 96 in
- Baluster width
- 1.5 in
- Maximum gap
- 4 in
Results
- Balusters needed
- 17
- Even gap between
- 3.917 in
- Gaps (incl. ends)
- 18
Using the example values above, the baluster spacing calculator returns 17 (balusters needed). Change any field to match your own project and the numbers update instantly.
How even spacing is calculated
Take the clear span between posts, subtract the combined width of all balusters, and divide the remainder by the number of gaps, which is always one more than the baluster count.
Increase the baluster count until every gap falls below 4 inches. With 1.5 inch square balusters, that usually lands around 5.5 inch on centre spacing.
Stairs are different
On a sloped stair rail, measure the gap perpendicular to the balusters, not horizontally. The 4 inch rule still applies, and the triangular opening at the tread must not pass a 6 inch sphere.
Cut a spacer block to your calculated gap and use it for every installation rather than measuring each one, which is faster and far more consistent.
Formula
Balusters = ceil((railing length − gap) ÷ (baluster width + max gap)). Even gap = (railing length − balusters × width) ÷ (balusters + 1).
Frequently asked questions
- How far apart should balusters be?
- Building codes require that a 4-inch sphere cannot pass between balusters, so keep every gap under 4 inches.
- How do I space balusters evenly?
- Find the minimum baluster count that keeps gaps under 4 inches, then distribute the leftover space equally across all gaps including the two ends.
- How far apart should balusters be?
- No more than 4 inches of clear gap. With 1.5 inch balusters that means about 5.5 inches on centre.
- How many balusters do I need?
- Divide the railing length in inches by the on centre spacing and round up, then subtract one for the post at the end.
Related calculators
Deck Board Calculator
Estimate how many deck boards you need for your deck size.
Stair Calculator
Calculate the number of steps, rise, and run from total height.
Fence Calculator
Plan posts, rails, and pickets for a wood fence.
Board Foot Calculator
Calculate board feet of lumber from thickness, width, length, and quantity.