Railings & finishes

Stair baluster spacing calculator

A baluster spacing calculator works out how many spindles fit along a rail run so every gap stays under a safe maximum, commonly cited as 4 in, while keeping the spacing perfectly even from post to post. Eyeballing baluster spacing almost always ends in one gap that's noticeably wider than the rest.

The math is simple once you set it up: total run, baluster width, and a maximum gap in, and the calculator solves for how many balusters you need and what the resulting even gap actually is.

Baluster spacing calculator

Post face to post face. On a stair, measure horizontally.

Actual width at the rail or shoe, e.g. 1¼ in square.

Commonly cited as under 4 in so a 4 in sphere cannot pass; confirm locally.

18 balusters, 3 7/8″ clear gap, 5 1/8″ on center.

Balusters

18

Clear gap

3 7/8″

max 4″

On-center spacing

5 1/8″

First center

4 1/2″

from the post face

Layout

19 gaps

equal at both ends

3 7/8″
Layout stick view: equal gaps at both posts.
Centerline marks from the first post

4 1/2″ · 9 5/8″ · 14 3/4″ · 19 7/8″ · 24 15/16″ · 30 1/16″ · 35 3/16″ · 40 5/16″ · 45 7/16″ · 50 9/16″ · 55 11/16″ · 60 13/16″ · 65 15/16″ · 71 1/16″ · 76 1/8″ · 81 1/4″ · 86 3/8″ · 91 1/2″

The 4 in rule (hedged)

Many residential and commercial guard codes commonly cite a maximum gap of 4 in between balusters, based on the idea that a 4 in sphere shouldn't be able to pass through the guard. This is a widely referenced figure, but it's not universal, so confirm the exact requirement with your local building department, especially for stairs versus level guards where some jurisdictions allow a larger gap.

Whatever maximum you use, the calculator treats it as an upper bound: it finds the smallest number of balusters that keeps every gap at or under that number, evenly distributed.

The spacing formula

For a rail section of a given length with balusters of a known width, the gap between adjacent balusters if you use n balusters is: gap = (length − n × balusterWidth) ÷ (n + 1). The + 1 accounts for the gaps at both ends between the balusters and the posts.

To find the minimum baluster count, start with n = 1 and increase it until the computed gap drops to or below your maximum. Larger n always produces a smaller gap, so this is a straightforward search, not a judgment call.

Solving it step by step

Take a 96 in rail run with 1¼ in square balusters and a 4 in maximum gap. Trying n = 17 gives gap = (96 − 17×1.25) ÷ 18 = (96 − 21.25) ÷ 18 ≈ 4.15 in, still too wide. Trying n = 18 gives gap = (96 − 22.5) ÷ 19 ≈ 3.87 in, which clears the 4 in maximum.

So 18 balusters is the minimum count for that run, spaced at an even 3.87 in gap, center-to-center spacing of 3.87 + 1.25 = 5.12 in.

Baluster spacing on a rake vs. a level rail

On the sloped part of a stair (the rake), baluster gaps are still measured horizontally, the same 4 in sphere rule applies to the horizontal opening, not the distance measured along the slope. Because the rail is angled, balusters on a rake are usually cut at matching top and bottom angles so their faces stay plumb.

At landings and level guard sections the balusters are typically vertical and the spacing math is identical to a level rail: same formula, just without the compound angle cuts.

The 'two balusters per tread' shortcut

A rule of thumb some finish carpenters use on stairs is roughly two balusters per tread, which tends to land gaps comfortably under 4 in for standard 10–11 in tread depths and typical 1–1.5 in baluster stock. It's a fast field check, but it isn't a substitute for calculating the actual gap on your specific tread depth and baluster width.

For wider treads or thinner balusters, two per tread can leave a gap over 4 in, so always verify with the formula rather than relying on the rule of thumb alone for a code-covered guard.

Marking baluster locations on site

  1. Measure the actual rail run between posts (or between the newel and the first post) after the rail and posts are installed, not from a plan drawing.
  2. Run the numbers through the calculator to get baluster count and the even gap.
  3. Cut a spacer stick, or a story pole marked with the gap dimension, to transfer the spacing quickly without re-measuring for every baluster.
  4. Mark baluster centerlines on the rail and the shoe rail (or tread) working from one end, checking the last gap lands within tolerance of the calculated value.
  5. Install balusters working from both ends toward the middle so any small rounding error ends up in a less visible center gap.

Baluster count for common rail lengths

1¼ in balusters, 4 in maximum gap (illustrative, verify locally)
Rail lengthBaluster countResulting gap
36 in7≈ 3.66 in
48 in9≈ 3.68 in
72 in13≈ 3.85 in
96 in18≈ 3.87 in

Common mistakes

  • Spacing balusters center-to-center by a round number like 4 in without subtracting the baluster's own width, which produces a gap wider than intended.
  • Measuring the sphere rule along the sloped rail instead of horizontally on a raked section.
  • Assuming the plan-drawing rail length matches the as-built length after posts and trim are installed.
  • Ignoring that the gap at the newel post can differ slightly from the interior gaps if the layout isn't split from both ends.

Worked math

96 in rail section, 1¼ in balusters, 4 in max gap

Given

  • Rail run: 96 in
  • Baluster width: 1.25 in
  • Maximum gap: 4 in

Steps

  1. Try n = 17: gap = (96 − 17×1.25) ÷ 18 = 74.75 ÷ 18 ≈ 4.15 in (too wide)
  2. Try n = 18: gap = (96 − 18×1.25) ÷ 19 = 73.5 ÷ 19 ≈ 3.87 in (passes)
  3. Center-to-center spacing = 3.87 + 1.25 = 5.12 in

Use 18 balusters at a 3.87 in gap (5.12 in on center) for this 96 in run.

Questions

Stair baluster spacing calculator FAQ

How far apart should stair balusters be?

The gap between balusters is commonly limited to 4 in in residential guard codes so a 4 in sphere can't pass through, though this varies by jurisdiction. The exact even spacing depends on your rail length and baluster width, which is what this calculator solves for.

How many balusters do I need per foot?

It depends on baluster width and your target gap, but for 1¼ in balusters with a 4 in maximum gap, you typically need a baluster roughly every 5 in on center, so about 2.3 balusters per foot of rail.

How do you calculate baluster spacing?

Use gap = (rail length − n × baluster width) ÷ (n + 1), and increase n until the gap is at or below your maximum. This spreads the balusters evenly, including the end gaps against the posts.

Is the baluster gap measured on the slope or horizontally?

On a raked (sloped) stair rail, the sphere-rule gap is measured horizontally, not along the slope. Balusters on a rake are cut at an angle but the horizontal opening between them is what code reference values address.

Can I use two balusters per tread instead of calculating spacing?

Two balusters per tread is a common field shortcut that often works for standard tread depths and baluster widths, but it isn't guaranteed to meet a 4 in gap requirement on wider treads or thinner balusters, so it's worth checking the actual math.

Do glass panels use the same spacing rule as balusters?

Glass panel guards are generally evaluated as a solid infill rather than individual balusters, so the 4 in sphere rule for gaps between balusters typically doesn't apply the same way, though panel edge conditions and code requirements still vary by jurisdiction and should be checked locally.

Keep going

Important

Disclaimer

StairCalculator.app provides calculations and educational information. Building codes and construction requirements vary by location. Verify final dimensions and requirements with the applicable local building authority or qualified professional.

Calculations are only as accurate as the measurements and inputs you provide; small errors in measuring total rise or floor thickness can shift the results, so double-check field measurements before cutting materials, and treat every reference value and worked example on this site as illustrative rather than a guarantee of code compliance.