Construction calculators

Baluster Calculator

Updated Sep 22, 2026 By Infinity Calculator
Rate Formulas
Global Settings
Unit System
Inches uses a whole-number box plus a fraction list; all other units use decimals.

Baluster Width
in
in
in
in
in
in
in
in
in
in
Up to 10 sections (flat and staircase combined).
Layout Diagram
View Mode
Diagram is illustrative only and is not drawn to exact scale.
Step-by-Step Solution
Baluster Distribution

Introduction

This baluster calculator tells you how many balusters (spindles) you need and how far apart to set them. Type in your railing size, post width, and baluster width. It spaces everything evenly and checks the gaps against your local building code.

Most codes say a 4-inch ball must not fit through any opening in a guardrail. That rule changes by country, so you can pick your region (the United States, Canada, the UK, Ireland, Spain, Australia, France, or Germany) or set your own limit. Every result shows Pass or Fail.

Use the Baluster Count tab when you know the total length of your railing and the number of posts. Use the Baluster Spacing tab when you have several sections, like a deck with a flat run and a stair run. You can add up to 10 sections at once.

Stairs are handled too. Enter your riser height and tread depth, and the calculator works out the stair angle. It then gives you two sets of marks: one measured flat, and one measured along the slope of the handrail, so you can mark your rail and start drilling.

You also get:

  • The even gap between each baluster
  • On-center spacing for fast layout
  • A list of every baluster position
  • A layout drawing with a close-up view
  • Step-by-step math so you can check the work

Work in inches, feet, centimeters, or millimeters. Inch users get fractions down to 1/16", the way a tape measure reads. Always check your local code before you build.

How to use our Baluster Calculator

Enter your railing size, post size, and baluster width, and the calculator tells you how many balusters you need, the even gap between them, the on-center spacing, and whether the layout passes code.

Unit System: Pick inches, feet, centimetres, or millimetres. Inches gives you a whole number box plus a fraction list.

Jurisdiction / Code Maximum Gap: Choose your country or region. This sets the biggest gap allowed between balusters.

Custom Maximum Gap: Only shows if you pick "Custom." Type the largest gap your local code or spec allows.

Baluster Width: Pick your baluster type, or choose Custom. Use the shaft width, not the decorative face width.

Custom Baluster Width: Only shows if you pick Custom. Type the real width of one baluster.

Post Width: Type the actual face width of your posts. A 4×4 post is 3.5 in and a 6×6 post is 5.5 in.

Target Gap (optional): Leave blank to use the code limit. Type a value here to test a gap you want.

Baluster Count tab

Total Railing Length: Measure the whole run from end to end, including the posts.

Number of Posts: Count every post, including both ends. Two posts make one bay.

Post Width (this run): Change this if the posts in this run differ from your global post width.

Baluster Spacing (gap): Type the clear gap you want between balusters. The calculator tightens it so every gap is equal and legal.

Baluster Spacing tab

Add Flat Section / Add Staircase Section: Add up to 10 sections. Use flat for level railing and staircase for sloped railing.

Section Width: Measure the opening for that one section.

Width Measured: Tell the calculator how you measured: inside face to inside face, center to center, or outside to outside.

Span Direction (stairs): Choose if you measured flat across the floor (run) or along the slope (rake).

Riser Height (stairs): Type the height from one tread top to the next tread top.

Tread Depth (stairs): Type the depth of one step, nose to nose.

Results and diagram

View Mode: Switch the drawing between horizontal railing, stairs, or a kneewall.

Section shown in diagram: Pick which section you want drawn and worked out step by step.

Close-up detail: Zoom in to see the baluster width, clear gap, and on-center spacing side by side.

Calculate: Press it to update your results. Clear All resets the inputs back to the defaults.

What Are Balusters?

Balusters are the small upright posts that fill the space between a handrail and the floor, deck, or stair. People also call them spindles or pickets. They stop people and pets from falling through the railing, and they help hold the handrail steady. Balusters can be wood, metal, glass, or composite.

The 4-Inch Rule

