Fence, railing and CCTV calculators

Baluster Spacing Calculator

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

Open on AccessShieldHub

Embed

Embed this tool

Copy this code into your website, blog or class page. The tool runs inside your page.

Please keep the credit link below the tool.

The baluster spacing calculator works out how many balusters (also called spindles) fit between two posts and the equal gap to leave between each one, so no opening is wider than the maximum you set. You enter the distance between posts, the post width, the baluster width and your maximum gap, and it shows the count, the gap and the on-center spacing you need to mark out. It runs in your browser, it is free, and it needs no sign-up. Nothing you type is uploaded. Use it for deck railings, stair balusters or any run of balusters between posts. The results are estimates for planning and ordering. Your local building code and the manufacturer’s instructions decide the final spacing and openings.
Baluster spacing calculator example

How to use the Baluster Spacing Calculator

  1. 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”.
  2. Enter the “Post width”. Measure your post. A 4×4 post is 3½ in square.
  3. Pick a “Baluster type” from the list. If none match, choose Custom width.
  4. Enter the “Baluster width”. Measure the actual baluster from the front, not the nominal size on the label.
  5. Enter your “Maximum gap”. Use your own local limit.
  6. If the run is split into identical sections between posts, set “Number of sections”.
  7. Pick a “Layout”: Equal gaps (any count) or Odd count (one baluster on the centre line).
  8. 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.
  9. 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

Worked examples

InputResult
72 in between posts, max gap 4 in13 balusters, gap 3.75 in (3 3/4 in)
96 in between posts, max gap 3.75 in18 balusters, gap 3.63 in (3 5/8 in)
6 ft post to post, max gap 4 in14 balusters, gap 3.87 in (3 7/8 in)
180 cm between posts, max gap 10 cm13 balusters, gap 9.14 cm
72 in between posts, max gap 4 in15 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.