This baluster calculator works out how many balusters, or spindles, you need between two posts so the gaps stay within the building code. Enter the space between the posts and the width of your balusters, and the baluster calculator gives the number of balusters, the exact gap between them and the center-to-center spacing for marking them out.
How to use the baluster calculator
- Choose US or metric units. US (inches) is the default.
- Choose where the railing is: a deck, porch or landing, or the open side of stairs.
- Enter the space between posts and the width of one baluster.
- Enter the number of sections of the same size if you want a total, then press Calculate.
The 4-inch rule
The 2021 International Residential Code (IRC), section R312.1.3, says that required guards must not have openings, from the walking surface up to the required guard height, that allow a sphere 4 inches (102 mm) in diameter to pass through. On the open sides of stairs, the limit is a 4⅜-inch (111 mm) sphere, and the triangular openings formed by a stair's riser, tread and the bottom rail of the guard may not let a 6-inch (153 mm) sphere through. Because a sphere must not pass, every gap between balusters needs to be less than the limit.
When guards are needed
The IRC, in section R312.1.1, requires guards on open-sided walking surfaces, including floors, stairs, ramps and landings, that are more than 30 inches (762 mm) above the floor or grade below at any point within 36 inches horizontally of the edge. Section R312.1.2 sets the guard height at not less than 36 inches (914 mm), or 34 inches on the open sides of stairs, measured from the line connecting the nosings.
How the calculator works
With n balusters between two posts, there are n + 1 gaps. The gap is:
gap = (space between posts − n × baluster width) ÷ (n + 1)
The calculator finds the smallest number of balusters that keeps the gap under the code limit, then spaces them evenly. It also gives the center-to-center spacing, the gap plus one baluster width, which is handy for marking the rail: mark the first center one gap plus half a baluster from the post, then step along by the center spacing.
Worked example
Say the clear space between two deck posts is 72 inches and your balusters are 1½ inches wide. With 12 balusters, the gaps would be (72 − 18) ÷ 13 = 4.15 inches, too wide. With 13 balusters, they're (72 − 19.5) ÷ 14 = 3.75 inches, under the 4-inch limit. The center-to-center spacing is 3.75 + 1.5 = 5.25 inches. For 8 sections of the same size, you'd need 104 balusters.
Reading the results
The big number is the number of balusters for one section. The table shows the gap between balusters, the center-to-center spacing, the code limit the gaps must stay under and, if you entered more than one section, the total number of balusters.
Measuring accurately
Measure the clear space between the inside faces of the posts, at the height where the balusters will go, since posts are not always perfectly plumb. Measure your actual balusters too: their real width can differ from the size on the label. If your sections vary in length, run the calculator for each one, because a slightly longer section may need an extra baluster.
Planning a whole railing
Most decks have several railing sections between posts. If they're all the same length, enter the number of sections to get the total. If they differ, run the calculator for each one and add up the results, since a longer section may need an extra baluster. Keeping the gaps the same across sections makes the railing look even, so you might choose a slightly smaller gap everywhere to match the tightest section.
Metric railings
Choose metric to work in millimeters. The calculator uses the IRC's metric figures: 102 mm for decks, porches and landings, and 111 mm for the open sides of stairs. With 38 mm balusters in an 1,800 mm space, 13 balusters give gaps of about 93 mm.
Stair railings
On a stair, measure the space between posts along the rail and enter it the same way. The gaps on the open side of the stair must stay under 4⅜ inches. Balusters on stairs are often set two per tread, so check the result against your tread layout as well.
Wider or thinner balusters
The width of the baluster changes how many you need. In the same 72-inch space, square balusters 2 inches wide need 12, with gaps of about 3.69 inches, while thin 1-inch metal balusters need 14, with gaps of about 3.87 inches. Try your options in the calculator to compare the cost and the look before you buy.
Common mistakes
- Measuring post centers. Measure the clear space between post faces.
- Aiming for exactly 4 inches. Gaps must be less than 4 inches.
- Forgetting stairs. The open side of stairs has its own 4⅜-inch limit.
- Using nominal sizes. Measure the actual baluster width.
Tips
- Cut a spacer block to the gap size to set each baluster quickly.
- Buy a few extra balusters for mistakes and offcuts.
- Check your local code; it may differ from the IRC.
What next
Use this often? Add Baluster to your Home screen.
Frequently asked questions
How does a baluster calculator work?
It finds the fewest balusters that keep every gap under the code limit: gap = (space − n × width) ÷ (n + 1).
What is the maximum baluster spacing?
The 2021 IRC says openings in guards must not let a 4-inch sphere pass, so gaps must be under 4 inches.
What is the baluster spacing on stairs?
On the open sides of stairs, the IRC limit is a 4⅜-inch sphere.
How many balusters for a 6-foot section?
With 1½-inch balusters in a 72-inch space, 13 balusters give 3.75-inch gaps.
When does a deck need a railing?
The IRC requires guards where the walking surface is more than 30 inches above the floor or grade below.
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.