Balusters, also called spindles, come in square, round and turned profiles, so the width you need is the widest measurement of the piece itself, across its face or its diameter. The largest gap starts at 4 inches, the sphere limit that guards must meet under the building code. Boards and joists are a separate count, so use the board and joist count for those.
How to use this calculator
- Measure straight across from the face of either post to the face of the other, along the bottom rail. Enter that distance in feet or inches, whichever you measured in.
- Enter the baluster width at its widest point, measured on a sample of the piece you will install, not the nominal size printed for it.
- Leave the largest gap at 4 inches for a guard that must meet the code limit, or enter a smaller gap for tighter spacing. The result uses the fewest balusters that keep every gap within the value you enter.
- Open More options and enter the number of identical sections if the same rail repeats. The total for all sections appears beside the count for each section.
- Note the actual gap and the center-to-center spacing. Mark the midpoint of the run and lay out outward from it, as described below.
Worked examples
Back deck rail
Railing length between posts: 8 ft · Baluster width: 1.5 in
- Balusters per section
- 17 balusters
- Actual gap
- 3.92 in
- Center-to-center spacing
- 5.42 in
Short porch run
Railing length between posts: 48 in · Baluster width: 1.5 in
- Balusters per section
- 8 balusters
- Actual gap
- 4.00 in
- Center-to-center spacing
- 5.50 in
Matching deck sections
Railing length between posts: 6 ft · Baluster width: 2 in · Identical railing sections: 6
- Balusters per section
- 12 balusters
- Actual gap
- 3.69 in
- Center-to-center spacing
- 5.69 in
- All sections
- 72 balusters
Back rail with a tighter gap
Railing length between posts: 8 ft · Baluster width: 1.5 in · Largest gap allowed: 3 in
- Balusters per section
- 21 balusters
- Actual gap
- 2.93 in
- Center-to-center spacing
- 4.43 in
Balusters per section for common railing lengths and baluster widths
| Railing length | Baluster width: 1.5 in | Baluster width: 2 in |
|---|---|---|
| 4 ft | 8 | 8 |
| 6 ft | 13 | 12 |
| 8 ft | 17 | 16 |
| 10 ft | 22 | 20 |
Each cell: Balusters per section (balusters). Inputs not in the table use the calculator's starting values.
How the count works
The calculator looks for the fewest balusters that keep every opening at or under the limit. Each baluster adds an opening, and the openings at both posts count too, so a run always has more openings than balusters. The count is rounded up, because a short count leaves an opening wider than the limit.
Once the count is set, the calculator spaces the balusters so every opening is the same width: the actual gap. It is a little smaller than the limit, unless the run fits the count exactly and the gap equals the limit.
Center-to-center spacing is the actual gap plus the baluster width. Use it when you mark the rail with a tape, and use the actual gap when you cut a spacer.
Laying out the balusters from the middle
Find the midpoint of the clear span and mark it on the bottom rail. If the count is odd, center a baluster on that mark. If the count is even, center a gap on it, so no baluster sits right on the midpoint.
Cut a spacer block to the actual gap, not to the limit. Set the middle baluster or the middle gap on the mark, then work outward in both directions, placing each baluster against the spacer. The gap at each post should match the gaps in the middle.
When a guard is required
The gap rule is only one part of a guard. A guard is required where the drop to the floor or grade below is more than 30 inches. On decks, porches and landings the guard must be at least 36 inches high, and on the open side of stairs it must be at least 34 inches.
Stair rails follow a separate rule for the triangular opening formed by the rail, the riser and the tread, so the gap limit alone does not cover them. This calculator assumes a level run between posts. If the rail runs beside steps, size the steps with the step layout before you lay it out.
The guard rules above come from the International Residential Code, but local codes can differ. Check with your building department before you order material, and treat these figures as a starting point.
Mistakes to avoid
- Measuring center to center over the posts. The posts take up part of that length, so the layout runs past the clear opening and the end gaps come out wrong.
- Spacing each gap at the limit instead of the actual gap. The actual gap is a little smaller, so a spacer cut to the limit runs past the far post.
- Assuming every section matches. A corner, a post of a different size or a landing changes the clear distance, so measure each run on its own.
- Fastening before a dry fit. Set the balusters loose on the rail, check the end gaps at both posts, and only then fasten them.
Spacing balusters on stairs
Stair guards get two looser limits. The triangle between the rail, riser and tread must stop a 6 inches sphere, and the gaps between balusters on the open side of the stairs must stop a 4.375 inches sphere. The level-run calculator above does not account for the stair slope, so check your layout with your local building department.
Common questions
How far apart should spindles be on a deck rail?
Spacing comes from the gap, not from a fixed distance between centers. Keep every opening at or under 4 inches, and the center-to-center distance follows from the baluster width plus the actual gap. Check your local rules before you fix the layout.
What is the code for spacing on deck spindles?
The guard rule in the International Residential Code is that a sphere of 4 inches must not pass through any opening in the guard. Local codes can differ, so confirm the rule with your building department before you build.
What gap should you have between spindles?
The limit sets the gap. Enter it, and the calculator returns the fewest balusters that keep every opening within it, along with the actual gap, which comes out a little smaller than the limit.
How far apart can 4x4 deck railing posts be?
This calculator does not set post spacing. That depends on the railing system and on local code, so use the spacing your rail maker's instructions and your building department call for. Once the posts are set, enter the clear distance between them here.
How do I calculate spindle spacing?
Add up the width of all the balusters and subtract that from the clear distance between the posts. Divide what is left by one more than the number of balusters, because there is one more opening than there are balusters. Try the smallest count that keeps that gap at or under 4 inches. The calculator does this for you.
How big can the gap be under the bottom rail?
The gap under the bottom rail is an opening too, so it must stop a 4 inches sphere. Measure from the top of the deck surface up to the underside of the rail. On stairs, the triangle at the bottom rail gets the larger 6 inches limit.