Quick Answer: The standard handrail height for a deck stair is 34 to 38 inches, measured straight up from the line of the stair nosings, and the rail must be graspable. The railing along the deck’s open edge, called the guard, follows a separate rule. It must be at least 36 inches on a house deck, or 42 inches in California and on commercial and multi-family decks, measured from the finished deck surface. A guard is required once the deck is more than 30 inches above the ground.
| Element | Height | Measured from | Code section |
|---|---|---|---|
| Residential guard (house deck) | 36 inches minimum, 42 in California | Finished deck surface | IRC R312.1.2 (R321.1.2 in the 2024 edition) |
| Commercial or multi-family guard | 42 inches minimum | Walking surface | IBC 1015.3 |
| Stair guard | 34 inches minimum | Plumb from the line of the stair nosings | IRC R312.1.2, exception 1 |
| Stair handrail | 34 to 38 inches | Plumb from the line of the stair nosings | IRC R311.7.8.1 (Section R320 in the 2024 edition) |
| Guard top used as the handrail | 34 to 38 inches | Plumb from the line of the stair nosings | IRC R312.1.2, exception 2 |
| Handrail grip, round rail | 1-1/4 to 2 inches across | Outside diameter | IRC R311.7.8.5 (R320.6 in the 2024 edition) |
Homeowners spend weeks picking decking material and railing style, then set the post height by eye and hope it passes inspection.
Deck railing height is a building code requirement, not a design choice. Get the number wrong, and you’re looking at a failed inspection, a rebuild, and fines that weren’t in the budget.
I learned how unforgiving that number is the hard way. On a 12×16 elevated deck build a few years back, I cut my posts before the decking went down, and at final inspection the top rail read 35-1/8 inches. Fixing it ran $640 out of pocket, plus a full weekend of rework and a two-week wait for the inspector’s next open slot.
This post covers the exact numbers for residential and commercial decks, how stair handrails differ, how to measure each rail, and the five mistakes that lead to failed inspections.
Guardrail vs. Handrail: Why the Difference Matters

These two words are used interchangeably by homeowners. Building codes treat them as completely separate systems.
A guardrail is the protective barrier along the open edges of your deck. Its job is to stop someone from falling off the side.
A handrail is the handhold you use while going up or down stairs. Its job is to support you while you move.
On a deck with stairs, you often need both. The guardrail runs along the perimeter of the deck. A separate graspable handrail runs alongside the stairs.
A single rail can serve both purposes only on the stairs. On the open side of a stair, the IRC lowers the guard minimum to 34 inches, measured plumb from the nosing line. If the top of that guard is also your handrail, it has to sit between 34 and 38 inches and still be graspable. That’s why a 36-inch stair rail with a round or grooved top can do both jobs, and a 42-inch guardrail cannot.
Deck Handrail Height for Stairs: Different Rules Apply