Most building codes use a "sphere rule" for baluster spacing. In the United States, the IRC and IBC say a 4-inch ball must not pass through any opening in a guardrail. That means the clear gap between two balusters must be less than 4 inches. Other countries use their own limit:

  • United States: 4 in (101.6 mm)
  • Canada, United Kingdom, Ireland, Spain: 100 mm
  • France: 110 mm
  • Germany: 120 mm
  • Australia: 125 mm

The rule protects small children, who can slip through wide gaps. Always check with your local building office before you build, since city rules can be stricter.

Gap vs. On-Center Spacing

These two numbers are not the same, and mixing them up is the most common layout mistake.

  • Clear gap: the open air space between the side of one baluster and the side of the next one. This is the number the code cares about.
  • On-center (OC): the distance from the middle of one baluster to the middle of the next. It equals the gap plus the baluster width.

Example: a 1.5-inch baluster with a 3.875-inch gap gives 5.375 inches on center. You mark the on-center numbers on the rail, because it is faster and more exact than measuring each gap.

Measuring Your Railing

Posts take up space, so they must be subtracted before you divide up a run. A nominal 4×4 post is really 3.5 inches wide, and a 6×6 post is really 5.5 inches. Measure inside face to inside face between two posts to get the clear span, also called a bay. If you measured center to center or outside to outside, you need to remove one or two post widths first.

For baluster width, use the true shaft width, not the fancy decorative part. A 3/4-inch metal tube is 0.75 inch. A 2×2 wood baluster is really 1.5 inches.

Stair Balusters and the Rake

Stair railings slope, so the math changes a little. The slope is called the rake. Balusters on stairs still stand straight up and down, and the gap is still measured straight across, but the marks on the sloped handrail are spread farther apart than the marks on the level floor below.

The stair angle comes from the riser height and tread depth. A stair with a 7.5-inch rise and a 10-inch tread sits at about 36.9 degrees. To get the rake spacing, divide the level on-center spacing by the cosine of that angle. That is why stair sections usually need the same number of balusters as a flat run of the same horizontal length, but with wider marks on the rail.

Layout Tips

  • Always round the baluster count up. Rounding down makes gaps too wide and fails inspection.
  • Keep every gap equal, including the two end gaps next to the posts. Uneven ends look sloppy and can break code.
  • An odd number of balusters puts one baluster in the middle. An even number puts a gap in the middle.
  • Buy a few extra balusters for cuts, splits, and mistakes.
  • Guardrails on decks and landings usually must be at least 36 inches tall for homes, and stair handrails sit around 34 to 38 inches above the tread nose.

Good baluster spacing is about safety first, then looks. Even gaps that beat the code limit will pass inspection and give a clean, professional finish.


Formulas used

Number of balusters in a span (rounded up)
n = \left\lceil \frac{\text{net} - g_0}{b + g_0} \right\rceil
Even clear gap actually achieved
g = \frac{\text{net} - n \cdot b}{n + 1}
On-centre spacing
\text{OC} = b + g
Baluster centreline position (from inside face of start post)
x_i = i \cdot (g + b) - \frac{b}{2}, \quad i = 1,2,\dots,n
Net railing span and clear span per bay (count mode)
\text{Net} = L - P \cdot w_p, \qquad \text{Bay} = \frac{\text{Net}}{P - 1}
Total balusters for the run / all sections
N = n \cdot (P - 1), \qquad N_{\text{total}} = \sum_{k} n_k
Net span from measurement basis (post adjustment)
\text{net} = W - \begin{cases} 0 & \text{inside to inside} \\ w_p & \text{centre to centre} \\ 2 w_p & \text{outside to outside} \end{cases}
Stair pitch, rake length and rake-adjusted spacing
\theta = \arctan\!\left(\frac{R}{T}\right), \quad \text{rake} = \frac{\text{run}}{\cos\theta}, \quad \text{OC}_{\text{rake}} = \frac{\text{OC}}{\cos\theta}

Frequently asked questions

How many balusters do I need for a 10-foot deck railing?

