Deck Railing and Baluster Spacing Calculator

Adding a deck railing? Enter the total railing length and the post spacing. You get the number of posts, balusters and rail length to buy.

Your shopping list

8Railing posts
101Balusters to buy
7Railing sections
  • Rail length, top and bottom88 ft

Gaps stay at 3.5 in or less so a 4 in ball cannot pass. Posts are assumed 3.5 in wide. Extra of 10% is included.

How to use the Deck Railing and Baluster Calculator

  1. Add up the length of every side that needs a railing.
  2. Pick the post spacing and type the baluster width.
  3. Read the posts, balusters and rail length.

The math behind it

Sections = railing length / post spacing, rounded up
Posts = sections + 1
Balusters per full section = (post spacing in inches – 3.5 in post width – 3.5 in target gap) / (baluster width + 3.5), rounded up

A worked example

What we typed in

  • Total railing length: 60 ft
  • Post spacing: 8 ft apart
  • Baluster width: 1.5 in
  • Extra for mistakes and cuts: 10%

What we got

  • Railing posts: 9
  • Balusters to buy: 159
  • Railing sections: 8
  • Rail length, top and bottom: 132 ft

For a related part of your project, use the Fence Cost Calculator.

Tips from the job site

  • Gaps stay at 3.5 in or less, because a 4 in ball must not pass through.
  • Most codes need a railing on decks 30 in or more above the ground, at least 36 in high.

Common questions

How many balusters do I need for 40 ft of railing?

With 6 ft post spacing and 2×2 balusters you need about 91 balusters, plus extra for mistakes.

When does a deck need a railing?

Usually when the deck is 30 in or more above the ground. Check your local code.

See all Deck Calculators.

Last checked: (worked example and form display).

Baluster spacing: check each clear opening

This estimate treats post spacing as centre-to-centre and assumes 3.5 inch-wide posts. For a 6 ft span, the clear opening is 72 − 3.5 = 68.5 inches. Thirteen 1.5 inch balusters leave fourteen equal gaps: (68.5 − 13 × 1.5) ÷ 14 = 3.5 inches.

The shopping list allows full-size sections before extra; the last section may be shorter. Measure each actual opening, and follow your railing manufacturer and local rules for post spacing, openings and guard height. This tool does not check structural capacity.