Renovimo
A wooden railing post with its top and bottom rails

Deck railing calculator

Deck railing calculator: post spacing and balusters

Enter each straight run of railing and the post spacing your system allows. Get the posts, the fewest balusters that keep every gap under 4 inches, the rails and the hardware — run by run.

Enter your runs

Railing runs

A run is one straight length of railing, corner to corner. Measure each on its own — the sides of a deck are rarely the same — and list them in order round the deck. A corner post is shared by the two runs it joins; where the stairs leave the deck, tick the opening on the run after it and each side of the gap gets its own post.

Run
Run
Run

Posts and balusters

Optional

What will it cost?

Every material the calculator worked out gets its own price. Each field starts at a typical US figure so you have something to work from — change any of them to what your own supplier charges.

These prices are approximate. They are national US retail figures, and what you actually pay varies with your region, your supplier, the season and how much you buy at once. Treat them as a starting point, not a quote — always price the job from your own supplier's current figures before you order.

Your prices

Drilling pilot holes in a board before it is screwed down

Based on your result

What you'll need

Set the posts first and measure the real clear span between them before cutting balusters — a post a quarter inch out changes the gaps.

Railing posts
Bolted through the rim, never just screwed to it
Calculate above
Balusters
Cut to one length and gapped with a spacer block
Top and bottom rails
A 2 × 6 cap over a 2 × 4, or the system rail
Rail brackets
One at each end of every rail
Spacer block
Cut to the gap the result gives, so every baluster lands alike
1

The maths

How this deck post spacing calculator works

The code does not set a baluster count. It sets a test: a 4 in sphere must not pass through any opening in the guard. With n balusters in a clear span there are n + 1 gaps, so the question is simply the smallest n that brings every gap under 4 inches.

sections = ⌈ run ÷ max post spacing ⌉
clear span = run ÷ sections − post width
gap = (clear span − n × baluster) ÷ (n + 1)
n = ⌊ (clear span − 4) ÷ (4 + baluster) ⌋ + 1
posts = sections + 1
  1. 01

    Split each run into sections

    The run over the maximum post spacing, rounded up, so the posts are evenly spaced and none is further apart than the system allows.

  2. 02

    Take the posts out

    The clear span is the section less one post width: the space the balusters actually fill.

  3. 03

    Find the fewest balusters

    The smallest count for which every gap is under 4 in. One fewer and a gap reaches 4 in; the calculator checks both.

  4. 04

    Share the corners

    Runs are listed in order round the deck, and each corner post serves both runs it joins.

  5. 05

    Add the rails and hardware

    A top and a bottom rail on every run, a bracket at each rail end, and two screws top and bottom on every baluster.

Good to know

Deck railing questions, answered

Six feet on center is the common maximum for wood railing, and many aluminium and composite systems are rated for 6 or 8 ft sections. The railing system’s installation instructions set the figure; the calculator takes whatever you enter.

With 4 × 4 posts at 6 ft centres the clear span is 68½ in, and 1½ in wood balusters need 12 of them to keep every gap under 4 in — 3.88 in each. Metal ¾ in balusters need 14.

No opening in a deck guard may let a 4 in sphere pass through. It is written that way so a small child’s head cannot fit between the balusters, and it applies to the gaps between balusters and under the bottom rail.

At least 36 in above the deck surface for a home under the IRC, measured to the top of the rail. Some jurisdictions ask for more; check with the building department.

The IRC requires a guard where the deck surface is more than 30 in above the grade below at any point within 36 in of its edge. Below that height a railing is optional, though often still a good idea.

Keep estimating