Deck railing height: the short answer

A deck guard must be at least 36 in (914 mm) high under the residential code used in the City of Alexandria, Virginia, typical deck details. You need one when the deck is more than 30 in (762 mm) above grade. Measure that drop at a point 36 in out from the deck's edge.

Alexandria's typical deck details are based on the 2021 Virginia Residential Code. The American Wood Council's deck construction guide, DCA 6, gives the same 30 in trigger.

Stairs follow their own numbers: handrails sit 34 to 38 in (864 to 965 mm) above the nosings. Some codes for other buildings ask for 42 in (1,067 mm), so check which code your deck falls under. This guide is for planning; your building department has the final word.

When a deck needs a guard

Measure the drop, not just the deck. Alexandria says a guard is required when a deck is more than 30 in above grade at a point 36 in from the deck's edge.

That 36 in matters on sloped yards. Say your deck is 26 in (66 cm) above the ground at its edge, and the ground falls away. At 36 in out, the ground is 32 in (81 cm) below the deck, so that edge needs a guard.

Under 30 in, the rule does not call for a guard. You may still want one where people sit near the edge or where children play.

Safety: raised deck edges are a fall risk until the guards are in, as our deck board calculator warns. When you work from a ladder to fit posts or rails, keep "three points of contact".

How to measure deck railing height

  • Deck guards: measure straight up from the walking surface to the top of the guard. On a deck, that is the top of the deck boards.
  • Benches at the edge: DCA 6's commentary notes that the code allows measuring from the walking surface. It recommends measuring from the fixed seating where seats sit next to the guard.
  • Stairs: measure stair guards and handrails from the nosing line. Alexandria and DCA 6 both measure from the tread nosings.

A bench changes the math. Take a built-in seat 18 in high: a guard measured from the seat stands 18 + 36 = 54 in above the deck boards.

Deck railing height and opening rules at a glance

PartRuleSource
Guard neededDeck more than 30 in (762 mm) above grade, 36 in out from the edgeAlexandria; DCA 6
Deck guard heightAt least 36 in (914 mm)Alexandria
Guard openingsA 4 in (102 mm) sphere must not passAlexandria; DCA 6
Stair guard height34 to 38 in from the nosing lineAlexandria
Stair triangle openingA 6 in (152 mm) sphere must not passAlexandria
Handrail4 or more risers; 34 to 38 in above the nosingsAlexandria; DCA 6
Guard load200 lb (890 N) in any direction; infill 50 lb on 1 sq ftDCA 6 commentary
Other building codes42 in (1,067 mm) minimumDublin, California (2025 California Building Code)

The 42 in row comes from the guards and handrails handout of Dublin, California. It cites section 1015 of the 2025 California Building Code. It also lists a 34 to 38 in stair guard as an exception for R-3 and individual R-2 dwelling units. Ask your building office whether your deck follows the residential code or the building code.

Openings, balusters and shrinkage

The 4 in sphere rule covers the openings in the guard, Alexandria says. DCA 6's commentary includes the openings under fixed benches used in place of guards. Alexandria adds one detail for wood: space wet lumber so that shrinkage does not open the gaps past the limit.

On a stair, the triangular opening at the steps may be larger, up to the 6 in sphere. The rest of the stair guard follows the deck guard rules.

Guard posts and how they attach

Most of the guard rules are about its posts. Alexandria's typical deck details and DCA 6 set these prescriptive rules for wood guards:

  • Post size: at least a 4x4. DCA 6 also asks for an adjusted bending design value of at least 1,100 psi.
  • Spacing: Alexandria spaces guard posts no more than 6 ft (1.8 m) apart.
  • No notching: Alexandria prohibits notching guard posts.
  • Bolts and hold-downs: 1/2 in through-bolts with washers, plus hold-down anchors rated for at least 1,800 lb. They go into the end joist or rim joist.
  • Framing: joists and rim joists that take guard posts must be at least 2x8, DCA 6 says. Alexandria does not allow guards on decks framed with 2x6 joists. It adds full-depth 2x blocking in the first interior bay.

So the railing starts with the framing. If you are still planning joists, our guide on deck joist spacing covers sizes and spacing. A material estimate is not an "engineered design", so check the guard design with your building department.

Stairs: handrails and stair guards

Stairs with 4 or more risers need a handrail on at least one side, DCA 6 says. It runs from directly over the lowest riser to directly over the highest one. At each end, it returns to the guard or wall.

The rail must be graspable. In DCA 6, a Type I handrail has a perimeter of at least 4 in and not more than 6-1/4 in. Larger shapes need a finger recess on both sides.

For the stair itself, see deck stair rise and run. It covers the step sizes the handrail follows.

Railing kits, composites and other woods

  • PVC systems: Alexandria allows PVC guards and guard systems that have a valid evaluation report. Ask for that report when you buy a kit.
  • Imported hardwoods: Alexandria does not allow ipe and other non-native lumber in guards built from its details.
  • Wood guards: Alexandria's detail uses 2x4 runners, a 2x6 or five-quarter cap and 2x2 balusters spaced to meet the opening limit.

