Skip to content
Skills / Deck & Fence Construction / Deck and Fence Building / Building Deck Guards and Handrails
Deck & Fence Construction

Building Deck Guards and Handrails

15 min read Training Guide

Tell when a deck needs a guard, anchor guard posts so they hold a 200-pound push, space balusters under 4 inches, and fit graspable stair handrails.

Table of contents

A guard is the barrier along the open edge of a deck or stair that keeps people from falling off. A handrail is the rail you grip while you climb or descend. People lean on guards, sit on them and fall against them, so the posts have to hold far more than they seem to. A guard that looks solid but wobbles at the base when you push it is a fall waiting to happen.

Numbers here come from IRC Sections R312 (guards), R311.7.8 (handrails) and R507.10 (deck guards), plus the American Wood Council's DCA 6 deck guide. The 2024 IRC moved the handrail rules from R311.7.8 to R320 and the guard rules from R312 to R321, and the edition your jurisdiction adopted is the one that applies. Local amendments and the adopted edition win. Buildings under the International Building Code, such as many commercial and some multifamily projects, can require taller guards, often 42 inches, so check the plans.

What You Will Be Able to Do

  • Decide where a guard is required and how tall it must be.
  • Explain the loads a guard must resist.
  • Anchor guard posts so they do not rotate or pull out of the rim.
  • Lay out balusters so no opening passes a 4-inch sphere.
  • Build a stair handrail with the right height, grip and returns.

When a Guard Is Required

The IRC requires a guard on any open-sided walking surface, including decks, stairs and landings, that is more than 30 inches above the floor or grade below at any point within 36 inches horizontally of the edge.

That last part catches people. Measure down from the edge, and also out 36 inches from it. If the ground slopes away and drops below 30 inches anywhere within that distance, the guard is required, even if the drop right at the edge is less.

Location Minimum guard height
Deck, porch, balcony or landing 36 inches above the walking surface
Open side of a stair 34 inches above the line connecting the nosings
Stair guard whose top also serves as the handrail 34 to 38 inches above the nosing line

DCA 6 recommends measuring guard height from the seat of any fixed bench built against the guard, not from the deck surface, because people stand on benches.

Loads a Guard Must Resist

Under the IRC, the top of a guard must hold a 200-pound load applied at any point along its top, and the infill, such as balusters or panels, must hold 50 pounds spread over 1 square foot.

A 200-pound push at the top of a 36-inch guard puts a large twisting force on the post base. DCA 6 works the math: 200 pounds acting about 39-1/2 inches above the top bolt in the post is 200 x 39.5 = 7,900 inch-pounds. That leverage is why the attachment at the bottom of the post matters more than the post itself.

Guard Posts

Size and Lumber

  • DCA 6 calls for guard posts at least 4x4 nominal, of a grade and species with an adjusted bending value of at least 1,100 psi. No. 2 grade of the common deck species qualifies under its assumptions.
  • The joist or rim the post bolts to must be at least a 2x8.
  • The 2021 IRC says a 4x4 post carrying guard loads must not be notched where it connects to the framing. A notch cuts away half the post right where the leverage is greatest.

Attaching to the Framing

The common failure is a post bolted to a rim joist that rotates. The bolts hold, but the rim twists outward, because nothing ties it back to the rest of the deck. The IRC says that where a guard attaches to the side of a joist or beam, that member must be connected to the joists beside it so it cannot rotate, and connections that rely only on fasteners pulled out of end grain are not allowed.

DCA 6 shows tested details for doing this:

  1. Post on an outside joist, parallel to the joists. Through-bolt the post to the outside joist. Add blocking from that joist to the next joist in, and tie them with a hold-down anchor, a heavy steel bracket made to resist pulling.
  2. Post on a rim joist, perpendicular to the joists. Through-bolt the post to the rim, then tie the rim to the nearest joist with a hold-down so the rim cannot roll.
  3. Hold-down capacity. DCA 6 requires hold-downs with an allowable tension load of at least 1,800 pounds for a guard up to 36 inches tall. A taller guard needs a designed connection.
  4. Bolt spacing. Follow the figure's minimum and maximum spacing. DCA 6 keeps bolts in a joist or rim no more than 5 inches apart so the wood can shrink without splitting.

Install the hold-downs exactly as their maker says, with every listed fastener. Use hardware and fasteners with a coating rated for treated wood.

Posts on Top of the Decking

Some rail systems mount posts on top of the deck boards with a base plate. The IRC requires these to connect to the framing or blocking below and to follow the maker's instructions, so the load reaches the joists. Screws into deck boards alone do not do that. Add the blocking the system calls for before the decking goes on.

Manufactured Rail Systems

Aluminum, vinyl, composite and cable rail kits are tested as complete assemblies. Use the posts, brackets, spans and fasteners in the kit's instructions. Composite and plastic guards must carry a label showing ASTM D7032 compliance and their allowed span. Do not mix parts from different systems.

Building the Rail

A typical site-built wood guard has a bottom rail, a top rail, balusters fastened to both, and often a flat cap on top.

  1. Set posts at the spacing your detail or rail system allows.
  2. Cut top and bottom rails to fit between the posts, or run them past and splice them over a post. Never splice between posts.
  3. Fasten rails to posts with screws or brackets rated for the job, into solid wood.
  4. Fasten each baluster to each rail with at least two screws, so it cannot spin.
  5. Add the cap, fastened down into the top rail.

