Free tool

Deck Railing & Baluster Spacing Calculator

Enter the railing run and your baluster size. The calculator places the posts, counts the balusters and gives you one exact, even gap that stays under the 4-inch rule, so the last baluster doesn’t end up with an odd space.

Your railing

Measure the run from the outside of the first post to the outside of the last post on one straight side.

Railing run

Posts

6 ft is typical for wood guards. Kits list their own maximum.

Balusters

Must stay under 4 in. 3¾ in. leaves a margin for boards that move.
Measure at the highest point within 36 in. of the deck edge.
Baluster layout

Calculating…

Deck railing height code

Under the International Residential Code, a deck needs a guard wherever the walking surface is more than 30 in. above the grade below, measured at any point within 36 in. horizontally of the edge. Key numbers:

IRC guard and handrail basics (planning reference)
RuleResidential requirement
When a guard is requiredDeck surface more than 30 in. above grade
Minimum guard height36 in., measured from the deck surface
Openings in the guardA 4-in. sphere must not pass through
Guards on the open sides of stairs34 in. min. from the nosings. Openings must stop a 4⅜-in. sphere
Triangle under stair guardMust not pass a 6-in. sphere
Stair handrail4+ risers. 34–38 in. above the nosings

Thirty-six inches is the IRC residential minimum. Many people find 42 in. feels safer on a high deck, and some products are made only in one height. Georgia adopts the IRC with state amendments, and your local permit office has the final word, so confirm before you build.

How the railing calculator spaces balusters

  1. Posts. The run is divided into the fewest equal sections that keep post centers within your maximum spacing. A 16-ft run with 6-ft max spacing gets three sections of about 5 ft 3 in. on center, which takes four posts.
  2. Clear span. Post spacing minus one post width gives the open space each section has to fill.
  3. Baluster count. The calculator finds the fewest balusters that keep every gap at or under your maximum.
  4. Exact gap. It then spreads them evenly: gap = (clear span − balusters × width) ÷ (balusters + 1). Cut a spacer block to that size and you won’t need a tape measure at every baluster.

Why aim for 3¾ in. rather than 315⁄16? Wood balusters shrink, twist and get bumped. Leaving a little margin keeps the railing passing the 4-in. sphere test years later, not just on inspection day.

Wood deck railing with square balusters and a flat top rail in front of a teal door; the railing calculator sets the gaps between balusters like these

Railing posts are a structural detail

Guards must resist a 200-lb load at the top in any direction, and that load runs through the posts into the deck framing. A 4×4 notched and lagged to the rim joist often can’t meet that alone. Through-bolts, blocking and tension-tie hardware are what make a railing solid. If your current railing wobbles, that’s a repair item, not a cosmetic one. See deck repair.

Looking at options beyond wood? Aluminum, cable and glass railings each have their own spacing rules and costs. See deck railing styles for a side-by-side, or price them in the deck cost calculator.

Related guides

For planning only. Railing kits, cable systems and glass panels have their own engineering and post spacing. Follow the manufacturer, and confirm code requirements with your permit office.

Railing FAQ

Deck railing questions

How high does a deck railing have to be?

Under the IRC, a residential deck guard must be at least 36 in. tall, measured from the deck surface, wherever the deck is more than 30 in. above grade. Guards along the open sides of stairs must be at least 34 in. from the nosings. Check your local code, since some jurisdictions amend these numbers.

What is the maximum baluster spacing on a deck?

The opening between balusters must not let a 4-in. sphere through, so the clear gap has to be less than 4 in. On the open sides of stairs, the IRC allows openings up to a 4⅜-in. sphere. Most builders aim for about 3½–3¾ in. to leave a margin.

How many balusters do I need per 6-foot section?

With 4×4 posts at 6 ft on center, the clear span is 68½ in. Using 2×2 balusters (1½ in.) and a 3¾-in. maximum gap, you need 13 balusters per section with a 3½-in. gap between each. Thinner ¾-in. metal balusters need 15.

Does a low deck need a railing?

If no point of the deck surface is more than 30 in. above the grade within 36 in. of the edge, the IRC doesn’t require a guard. Stairs with four or more risers still need a handrail. A sloped yard can push one side of a low-looking deck over 30 in., so measure the low side.

Ready when you are

Stop staring at that tired old deck. Let’s draw something better.

Free in-home consultation. Honest material guidance. A clear, fixed-price quote you can take to the bank — usually within 48 hours of our visit.

Talk to a real builder (470) 809-9234

Mon–Fri 7a–6p · Sat 8a–4p · Real local crews · No call centers