Baluster Spacing Calculator

Work out how many balusters a railing section needs and the equal gap between them, kept under the code sphere limit.

Free · No sign-up · Runs in your browser

How to use the baluster spacing calculator

Spacing balusters by eye or with a fixed spacer block usually leaves an odd gap at one post. This calculator finds the fewest balusters that keep every gap under your limit and then spreads them evenly, so the gaps at the posts match the gaps between balusters. It also gives the on-centre spacing for marking out, the total count for several identical sections and the number per tread for a stair.

  1. Choose units. US mode works in inches, metric in millimetres.
  2. Measure the clear space between the inside faces of the two posts, at the rail.
  3. Enter the baluster width as installed. A 2 × 2 is 1.5 in, and square metal balusters are often ½ or ¾ in.
  4. Set the maximum gap. Use a little less than the code sphere: 3.75 in for the US 4 in rule or about 95 mm for a 100 mm rule.
  5. Add the number of sections and a tread depth if you want totals for a whole deck or a count per stair tread.

Baluster spacing formula

Balusters per section, n = ceiling((clear space − max gap) ÷ (baluster width + max gap))
Equal gap = (clear space − n × baluster width) ÷ (n + 1)
On-centre spacing = equal gap + baluster width
Balusters per tread = ceiling(tread depth ÷ (baluster width + max gap))

The first line comes from the fact that a section with n balusters has n + 1 gaps. Rounding up guarantees the equal gap is no bigger than your maximum. Mark the first baluster centre at one gap plus half a baluster from the post, then step along by the on-centre spacing.

BalusterGap limitBalusters per 8 ft sectionEqual gap
1.5 in wood (2 × 2)3.75 in183.63 in
1.5 in wood (2 × 2)3.5 in193.38 in
0.75 in metal3.75 in213.65 in
0.5 in metal3.75 in223.70 in

Worked examples

An 8 ft deck section

The clear space between posts is 96 in, with 1.5 in balusters and a 3.75 in limit. The count is ceiling((96 − 3.75) ÷ 5.25) = ceiling(17.57) = 18 balusters. The equal gap is (96 − 27) ÷ 19 = 3.63 in, and the on-centre spacing is 5.13 in.

A metric balcony

A 2,400 mm section uses 40 mm balusters with a 95 mm limit to satisfy a 100 mm sphere rule. The count is ceiling((2,400 − 95) ÷ 135) = 18, the equal gap is (2,400 − 720) ÷ 19 = 88.4 mm and the centres are 128.4 mm apart.

A whole deck and its stair

A deck has three 70.5 in sections of 2 × 2 balusters. Each needs ceiling(66.75 ÷ 5.25) = 13 balusters with 3.64 in gaps, 39 in total. The stair has 10 in treads, so it needs ceiling(10 ÷ 5.25) = 2 balusters per tread, which gives 5 in centres and 3.5 in gaps.

Who this calculator helps

  • Architects detailing guards and checking that a baluster spec meets the sphere rule before it goes to site.
  • Deck builders and carpenters working out counts for ordering and marking out even spacing.
  • Building inspectors and plan reviewers checking guard openings quickly.
  • DIY builders replacing or adding balusters on stairs, porches and decks.

Practical tips

  • Plan the stair geometry first with the stair calculator, and the deck framing with the deck calculator.
  • For a garden boundary rather than a guard, use the fence calculator to count posts, rails and pickets.
  • Cut a spacer block to the equal gap, not the code maximum, so every gap is the same.
  • Check the bottom rail too: the gap between the bottom rail and the deck must also stop the sphere.
  • Buy a few spare balusters for splits, knots and miscuts.

Comparing railing styles for a client? Swap them on a photo of the deck or stair with AI Exterior Redesign.

From numbers to pictures

See the space before it's built.

Once the plan works on paper, BasedFrame turns a sketch, a massing model or a site photo into a photoreal render in seconds. Try Sketch to Render or Room Redesign with free credits.

Try BasedFrame free

FAQ

Baluster Spacing Calculator FAQ

What is the 4 inch rule for balusters?

Most US residential codes, including IRC R312.1.3, require that guard openings do not let a 4 inch sphere pass through, so the clear gap between balusters must be less than 4 inches. The rule is there to stop small children slipping through or getting their heads trapped. Many building codes outside the US use a similar 100 mm sphere rule.

How do I calculate baluster spacing?

Measure the clear distance between the posts. Subtract one maximum gap, divide by the baluster width plus the maximum gap, and round up to get the number of balusters. Then divide the clear distance minus the total width of all the balusters by the number of balusters plus one. That gives an equal gap that is under the limit.

How many balusters do I need per foot?

With 1.5 inch square balusters and gaps just under 4 inches, you need about 2.3 balusters per foot of railing, or roughly 3 balusters for every 16 inches. Thinner balusters need more: 3/4 inch round metal balusters at the same gap need about 2.7 per foot.

How many balusters per stair tread?

Two balusters per tread is typical for treads around 10 to 11 inches deep with 1.5 inch balusters, and three per tread is common with thinner balusters or where the maximum gap is smaller. The calculator works out the number per tread from the tread depth so the horizontal gap stays under the limit.

Is the gap different on stairs?

In the IRC, guards on the open side of stairs may have openings that do not pass a 4 3/8 inch sphere, and the triangle formed by the riser, tread and bottom rail must not pass a 6 inch sphere. Other codes keep the 4 inch or 100 mm rule on stairs too. Check the code your project is permitted under.

Why use 3.75 inches instead of 4 inches?

The code says a 4 inch sphere must not pass, so a gap of exactly 4 inches fails. Wood balusters can also shrink, twist or be installed slightly out of position. Designing to about 3.5 to 3.75 inches gives a margin so the finished railing passes inspection.

Do I measure between posts or post centres?

Measure the clear distance between the inside faces of the posts, because that is the space the balusters and gaps must fill. Measuring to post centres will give too many or too few balusters and an unequal gap at the ends.

How tall does a guard need to be?

The IRC requires guards where a walking surface is more than 30 inches above the grade or floor below, and residential guards must be at least 36 inches high, measured from the deck or the stair nosing line. Commercial guards under the IBC are generally 42 inches. Local amendments can change these heights.

Keep exploring

More free tools for architects

Turn any listing
into rooms that sell

Start with a Zillow link or a single photo. Redesign, stage, relight and walk buyers through every room, ready to list today.