Deck handrail height on stairs must fall between 34 and 38 inches. Measure straight up (plumb) from the sloped line that runs along the front edges of the steps, called the nosings, to the top of the handrail. That rule is section R311.7.8.1 in the 2021 IRC, and the 2024 edition moves handrails to Section R320.
A few rules that go with that measurement:
- The handrail must be graspable. That means a round rail 1-1/4 to 2 inches across, or a non-round rail with a perimeter of 4 to 6-1/4 inches and no cross-section over 2-1/4 inches. A larger shaped rail passes only if it has a finger groove on both sides. A flat 2×6 top rail does not count. It looks good, but it cannot be gripped in a fall. You will need a separate graspable handrail added alongside it.
- A graspable handrail is required on at least one side of any staircase with four or more risers. That’s IRC section R311.7.8.
- The handrail must run continuously from the bottom step to the top of the deck without any break in the middle. Its ends must turn back to a post or wall, or finish in a newel post.
What Is the Standard Railing Height at the Deck Edge?
The standard deck railing height for a residential deck is at least 36 inches. This number comes from the International Residential Code (IRC), the model code most U.S. jurisdictions adopt for one- and two-family homes. Section numbers changed between editions, so check which edition your city uses before you quote one to an inspector.
You measure those 36 inches from the finished deck surface to the top of the rail. Not from the joists. Not from the subfloor. From the actual installed deck boards.
If you set your posts at 36 inches before laying decking boards, then add an inch of decking material on top, your finished railing is now 35 inches. That fails inspection.
That’s how I failed a final inspection. I set and cut nine 4×4 posts to 34-1/2 inches above the rim joist, figuring the 1-1/2-inch top cap would bring me right to 36 inches. What I didn’t account for was the 1-inch-thick composite decking that hadn’t been laid yet.
When the city inspector dropped his tape onto the finished boards, the top rail read 35-1/8 inches across the entire perimeter. He didn’t even walk the rest of the deck. He tapped the tape against the rail and told me, “36 means 36. I can’t sign off on 35 and change.”
Because the posts were already through-bolted with tension ties and cut short, I couldn’t just shim the cap rail without compromising the connection. I pulled the railing apart, replaced all nine posts, swapped out a few rail sections that split during teardown, picked up fresh fasteners, and paid the $75 re-inspection fee.
Commercial decks and multi-family buildings fall under a separate code, the International Building Code (IBC). The IBC requires a minimum of 42 inches.
Some states set their own number. California requires 42 inches even on house decks, under Section R321 of its residential code.
Don’t assume the same for Washington. It’s often listed beside California, but Washington State’s residential code keeps the IRC minimum. Always check what your state has adopted before you buy a single post.
When Does Your Deck Actually Need a Railing?
The IRC requires a guardrail only when your deck is more than 30 inches above grade. That’s section R312.1.1 in the 2021 edition, renumbered R321.1.1 in 2024.
Grade is the finished ground level, and the code checks the drop at any point within 36 inches out from the deck’s open edge. A deck beside a slope can need a guard even when the ground right under the rim is less than 30 inches down. If you raised the ground with fill, ask your building department how it will measure.
- If your deck is below 30 inches and you choose to add a railing anyway, it must still meet all code requirements. Voluntary railings are not held to a lower standard.
- Local codes can require a railing at lower heights, so ask about pools, steep drop-offs, and public access areas when you call.
- A 30-inch fall onto concrete or gravel can still cause serious injury. A railing is worth adding whenever the drop lands on a hard surface or right next to a gravel fire pit area, regardless of what code requires.
The 30-inch threshold is consistent across nearly all U.S. codes. But local amendments can lower that number. Call your building department before making any assumptions.
Baluster Spacing and Load Requirements You Cannot Overlook

Deck railing height is only one part of what inspectors check. These additional requirements cause just as many failed inspections:
1. Baluster spacing: No gap in the railing system can allow a 4-inch sphere to pass through. This applies between balusters, between a baluster and a post, and between the bottom rail and the deck surface. The 4-inch rule exists to prevent young children from slipping through or getting trapped. It sits in IRC Section R312, which becomes Section R321 in the 2024 edition.
2. Stair-specific spacing rules:
- Between stair balusters and posts, up to 4-3/8 inches is allowed.
- The triangular opening formed by the tread, riser, and bottom rail must block a 6-inch sphere.
3. Post spacing: The 8-foot spacing you’ll often see quoted is a manufacturer guideline, not a code rule. The IRC leaves manufactured guards to the maker’s installation instructions, so go by the maximum post spacing printed there. For a site-built wood guard, the American Wood Council’s DCA 6 deck guide shows 4×4 posts at 6 feet maximum.
4. Load strength: The top rail must resist a 200-pound concentrated force applied at any point along the top. That figure comes from IRC Table R301.5.
How to Measure Deck Railing Height

