Baluster Spacing Calculator
Enter the space between posts and the baluster width to get the number of balusters and the exact gap.

How to use the Baluster Spacing Calculator
- Choose what your distance means in “Distance entered is”: Clear distance between posts (the open space) or Post centre to centre. Then type the value in “Distance between posts” or “Post centre-to-centre distance”.
- Enter the “Post width”. Measure your post. A 4×4 post is 3½ in square.
- Pick a “Baluster type” from the list. If none match, choose Custom width.
- Enter the “Baluster width”. Measure the actual baluster from the front, not the nominal size on the label.
- Enter your “Maximum gap”. Use your own local limit.
- If the run is split into identical sections between posts, set “Number of sections”.
- Pick a “Layout”: Equal gaps (any count) or Odd count (one baluster on the centre line).
- Optional: type a number in “Use this many balusters (optional)” to test another count. Leave it blank to get the smallest count that keeps every gap at or under your maximum.
- Read the result lines: Balusters per section, Balusters for all sections, Equal gap, On-centre spacing, Clear distance used and Layout start (from the left post). Check any warning that appears.
The result updates as you type. The example buttons at the top of the form fill in a realistic case, and Reset restores the starting example. Some fields are under More options. Below the result, Copy result copies the figures, Copy link keeps all your inputs in the page address, and Print / save as PDF prints your inputs, result, calculation steps and the date.
How is the baluster spacing calculated?
The rule is simple: the opening between two balusters must not be larger than the maximum gap. The calculator first finds the smallest number of balusters that keeps every gap at or under that limit. It then spreads the remaining space evenly, so every gap is the same. Measuring from the left post and placing balusters at equal intervals keeps the layout consistent along the whole run.
Two sizes do most of the work: the clear distance between the posts and the width of each baluster. Terms vary. A spindle is another word for a baluster. A balustrade is the whole railing, including the posts, rails and balusters. The same method applies to deck railings and fence rails. Any run of balusters between two posts follows the same arithmetic.
What is the baluster spacing formula?
The number of balusters between two posts is:
n = ceil((space − max gap) ÷ (baluster width + max gap))
Ceil means round up to the next whole number. The equal gap is then:
Equal gap = (space − n × baluster width) ÷ (n + 1)
The divisor is n + 1 because there is one gap more than there are balusters: one at each post and one between each pair of balusters. On-center spacing is the baluster width plus the gap.
For example, take 72 in between posts, 1.5 in balusters and a 4 in maximum gap:
- n = ceil(68 ÷ 5.5) = ceil(12.36) = 13 balusters
- Equal gap = (72 − 19.5) ÷ 14 = 3.75 in
- On-center spacing = 1.5 + 3.75 = 5.25 in
You can enter a maximum a little under the code limit, so small variations in cutting or placing do not push a gap over it. For marking out, measure from the center of the span or cut a spacer block to the gap width so every gap matches.
Sources
- 2021 International Residential Code, section R312 (ICC public access) — guards required above 30 in (R312.1.1), 36 in minimum height (R312.1.2), 4-inch sphere and the stair exceptions (R312.1.3). Your state or city may amend these.
- American Softwood Lumber Standard PS 20 (NIST) — dressed sizes of nominal lumber (4×4 = 3½ × 3½ in, 2×2 = 1½ × 1½ in, 1×6 ≈ 5½ in wide).
Worked examples
| Input | Result |
|---|---|
| 72 in between posts, max gap 4 in | 13 balusters, gap 3.75 in (3 3/4 in) |
| 96 in between posts, max gap 3.75 in | 18 balusters, gap 3.63 in (3 5/8 in) |
| 6 ft post to post, max gap 4 in | 14 balusters, gap 3.87 in (3 7/8 in) |
| 180 cm between posts, max gap 10 cm | 13 balusters, gap 9.14 cm |
| 72 in between posts, max gap 4 in | 15 balusters, gap 3.8 in (3 13/16 in) |
Calculated by the tool above with these values.
Frequently asked questions
What is the difference between a baluster and a spindle?
They are the same part. Spindle is another word for baluster, and the term used often depends on the region and trade. The whole railing, including posts, rails and balusters, is called the balustrade.
What maximum gap should I enter?
The International Residential Code (IRC R312.1.3) requires guard openings that do not allow a 4-inch-diameter sphere to pass. On the open sides of stairs the 2021 IRC allows up to a 4-3/8-inch sphere (R312.1.3, exception 2). Local codes can differ, so check yours and enter that limit.
Why does the tool show an odd count layout?
The Odd count option places one baluster on the center line between the posts. This suits runs where a centered baluster looks better or where the layout must be symmetrical. The Equal gaps option works with any count.
What does the warning about the clear distance mean?
It means the clear distance between the posts is already at or under your maximum gap. No baluster is needed between those posts, so check your layout before you order material.
Can I use the results for a quote or material list?
Yes. The results may be used in commercial work, such as quotes, material lists and job sheets, with no attribution. Still confirm the final spacing against your local code and the manufacturer’s instructions.
Related tools
- Deck railing calculator — posts, balusters and rails for a deck.
- Stair railing calculator — handrail length, stair angle and balusters.
- Fence picket calculator — pickets, gaps and rails for a picket or privacy fence.
- Fence post concrete calculator — concrete bags per post hole.
- Fence stain calculator — gallons or litres of stain for your fence.
- Fence cost calculator — the materials list and total cost with your local prices.
- Pool fence calculator — fence length around a pool, panels, posts and CPSC barrier checks.
- Bollard spacing calculator — bollard count, clear gap and centre spacing for an opening.