Spacing Balusters

The IRC says no opening in a required guard may let a 4-inch sphere pass, from the walking surface up to the required height. That includes the gap between the deck and the bottom rail. On stairs, two looser limits apply: the guard on the open side may not pass a 4-3/8-inch sphere, and the triangle formed by a riser, tread and bottom rail may not pass a 6-inch sphere.

Worked example. The clear space between two posts is 70 inches. Balusters are 2x2s, 1-1/2 inches wide. You want every gap under 4 inches.

  1. With n balusters, there are n + 1 gaps.
  2. Try 13 balusters: 13 x 1.5 = 19-1/2 inches of wood.
  3. 70 - 19.5 = 50-1/2 inches of open space, divided into 14 gaps.
  4. 50.5 / 14 = 3.61 inches per gap, just over 3-9/16.
  5. Every gap is under 4 inches, so it passes. With 12 balusters the gaps would be 4 inches, which fails.

Cut a spacer block to the gap and use it for each baluster, then measure the last few to keep the spacing even. Many builders aim for gaps no wider than about 3-3/4 inches, so a bowed baluster or shrinking wood does not open a 4-inch gap later.

Cable infill must stay tight enough that the 4-inch sphere cannot push through between cables. Check it after installation and again as the cables stretch.

Stair Handrails

Where and How High

  • A handrail is required on at least one side of every flight with four or more risers.
  • Its top must be 34 to 38 inches above the line connecting the tread nosings, measured straight up.
  • It must run continuously from a point directly above the top riser to a point directly above the bottom riser.
  • Its ends must return to a wall, a guard or a post, so a sleeve or bag strap cannot catch on an open end.
  • A handrail beside a wall needs at least 1-1/2 inches of clearance from the wall, and it may not project more than 4-1/2 inches into the stair width.

Grip

A flat 2x4 or 2x6 is not a handrail. A hand cannot close around it, and a slipping person cannot hold on. The IRC requires one of these shapes, or one with equal graspability:

Type Rule
Type I, round Outside diameter 1-1/4 to 2 inches
Type I, other shapes Perimeter 4 to 6-1/4 inches, cross section no more than 2-1/4 inches
Type II Perimeter over 6-1/4 inches, with a finger recess on both sides as the code describes

Lumberyards sell milled handrail profiles that meet these rules, and rail kits include them. Mount the rail on brackets screwed into posts or solid blocking, at the spacing the bracket maker gives.

Tying the Stair Guard In

The stair guard and handrail need posts at the top and bottom of the flight.

  • At the top, bolt the post to the deck framing the same way as a deck guard post, with its rotation blocked.
  • At the bottom, DCA 6 attaches the stringers to a guard post that sits on its own footing, and bolts them where a guard post is required.
  • Set the stair guard height from the nosing line, not from each tread. Lay a straightedge across the nosings to find it.

Testing Your Work

There is no field test in the code, but there is a practical check. Push and pull hard on the top of each post and on the rail at midspan. A post that moves at its base, a rim that rolls, or a rail that flexes a lot means the connection is wrong. Fix it before anyone uses the deck. Run a 4-inch ball or gauge through the openings, including under the bottom rail.

Common Mistakes

Mistake What it costs
Measuring the 30-inch drop only at the edge A missing guard where the ground falls away
Notched 4x4 post bolted to a bare rim A post that rotates out under a push
Splicing a rail between posts A weak point exactly where people lean
Balusters with 4-inch gaps A gap a child can slip through
Flat 2x6 as a stair handrail Nothing to grab in a fall
Handrail ends left open Sleeves and straps catch and pull people off balance

Check Your Understanding

1. The deck edge is 26 inches above grade, but the yard drops to 33 inches below the deck surface 2 feet out from the edge. Is a guard required?

Yes. The surface is more than 30 inches above grade at a point within 36 inches horizontally of the edge.

2. A crew notches 4x4 guard posts and bolts them to the rim joist with nothing else. What is wrong?

The 2021 IRC bars notching a 4x4 guard post at its connection, and the rim must be tied to the next joist so it cannot rotate. Use an unnotched post and a hold-down detail.

3. Posts are 66 inches apart in the clear, and balusters are 1-1/2 inches wide. Do 12 balusters work?

12 x 1.5 = 18 inches of wood, leaving 48 inches in 13 gaps. 48 / 13 = 3.69 inches, so yes, every gap is under 4 inches.

4. A stair has four risers. A client wants a flat 2x6 cap as the only rail. What do you tell them?

Four risers require a handrail, and a flat 2x6 is not graspable. Add a profile that meets the Type I or Type II grip rules, 34 to 38 inches above the nosings.

Key Takeaways

  • A guard is required where the surface is more than 30 inches above grade within 36 inches of the edge.
  • Guards are at least 36 inches tall on decks and 34 inches on stair sides, measured from the nosing line.
  • The top must hold 200 pounds, so tie the rim or joist back with hold-downs, and do not notch 4x4 posts.
  • No opening may pass a 4-inch sphere, including under the bottom rail.
  • Handrails are required at 4 or more risers, 34 to 38 inches high, graspable, continuous and returned at the ends.