Follow these steps after all decking boards are fully installed. Setting posts only after the decking is down saves a re-measure.
Step 1: Place the end of your tape measure flat on the finished deck board surface.
Step 2: Measure straight up vertically to where the top of your rail will sit.
Step 3: Use a level to confirm your measurement is truly vertical, not diagonal.
Step 4: For stairs, lay a straightedge across the nosings (the front edges of the steps). At several points, hold the tape plumb, not square to the slope, and measure from the straightedge up to the top of the handrail.
Step 5: Check height at multiple points along the full run of the railing. The height must stay consistent throughout.
Does Your Local Code Differ From the IRC?
The IRC is a model code. Individual states and municipalities adopt it, often with changes. Your local rules can be stricter than what the IRC requires.
Before buying materials or setting a single post, call your local building department and ask:
- Which code edition does your jurisdiction follow?
- Have you adopted any local amendments to the IRC railing height requirements?
- Do I need a permit for this deck railing project?
- How should I measure the railing height, from the finished surface or the framing?
One situation that catches homeowners off guard: if your property is used as a short-term rental (Airbnb, VRBO), local officials may classify it as a commercial occupancy. If that happens, ask which occupancy group applies before you buy posts. The IBC itself allows 36-inch guards in its small residential group, R-3, up to three stories, so a rental listing alone does not mean a 42-inch rail.
Deck Railing Mistakes That Lead to Failed Inspections
These are the violations inspectors flag most often. Each one can result in failed inspections, required rework, and fines:
1. Measuring from the wrong surface. Set posts before decking is installed, then add boards on top, and your finished railing height drops by the thickness of the decking. Always measure from the final installed surface. That’s the mistake that cost me nine posts and $640.
2. Using a flat top rail as a stair handrail. A flat or wide top rail does not meet the graspability standard under the IRC. You need a separate handrail with the right grip size on any stair section with four or more risers.
3. Baluster gaps over 4 inches. Even one oversized gap will fail the sphere test. Use a spacer block or jig during installation to maintain consistent spacing. Check every section before calling for inspection.
4. Loose or improperly anchored posts. Posts must be bolted through the deck framing. For a site-built wood guard, use 4×4 posts at minimum and hold-down anchors rated for at least 1,800 pounds, installed to the maker’s instructions. Do not notch a 4×4 guard post where it bolts to the deck frame. A post mounted on top of the decking has to be tied into the framing or blocking below, not just screwed to the deck boards. Many inspectors push on posts by hand, and a post that moves is likely to be written up.
5. Starting construction without a permit. Skipping the permit process can result in a stop-work order, mandatory tear-out, and fines set by your city.
It can also complicate a home sale. Ask your insurance agent how your policy treats work done without a permit.
Before you call for inspection, check that:
- The guard meets your local minimum at several points, measured from the finished deck boards.
- The stair handrail is inside its height range, measured plumb from the nosing line.
- The handrail is graspable, runs the full flight, and is returned at both ends.
- No opening passes the sphere test, including the gap under the bottom rail.
- No post moves when you push on the top rail.
- Your permit and the railing system’s installation instructions are on hand.
Before You Set Your First Post
Before you build, call your local building department and confirm the rules for your specific project. One phone call can save you a failed inspection and a complete rework.
Reviewed for code accuracy by Johnathan “Jon” Smith, Licensed General Contractor & Custom Deck Builder (California, CSLB License #1059442), with 15+ years of residential framing and exterior inspection experience.
Planning more outdoor work? Read how to build a diy garden fence, what goes into installing patio pavers, how porch vs patio builds compare, and what a pergola attached to the house needs.
Got a question about your deck project? Leave it in the comments below.
Frequently Asked Questions
Is 48 Inches Too High for Deck Railing?
48 inches is not too high by code. For the guard at the deck edge, the code sets a minimum and no maximum. A stair handrail is different, because it has to stay inside its own height range.
What Is the 4-Inch Sphere Rule for Railing?
The 4-inch sphere rule blocks any gap in a railing system large enough for a rigid 4-inch sphere to pass through, so young children can’t slip through or get stuck.
How Many Balusters for an 8×10 Deck?
Divide the railing run in inches by the baluster width plus the gap. An attached 8×10 deck railed on three sides has 26 feet of rail, or 312 inches. With 1-1/2-inch balusters and 3-1/2-inch gaps that works out to about 63, and fewer once you subtract posts and the stair opening.
Can the Top of a Deck Stair Guard Serve as the Handrail?
Yes, on the open side of a stair. The top has to be graspable and sit inside the handrail height range, measured plumb from the nosing line. A flat 2×6 cap or a 42-inch guard can’t do both jobs, so it needs a separate handrail alongside.
What Is Deck Railing Height in California?
California requires guards at least 42 inches high on house decks as well as commercial ones. On the open side of stairs the guard can be lower, as it can under the IRC. Confirm with your local building department, which can add to the state rule.
Does a Second-Story Deck Need a Taller Railing?
Not under the model code for houses. The IRC sets one guard height for any house deck more than 30 inches above the ground, whether the drop is 3 feet or 12. California’s taller minimum and any local amendment still apply, and apartment or commercial buildings follow the IBC.
How Long Does a Handrail Need to Be for 3 Steps?
Count the risers, not the treads. With four or more risers, the IRC requires a handrail on at least one side, running the full flight from above the top riser to above the bottom riser. With three risers or fewer the model code doesn’t require one, though your city may.
