Deck Board Calculator

Wood Deck Railing Calculator

Enter how many feet of railing you need. The calculator spaces the posts, fits the balusters so no gap is too wide and lists the rails to buy.

0

Railing section

Railing summary

What is Wood Deck Railing Calculator?

Wood Deck Railing Calculator is a free online tool that counts deck railing posts, balusters and rails and checks the 4-inch sphere rule.

Deck builders use the wood deck railing calculator to plan a deck railing that meets the International Residential Code (IRC). The tool spaces the posts evenly, fits the balusters so every gap stays under 4" (102 mm) and lists the top rail, bottom rail and cap rail.

Default balusters91
Posts8 × 4x4
Baluster gap3 1/4" (83 mm)
Sphere rule4" (102 mm)
  • Deck builders
  • Contractors
  • Carpenters
  • DIY homeowners

How Wood Deck Railing Calculator Works?

Wood Deck Railing Calculator works in 4 steps: it splits the railing into sections, fits the balusters, evens out the gaps and lists the rails.

  1. 1Split the railing into sections
  2. 2Fit the balusters
  3. 3Even out the gaps
  4. 4List the rails
Wood Deck Railing Calculator steps, using the default inputs on this page.
  1. Split the railing into sections. The railing is split into equal sections no longer than your max post spacing. 40 ft (12.2 m) of railing at 6 ft (1.83 m) max gives 7 sections and 8 posts.
  2. Fit the balusters. Each section gets enough balusters to keep every gap under your max gap. A section 5 ft 8 5/8" on center takes 13 balusters of 1 1/2" (38 mm).
  3. Even out the gaps. The gaps are spread evenly at 3 1/4" (83 mm), so a 4" (102 mm) sphere cannot pass. The railing takes 91 balusters.
  4. List the rails. Top and bottom 2x4 rails run the full 40 ft, which is 6 boards of 16 ft. A 2x6 cap rail adds 3 boards.

What Wood Deck Railing Calculator Uses?

Wood Deck Railing Calculator uses 6 inputs, 3 formulas and the IRC 4-inch sphere rule to return 5 results.

1Inputs 6

  • Railing length on all open sides, in ft
  • Railing height: 36" or 42"
  • Max post spacing: 4–8 ft
  • Post size: 4x4 or 6x6
  • Baluster width: 1 1/2" wood or 3/4" metal
  • Max gap: 3 1/2" or 3 3/4"

2Formulas 3

  • Sections = railing length ÷ max post spacing, rounded up
  • Balusters per section = (clear span − gap) ÷ (baluster + gap), rounded up
  • Gap = (clear span − balusters × width) ÷ (balusters + 1)

3Results 5

  • Balusters
  • Posts
  • Baluster gap
  • Top and bottom rails
  • Cap rail
What goes into Wood Deck Railing Calculator, how it is worked out and what comes back.
IRC guard rules for decks
RuleIRC value
Guard requiredDeck surface over 30" (762 mm) above grade
Guard height36" (914 mm) min
Opening limitA 4" (102 mm) sphere cannot pass
Stair guard openingA 4 3/8" (111 mm) sphere cannot pass

Wood Deck Railing Calculator FAQ

How many balusters do I need for 40 feet of deck railing?

40 ft (12.2 m) of deck railing needs 91 balusters of 1 1/2" wood at 6 ft post spacing. The railing splits into 7 sections with 13 balusters each and 3 1/4" gaps. Metal 3/4" balusters raise the count to about 3 per foot.

How far apart should deck balusters be?

Deck balusters must be close enough that a 4" (102 mm) sphere cannot pass between them. Most builders aim for a 3 1/2" (89 mm) gap to leave room for wood movement. The calculator spaces the gaps evenly in each section.

How tall does a deck railing have to be?

A deck railing has to be at least 36" (914 mm) tall under the IRC. Many building codes for commercial and multi-family decks ask for 42" (1.07 m). Pick 42" in the calculator for a taller guard.

How far apart can deck railing posts be?

Deck railing posts are usually spaced no more than 6 ft (1.83 m) apart. Wood rails sag over longer spans, and post-mounted railing kits list their own max span. Shorter spacing adds posts and lowers the balusters per section.

More deck calculators

15 free tools
Deck Board CalculatorThe full board count with a live layout, cut plan and shopping list.