When does a deck need a railing?

Updated September 30, 2026 · 5 min read · Written by the DeckDebut team

A deck needs a guard once the walking surface is more than 30 inches above the grade or floor below, measured at any point within 36 inches horizontally of the edge. Residential guards must be at least 36 inches tall, and no opening may allow a 4-inch sphere to pass through.

Three numbers — 30, 36, 4 — and almost every homeowner knows only the first one. The second is the one that catches people out, and the third is the one that fails inspections.

The 30-inch rule, stated properly

The International Residential Code requires guards on open-sided walking surfaces located more than 30 inches above the floor or grade below — measured vertically to the surface below at any point within 36 inches horizontally of the open edge.

On a sloped Central Texas lot this is routine. Measure the drop at several points along each open edge, including three feet out from it, and use the worst one.

What the guard itself has to do

RequirementResidential standard
Guard heightAt least 36 inches above the walking surface
Opening sizeNo opening permits a 4-inch sphere to pass
Where openings are measuredEverywhere — between balusters, under the bottom rail, at posts and corners
Stair guardsRequired where the stair has the same 30-inch drop; measured from the line of the tread nosings
Stair handrailsGenerally required once a flight has four or more risers
International Residential Code values. Local jurisdictions adopt the IRC with amendments — confirm specifics with your building department.

The 4-inch sphere test is the one that surprises people. It applies to the whole assembly, not just the gaps between balusters — the space beneath the bottom rail and the deck surface counts, and so does the awkward triangle where a rail meets a post. Cable railing is particularly easy to get wrong here, because cables stretch and a run that passed on install day can fail later.

Decks that do not need a guard

  • Ground-level and near-ground decks where nothing within three feet of the edge drops more than 30 inches.
  • Edges that butt against the house wall — there is nothing to fall off.
  • Edges where a stair run occupies the full width of the opening, which gets its own handrail rules instead.

Plenty of homeowners add a railing anyway on a low deck, for children, for dogs, or because it frames the space. That is a design choice rather than a code requirement — and worth knowing it is optional, because railing is one of the most expensive components per linear foot on the whole build.

What this costs you

Railing is not a trim item. On a typical deck it runs from roughly $75 per linear foot for aluminium panel up to about $125 for stainless cable, which on 40 feet is a $2,000 spread — often more than the difference between entry and premium decking. If your deck is close to the 30-inch line, where it sits changes the budget meaningfully.

Confirm locally

The figures above are the IRC baseline, and Texas jurisdictions adopt it with their own amendments. Your inspector applies the local version, not the national one. If your deck is anywhere near the threshold, ask the building department before you frame it — the conversation is free and the rebuild is not. See also: do I need a permit to build a deck in Austin?

Common questions

How high does a deck have to be before you need a railing?
More than 30 inches above the surface below, measured at any point within 36 inches horizontally of the deck edge. A deck under that everywhere along the edge does not require a guard.
How tall does a deck railing have to be?
At least 36 inches above the walking surface for residential decks. Some jurisdictions and commercial applications require 42 inches, so confirm locally.
How far apart can deck balusters be?
Close enough that a 4-inch sphere cannot pass through any opening in the guard. In practice that means roughly 3.5 to 3.75 inches of clear space, and it applies under the bottom rail and at posts as well as between balusters.
Do deck stairs need a railing?
Stairs need a guard where the same 30-inch drop applies, measured from the line of the tread nosings, and generally need a graspable handrail once the flight has four or more risers. The two are different components with different rules.
Does a railing have to be on every side?
Only on open sides that meet the height trigger. The edge against the house needs nothing, and a stair opening is handled by the stair rules. That is why most attached decks are railed on three sides rather than four.

Keep reading