Deck Railing Calculator
Lay out deck railing posts and balusters for any run, with a shopping list and the DCA 6 guard post attachment rules. Every gap stays under 4 inches.
4 posts at 5' 4" on center (3 sections), 12 balusters per section with ≈ 3 1/4" gaps (3.27").
Keep the bottom rail less than 4" above the deck surface. DCA 6 Figure 24 applies the 4" sphere there too.
Shopping list
- 4 × 4x4 guard posts, adjusted bending value ≥ 1,100 psi — do not notch
- 36 balusters (1 1/2" wide)
- About 32 ft of 2x4 for top and bottom rails
- About 16 ft of 2x6 or 5/4 board for the rail cap
- 8 × ½" through-bolts with washers (2 per post)
- 4–8 hold-down anchors with an allowable tension load ≥ 1,800 lb — one per post, or two where a post sits between joists or blocking (DCA 6 Figs. 25–26); for guards up to 36"
- 2x blocking at each post on an outside joist, with 10d threaded nails top and bottom, each side (Fig. 25)
Fasteners (DCA 6 example detail)
- Balusters: 72 #8 wood screws, 1 at top and bottom of each (DCA 6 detail for 2x2 wood balusters; for metal or composite, follow the manufacturer)
- 2x4 rails to posts: 24 #8 wood screws ≥ 2½" on the inside face, 2 at each rail end — or (2) 8d threaded nails at each rail end
- Rail cap to posts: 12 #12 × 3" screws (3 per post)
Clear space between posts: 5' 0 1/2". Buy ~10% extra. For a printable list of baluster marks, use the baluster spacing calculator. Based on the example guard in AWC DCA 6 (2015 IRC edition), Figure 24 and p. 19. Baluster spacing is our arithmetic.
Reading your results
The calculator splits your run into equal sections so posts are never more than 6' apart, center to center. It then fits the fewest balusters that keep every gap at or under your chosen maximum — the same gap between balusters and next to each post, so the railing looks even. The shopping list follows the example guard in DCA 6.
The rules this follows
- When you need a guard: where the deck surface is more than 30" above the ground at any point within 36" (3') of its open edge (IRC R312.1.1; DCA 6 p. 19 says "greater than 30" above grade").
- Height: at least 36" above the deck surface. Next to a built-in bench, the guard must also be 36" above the seat, so it ends up taller than 36" above the deck (see taller guards below).
- Openings: no opening may let a 4" sphere through: between balusters, between a post and the next baluster, between the deck and the bottom rail, and where the guard meets the house or a stair post.
- Posts: 4x4 minimum with an adjusted bending value of at least 1,100 psi, not notched, attached to a 2x8 or larger joist with two ½" through-bolts and hold-down anchor(s) with an allowable tension load of at least 1,800 lb.
- Taller guards: the prescriptive post connection only covers guards up to 36" high; a taller guard needs an engineered connection.
Worked example
A straight 16' run, 4x4 posts, 2x2 balusters, and a 3 1/2" maximum gap:
- 16' ÷ 6' = 2.7, so you need 3 sections and 4 posts, 5' 4" on center.
- Clear space between posts: 64" − 3 1/2" = 60 1/2".
- Fewest balusters with gaps ≤ 3 1/2": (60 1/2 − 3 1/2) ÷ (1 1/2 + 3 1/2) = 11.4 → 12 balusters per section.
- Actual gap: (60 1/2 − 12 × 1 1/2) ÷ 13 = about 3 1/4" — under 4".
Hardware per post
Each guard post bolts to the outside joist or rim joist with two ½" through-bolts and washers, spaced 2½" to 5" apart and at least 2" from the edges, plus a hold-down anchor with an allowable tension load of at least 1,800 lb — two anchors where a post sits between joists (Figure 26). Figure 25 shows the blocking required at posts on the outside joist. Install hold-downs exactly as the manufacturer specifies.
Common mistakes
- Notching posts to sit over the rim — DCA 6 says don't notch guard posts.
- Attaching posts to 2x6 framing — the joist or rim must be at least 2x8.
- Measuring gaps "about 4 inches." A 4" gap fails; every opening must be smaller.
- Bottom rail too high. The space between the deck and the bottom rail must also be under 4".
- Forgetting the bench. Next to a built-in bench, the guard must be 36" above the seat. Enter the full height from the deck; it's over 36" and needs an engineered post connection.
Code and safety notes
- Stair guards have their own rules (34" minimum height from the nosing, 4 3/8" sphere at the stair sides, and a 6" sphere at the triangle under the bottom rail). This calculator is for level deck runs.
- Glass, cable and other systems must follow the manufacturer's instructions and be approved by your building department.
- Your local building department has the final word. See all our deck calculators.
Sources
- DCA 6 — Prescriptive Residential Wood Deck Construction Guide (2015 IRC edition), GUARD REQUIREMENTS, Figures 24–26 — American Wood Council
Formulas and figures last reviewed: ·How we build & check our calculators