Baluster Spacing Calculator
Find how many balusters each section of a deck, porch, or stair railing needs, and how far apart to put them. The calculator spaces the balusters evenly between the posts, with the same gap at each post, at or under the gap you choose. Balusters are also called spindles, or pickets on a deck railing.
- Choose US or Metric. You can still change the unit of any single field.
- Enter the length of one railing section: the space between two posts, measured from the inside face of one post to the inside face of the next. Use Add section for each other pair of posts.
- On stairs, measure the section level, not along the rail. Hold the tape level from post to post, or measure the horizontal run between the posts.
- Enter the actual Baluster width. Measure the balusters you have, at their narrowest point.
- Check the Max gap: the most space you want between two balusters, and between a baluster and a post.
- Optionally, enter a Price per baluster to estimate the cost.
Length fields accept whole numbers, decimals, fractions, and mixed
numbers, such as 68, 68.5, 3/4, or
68 1/2. Choose ft + in as the unit to enter
a section such as 7 ft 4 in in two fields.
The Layout table gives the gap and the on-center spacing for each section, rounded to 1/16 in or 0.1 mm, ready to mark on the rail.
How to calculate baluster spacing
In each section, the balusters stand between two posts with the same gap between every pair of balusters and between the end balusters and the posts. Railing maker Nuvo Iron's installation guide spaces its balusters this way, with equal spacing at each end between the first and last balusters and the posts. So a section with n balusters has n + 1 equal gaps:
Balusters = (section length + baluster width) ÷ (baluster width + max gap), rounded up, − 1
Gap = (section length − balusters × baluster width) ÷ (balusters + 1)
On center = (section length + baluster width) ÷ (balusters + 1)
Rounding up gives the fewest balusters that keep every gap at or under the max gap. A 68 1/2 in section with 1 5/16 in balusters and a 4 in max gap gets (68.5 + 1.3125) ÷ 5.3125 = 13.14, rounded up to 14, so 13 balusters with 3 11/16 in gaps, 5 in on center.
A section no longer than the max gap needs no balusters. If you enter balusters too wide to fit the gap you chose, such as wide board balusters in a short section, the section gets as many as fit, and its gap comes out wider.
The calculator counts each section on its own, because every post adds a gap on each side. Two 30 in sections need 5 + 5 = 10 balusters, while 60 in counted at once gives 11.
Measuring and marking
Deck and porch railings
Measure between the inside faces of the posts at the rail, not from post center to post center. Mark the first baluster one gap from the post, and each next one an on-center spacing from the last.
Stair railings
Balusters stand plumb, so the gap between two of them is measured level, even on a stair. Enter the level length of the section, and the gap and on-center spacing in the results are level too. If you enter the length along the sloped rail instead, you get more balusters than you need, and the real gaps won't match the results.
To mark along the sloped rail, multiply the on-center spacing by the slope factor of the stair: the length along the rail divided by the level length. Or mark the level spacing on a straightedge held level and transfer each mark up to the rail with a plumb line or a level.
This page covers stair railings with the balusters set into a sloped bottom rail. Balusters set into each tread, such as two per tread, are spaced by the tread depth instead.
The 4 inch rule
In the US, the 2024 International Residential Code (IRC) section R321.1.3 limits the openings in a required guard by the size of a sphere that must not pass through:
| Opening | IRC sphere |
|---|---|
| Guards, such as on a deck or porch | 4 in (102 mm) |
| Guards on the open side of stairs | 4 3/8 in (111 mm) |
| The triangle formed by a riser, a tread, and the bottom rail | 6 in (153 mm) |
The max gap starts at 4 in, the IRC limit for most guards. The same limit is section R312.1.3 in the 2021 and earlier editions. The sphere must not pass, so a gap a little under 4 in is easier to check with a 4 in block. For a stair section alone, you can enter 4 3/8 in to use fewer balusters. Keeping 4 in lets one gap work for a deck and its stair. The calculator doesn't check the triangle under a stair rail, because the baluster spacing doesn't set it.
The Metric max gap starts at 100 mm, a round number under the IRC's 4 in (101.6 mm). It isn't another country's rule.
The calculator keeps every gap at or under the max gap you enter, but it doesn't tell you a railing meets the code. Guards also have rules for height, strength, and where they're required. The IRC is a model code: US states and cities adopt an edition of it, sometimes an earlier one, often with their own changes. The rules also differ outside the US. Check the code where you build.
Baluster sizes
Enter the actual width, not the nominal size. Wood 2x2 balusters are often eased on the edges and narrower than 2x2 lumber. Doman Building Materials lists its 2x2 balusters at 1 5/16 in, while the US softwood lumber standard PS 20-20 sets a dry 2x2 at 1 1/2 in or more. Round metal balusters are often 3/4 in, such as Nuvo Iron's. For turned spindles that change width along their length, enter the narrowest width, where the gap is widest.
A baluster entered wider than it is gives the same count with real gaps wider than the results, which can go over the max gap. That's why the US width starts at the narrower 1 5/16 in. Measure yours.
In the UK, stair spindles are commonly 41 mm or 32 mm square, sized to the groove in the handrail and baserail, such as the Richard Burbidge spindles sold by Howarth Timber. The Metric width starts at 41 mm. Enter the width of the spindles you have.
Examples
A deck railing with four sections
Sections of 68 1/2, 68 1/2, and 44 in and 7 ft 4 in, with 1 5/16 in balusters and a 4 in max gap, need 13 + 13 + 8 + 16 = 50 balusters. The 44 in section has 3 3/4 in gaps, 5 1/16 in on center. At $3.25 per baluster, the cost is $162.50.
Round metal balusters
A 48 in section with 3/4 in balusters gets 10 balusters, 3 11/16 in apart and 4 7/16 in on center. Nuvo Iron's guide also counts 10 of its 3/4 in balusters for a 4 ft section, at a slightly wider 4 1/2 in on center.
A stair section
A stair section 50 in long measured level, with 1 5/16 in balusters and the max gap set to 4 3/8 in, gets 9 balusters, 3 13/16 in apart and 5 1/8 in on center, level.
A Metric railing
An 1,800 mm section with 41 mm spindles and a 100 mm max gap gets 13 spindles, 90.5 mm apart and 131.5 mm on center. At £2.40 each, the cost is £31.20.
FAQ
With 96 in between the posts, 1 5/16 in balusters, and a 4 in max gap, 18: (96 + 1.3125) ÷ 5.3125 = 18.32, rounded up to 19, minus 1. The gaps are 3 13/16 in, 5 1/8 in on center.
In the US, the IRC doesn't let a 4 in sphere pass between balusters on most guards, or a 4 3/8 in sphere on the open side of stairs. Keep the gap a little under the limit, and check the code where you build. With 2x2 balusters, that's about 5 in on center.
Measure the length between the posts level, not along the rail, and enter it as the section. The calculator gives the level gap and on-center spacing. Transfer each mark up to the rail with a level, or multiply the on-center spacing by the stair's slope factor to mark along the rail.
About 2.3 for 2x2 balusters at a 4 in max gap, or about 2.5 for 3/4 in metal balusters, but count each section on its own: every post adds a gap, so dividing the whole railing at once gives the wrong number.
Related calculators
- Deck Calculator
How many deck boards, joists, and screws to buy for a deck, with the cost.
- Stair Calculator
Number of steps, riser height, tread depth, and stringer length for a straight stair.
- Fence Calculator
How many posts, rails, boards or panels, and bags of concrete to buy for a fence.
- Framing Calculator
How many studs and plates to buy for wood-framed walls, with corners, openings, and the cost.
- Plywood Calculator
How many sheets of plywood or OSB to buy for subfloors, walls, and roofs, by sheet size.
- Shed Material Calculator
A materials list for a gable shed: studs, plates, sheathing, shingles, siding, and bags of concrete, with the cost.