About 21 balusters, if you use 2×2 wood balusters (1.5 in wide) between two 4×4 posts.

Here is the math:

  • 10 ft = 120 in total run
  • Take out two posts: 120 − (2 × 3.5) = 113 in of clear space
  • Each baluster plus its gap takes about 5.375 in
  • 113 ÷ 5.375 ≈ 20.3, so round up to 21

With 21 balusters, each gap comes out to about 3 11/16 in, which is under the 4-in limit.

How far apart should deck balusters be?

Less than 4 inches of open space between them in the United States. Most builders aim for 3 3/4 in to 3 7/8 in to leave a safety margin.

That is the clear gap, not the center-to-center distance. In Canada, the UK, Ireland, and Spain the limit is 100 mm. Australia allows 125 mm, Germany 120 mm, and France 110 mm.

How many balusters do I need per foot of railing?

Plan on about 2 to 3 per foot.

  • 2×2 wood (1.5 in): roughly 2.25 per foot
  • 1 in metal tube: roughly 2.4 per foot
  • 3/4 in metal tube: roughly 2.5 per foot

Thinner balusters need more pieces, because each one fills less of the gap. Posts eat into the run, so always work bay by bay for an exact count.

Can the gap between balusters be exactly 4 inches?

No. The code says a 4-inch sphere must not pass through the opening. An exact 4-in gap lets the ball slip through, so it fails.

Keep every gap under 4 in. Wood also shrinks and twists over time, so a gap of 3 3/4 in or 3 7/8 in is a safer target.

What is the 6-inch rule on stairs?

On the open side of a stair, the triangle made by the tread, the riser, and the bottom rail must not let a 6-inch ball pass through.

That bigger triangle gets its own rule because of the stair shape. Everywhere else on the guard, the normal 4-inch rule still applies between balusters.

What is the difference between a baluster, a spindle, and a newel post?

They are different parts of the same railing:

  • Baluster or spindle: the many small uprights that fill the space under the handrail. Both words mean the same thing.
  • Newel post: the big, strong post at the start, end, or turn of a railing. It carries the load and holds the handrail.
  • Balustrade: the whole railing system together.

How far apart should deck railing posts be?

Most builders keep guard posts no more than 6 feet apart, and 4 to 5 feet is common for a stiffer rail.

Wide spacing lets the top rail flex and sag. Check your local code and your railing maker's instructions, since some composite and metal systems cap the span at 6 ft or less.

How long should deck balusters be?

Measure the space between your top and bottom rail, then cut to fit. Most home deck guards must be at least 36 in tall.

With 2×4 rails top and bottom on a 36-in guard, balusters end up around 31 to 32 in long. Stock balusters are sold in 26, 32, 36, 39, and 42 in lengths, so buy the next size up and trim.

How do you attach balusters to a deck railing?

Use two fasteners at each end so the baluster cannot spin.

  • Wood balusters: two coated or stainless deck screws, or ring-shank nails, top and bottom
  • Metal tubes: baluster connectors, shoes, or screws driven through the rail into the tube end

Pre-drill wood near the ends to stop splits, and always use outdoor-rated fasteners so they do not rust and stain the wood.

How do you cut stair balusters at the right angle?

Balusters stay plumb, so only the ends get angled to match the sloped rail.

The cut angle equals the stair pitch. A stair with a 7.5-in rise and 10-in tread sits at about 37 degrees, so set your miter saw to 37 degrees off square. Cut one, test it against the rail, then cut the rest.

Do old railings with wide baluster gaps have to be fixed?

An existing railing built under an older code is often allowed to stay as it is. But once you rebuild, replace, or remodel that railing, the new work must meet current code.

If you have small kids or pets, close the gaps anyway. Wide openings are the exact hazard the 4-inch rule was written to stop.

Are horizontal balusters allowed by code?

Sometimes. The 4-inch sphere rule still applies, but some local codes limit horizontal rails and cables because kids can climb them like a ladder.

Ask your building office before you buy materials. Cable railings also need tight tension, since loose cable can spread past 4 in when pushed.