A 4x4 post is 3 1/2″ wide and a 2x2 baluster is 1 1/2″, which is why those are filled in. Measure yours, since turned and metal balusters come in other sizes.
Your max gap
Use the largest opening your local building code or your inspector allows. Nothing here knows your code. It only uses the number you type, and the 4″ filled in is a starting value, not a rule. If you're not sure, ask before you buy the balusters.
How the spacing works
Take away one post width from the rail length, half a post at each end, and you have the clear span between the posts. A row of balusters always has one more gap than balusters, so the gaps and balusters together have to fill that span exactly.
Here's the example that's filled in above. A 72″ rail with 3 1/2″ posts leaves 68 1/2″ between the posts. Each baluster needs one baluster width plus one gap, and there's one gap left over at the end. So the count is the clear span minus one gap, divided by a baluster plus a gap: 11.73, which rounds up to 12.
Those 12 balusters leave 50 1/2″ of open space, shared by 13 equal gaps. Each gap is 101/26″, or 3.885″, which is about 3 7/8″ on a tape. One baluster fewer would open the gaps up to 4.33″, over the max. The on center spacing, from the middle of one baluster to the middle of the next, is about 5 3/8″.
Marking the layout
Measure every mark from the face of the first post, using the list under the results. Don't step along from one baluster to the next. Every mark on the list is worked out exactly and rounded on its own, so a tiny rounding error can't pile up.
| Baluster | Near edge | Center |
|---|---|---|
| 1 | 3 7/8″ | 4 5/8″ |
| 2 | 9 1/4″ | 10″ |
| 3 | 1′ 2 5/8″ | 1′ 3 3/8″ |
| 4 | 1′ 8 1/16″ | 1′ 8 13/16″ |
| 5 | 2′ 1 7/16″ | 2′ 2 3/16″ |
| 6 | 2′ 6 13/16″ | 2′ 7 9/16″ |
| 7 | 3′ 3/16″ | 3′ 15/16″ |
| 8 | 3′ 5 9/16″ | 3′ 6 5/16″ |
| 9 | 3′ 10 15/16″ | 3′ 11 11/16″ |
| 10 | 4′ 4 3/8″ | 4′ 5 1/8″ |
| 11 | 4′ 9 3/4″ | 4′ 10 1/2″ |
| 12 | 5′ 3 1/8″ | 5′ 3 7/8″ |
A spacer block cut to the gap is quick, but its rounding does add up. In the example, a block cut to 3 7/8″ leaves a last gap of 4″, right at the max. Check the last gap before you fix anything, or set the balusters to the marks.
On a stair
Measure the rail length along the rail, the way the Stair Calculator app does, and set out the marks along the rail too. The balusters stand upright while the rail slopes, so the level opening between two of them comes out a little smaller than the gap shown. If you'd rather measure the clear span between two post faces, type that as the rail length and set the post width to 0.
Questions
How many balusters do I need for an 8 foot section?
With 4x4 posts 8 feet apart center to center, 2x2 balusters and a 4″ max gap, it's 17 balusters with gaps of 3.722″, about 3 3/4″. Change any of the numbers above to match your rail.
Why is my gap smaller than the max?
The count has to be a whole number, so the calculator picks the fewest balusters that keep every gap at or under your max, then spreads them out evenly. The gap is almost always a bit smaller than the max as a result.
Should I measure center to center or between the posts?
Type post center to post center, and one post width comes off. If you measured between the post faces, type that and set the post width to 0. You'll get the same answer.
Can I use millimeters?
Yes. Switch Units to mm and type plain numbers. The numbers already typed are converted for you, and the marks are rounded to the nearest millimeter.
Is there an app for this?
Yes. My Stair Calculator for Android has the same baluster math in Pro, along with stringer layout and L and U stairs with landings.
Stair Calculator
Stairs drawn to scale from three numbers, plus stringer layout, landings and balusters in Pro.