Do you need a permit for a deck railing?

Check the deck's permit first. Our deck board spacing guide notes that a deck can skip a permit only if it is 200 sq ft (18.6 m²) or less and nowhere over 30 in above grade. If any part of your deck is more than 30 in above grade, that exemption does not apply.

Worked example: one 14 ft deck edge, 40 in up

Say one side of your deck is 14 ft (4.3 m) long and 40 in (102 cm) above grade. It is well over 30 in, so it needs a guard.

  1. Posts: at Alexandria's 6 ft maximum, 14 ÷ 6 = 2.33, so 3 bays and 4 posts. Each bay is 56 in on center.
  2. Space between posts: a 4x4 is 3-1/2 in wide, so each bay has 56 − 3.5 = 52.5 in open.
  3. Balusters: 2x2s are 1-1/2 in wide. With gaps no wider than 3-1/2 in, you need (52.5 − 3.5) ÷ 5 = 9.8, so 10 per bay.
  4. Actual gap: (52.5 − 10 × 1.5) ÷ 11 = 3.41 in. That is under the 4 in limit, with 0.59 in to spare if the wood shrinks.
  5. Count: 10 × 3 = 30 balusters for this side.
  6. Height: say a 2x6 cap, 1-1/2 in thick, lies on the posts. The post tops then sit at 36 − 1.5 = 34-1/2 in above the deck boards.

The 3-1/2 in target gap is a planning choice for wet wood, not a code number. Check your lumber and your railing kit's instructions.

Common deck railing height mistakes

  • Measuring the drop at the edge only. Check the grade 36 in out, too.
  • Ignoring a bench. DCA 6 recommends measuring from fixed seating next to the guard.
  • Spacing wet balusters at 4 in. Shrinkage can open the gap past the limit.
  • Notching guard posts. Alexandria prohibits it.
  • Treating a board estimate as a guard design. Our deck board calculator leaves railings out of its count.

To count boards for the floor, use the deck board calculator, and see deck board spacing for gaps. A screened porch over 30 in up needs a guard as well; see how to screen in a porch. For the bigger picture, start with how to plan an outdoor living space.

Your questions, answered

How high does a deck railing need to be?

Under the residential code in Alexandria, Virginia's typical deck details, a required deck guard is at least 36 in high, measured from the walking surface. DCA 6 recommends measuring from fixed seating where a bench sits next to the guard. Dublin, California's handout, which cites the California Building Code, sets 42 in.

At what height does a deck need a railing?

When the deck is more than 30 in above grade, measured at a point 36 in out from its edge. Alexandria and DCA 6 both use the 30 in trigger. On a sloped yard, a deck 26 in above the ground at its edge can still need a guard if the ground 36 in out is more than 30 in below it.

How high should deck stair railings be?

Stair handrails sit 34 to 38 in above the tread nosings, and stairs with 4 or more risers need one on at least one side. Alexandria measures stair guards from the nosing line too, at 34 to 38 in. The handrail runs from over the lowest riser to over the highest and returns at each end.

How far apart can deck balusters be?

Close enough that a 4 in sphere cannot pass through any opening in the guard. At the stair, the triangle by the steps may pass up to a 6 in sphere. Alexandria says to space wet lumber so shrinkage does not open the gaps past the limit, so plan the gaps a little under 4 in.

How far apart should deck railing posts be?

Alexandria's prescriptive details space 4x4 guard posts no more than 6 ft apart, through-bolted with 1/2 in bolts and tied in with hold-downs rated for at least 1,800 lb. DCA 6 asks for at least 2x8 joists and rim joists where posts attach, and Alexandria prohibits notching guard posts.

Is a 42 in deck railing required?

Not under the residential rules in Alexandria's deck details, which set 36 in. Dublin, California's guards handout cites section 1015 of the 2025 California Building Code and sets 42 in, with a 34 to 38 in stair guard exception for R-3 dwellings. Ask your building office which code your deck follows.

WORK OUT YOUR OWN NUMBERS

Deck Board Calculator

Deck boards and face screws or hidden clips for a deck surface, with gaps, overhangs and butt joints counted.

Sources and how we checked this

Sources

  1. Prescriptive Residential Wood Deck Construction Guide, DCA 6 (based on the 2015 IRC; posted April 2018), American Wood Council (AWC). Accessed .
  2. Typical Deck Details (based on the 2021 Virginia Residential Code; version 2024-07-01), City of Alexandria, Virginia. Accessed .
  3. Guards & Handrails (last revised 02/19/26), City of Dublin, California. Accessed .
Method
Each figure on this page comes from one of the sources listed here or from a run of the Deck Board Calculator with the inputs stated beside it.
Last verified
How this page was made
Drafted with AI assistance, then reviewed and edited by Olivia Bennett. AI tools checked every number against the sources listed here and the Deck Board Calculator, and an independent AI review checked them again.

Corrections

See something wrong? Report a problem · Corrections policy

No corrections to this page so far.

Report a problem with this page

Tell us what looks wrong on this page. Every report is checked.

For example: the number you expected, and where it came from.

We use your message only to check and fix this page. Privacy policy.