Since 2010 · Powering 2M+ tool runs every month
Since 2010
Add to Chrome

My Toolbox

Automatic Mode

No saved tools yet.

Go Premium
Related tools
Decking CalculatorDrywall CalculatorStair CalculatorDeck Stain CalculatorFence Calculator
Home Page > Miscellaneous > Construction And DIY Calculators

Baluster Spacing Calculator

Calculate even baluster spacing for a deck, stair or porch railing so every gap stays under the 4-inch code limit. Get the baluster count, even gap, on-centre spacing and a tape-measure layout list in imperial or metric units.

Free to useNo sign-up requiredInstant Results
Baluster Spacing CalculatorTry it now — free ▼
Quick examples — click to fill the form, then press Calculate:
Measure inside face of one post to inside face of the other.
in
Common: 1.5" (2×2), 0.75" metal. Default 1.5".
in
Code limit is 4". Default 4".

Embed Baluster Spacing Calculator Widget

About Baluster Spacing Calculator

The Baluster Spacing Calculator works out how to space the balusters (also called spindles or pickets) in a deck, stair, or porch railing so the gaps are even and stay under the code-required 4-inch limit. Enter the railing run between your posts, the width of one baluster, and the maximum gap, and you get the exact number of balusters, the even gap between them, the on-center spacing, and a full tape-measure layout list you can take straight to the job site.

The 4-Inch Sphere Rule

Under the International Residential Code (IRC) and most local building codes, the openings in a guardrail must be small enough that a 4-inch (100 mm) sphere cannot pass through. The rule protects small children from getting through or stuck in the railing. In practice this means the clear gap between balusters must be less than 4 inches. Many builders target about 3½ to 3⅞ inches to leave a safety margin. This calculator always sizes the gaps so a 4-inch sphere will not fit.

Baluster Spacing Formula

The key idea is a fencepost count: in a railing between two posts, if you install n balusters you create n + 1 gaps — one at each end and one between every pair. So the railing run is split like this:

Run = Balusters + Gaps
$$\text{run} = n \times \text{width} + (n + 1) \times \text{gap}$$
Step 1 — Minimum Balusters
$$n = \left\lceil \frac{\text{run} - \text{max gap}}{\text{width} + \text{max gap}} \right\rceil$$
Step 2 — Even Gap
$$\text{gap} = \frac{\text{run} - n \times \text{width}}{n + 1}$$
Step 3 — On-Center Spacing
$$\text{on-center} = \text{width} + \text{gap}$$

Step 1 finds the fewest balusters that keep every gap at or below your limit (rounding up because you cannot install a fraction of a baluster). Step 2 spreads the leftover space evenly, and Step 3 gives the mark-to-mark distance you actually measure with a tape.

How to Lay Out the Marks

Measuring each gap by hand invites errors that pile up across a long railing. Instead, mark centers from one post. The center of baluster number i sits at:

Center of Baluster i
$$c_i = i \times \text{on-center} - \frac{\text{width}}{2}$$

So the first center is one gap plus half a baluster from the post, and each following center is one on-center step further along. The calculator prints the full list of these marks for you.

Baluster Spacing Chart (1½-inch balusters, 4-inch max gap)

Railing RunBalustersEven GapOn-Center
36 in6≈ 3.8571 in≈ 5.3571 in
48 in8≈ 4.0000 in≈ 5.5000 in
72 in13≈ 3.7500 in≈ 5.2500 in
96 in17≈ 3.9167 in≈ 5.4167 in
120 in22≈ 3.7826 in≈ 5.2826 in

These are typical results — your exact numbers depend on your railing run and baluster width, so always calculate for your own project.

What Affects Baluster Spacing?

📏 Railing Run

The clear opening between posts. Measure inside face to inside face — the balusters are distributed inside that span.

🪵 Baluster Width

Wider balusters (2×2 vs slim metal) eat more of the run, so you need more of them or the gaps shrink.

🚫 Code Gap Limit

The 4-inch sphere rule caps the clear gap. Tighter limits (some stairs use less) mean more balusters.

📐 Post Placement

Each railing section between posts is calculated on its own, since runs are rarely all the same length.

How to Use This Calculator

  1. Measure the railing run: Measure the clear opening between the two posts, inside face to inside face.
  2. Enter the baluster width and maximum gap: Use the true width of one baluster and the code limit (4 inches for most guardrails).
  3. Click Calculate: Get the minimum baluster count, the even gap, and the on-center spacing instantly.
  4. Mark and install: Use the layout list to mark each baluster center from the post, then fasten the balusters at those marks.

Frequently Asked Questions

What is the maximum gap between balusters?

Under the IRC and most building codes, a 4-inch sphere must not be able to pass through any opening in a guardrail, so the gap between balusters must be less than 4 inches. This calculator sizes the gaps to stay below that limit.

How do you calculate even baluster spacing?

For a railing between two posts with n balusters there are n + 1 gaps, so run = n × width + (n + 1) × gap. First find the fewest balusters that keep every gap under the limit: n = ceiling of (run − max gap) ÷ (width + max gap). Then the even gap = (run − n × width) ÷ (n + 1).

What is on-center spacing for balusters?

On-center spacing is the distance from the center of one baluster to the center of the next. It equals one baluster width plus one gap. Marking centers on-center from the post is the most accurate way to lay out balusters.

Does the baluster width matter for spacing?

Yes. Wider balusters take up more of the run, so you either need more of them or the gaps get smaller. The gap that must stay under 4 inches is the clear space between balusters, not the on-center distance, so the baluster width must be included in the calculation.

How many balusters do I need per foot?

With standard 1½-inch balusters and a 4-inch code gap, on-center spacing works out to roughly 5.4 inches, or about 2.2 balusters per foot of railing. The exact number depends on your railing run and baluster width, which this calculator solves precisely.

Should I measure the run between posts inside to inside?

Yes. The railing run used here is the clear opening between the two posts, measured from the inside face of one post to the inside face of the other. The balusters and gaps are distributed inside that opening.

Additional Resources

Reference this content, page, or tool as:

"Baluster Spacing Calculator" at https://MiniWebtool.com/baluster-spacing-calculator/ from MiniWebtool, https://MiniWebtool.com/

by miniwebtool team. Updated: July 6, 2026

Construction And DIY Calculators:

Top & Updated:

Plant Spacing CalculatorRoofing CalculatorLumber CalculatorView all →
Home Page > Miscellaneous > Construction And DIY Calculators > Baluster Spacing Calculator