Deck Railing Height and Code Requirements
Why this matters
Deck railings are governed by IRC requirements for height, spacing, and load. A railing that doesn't meet code is an inspection failure AND a safety hazard. The classic deck-fall injury is a child squeezing through pickets that are too widely spaced; a death is a person leaning on a railing that's inadequately anchored. A contractor who builds railings to current code (with proper anchoring, spacing, and height) protects both the customer and themselves from liability.
IRC requirements
Guard height (railing required)
IRC R312:
- Required when deck surface is more than 30 inches above adjacent grade
- Minimum height: 36 inches at one and two-family dwellings (residential)
- Some states / jurisdictions require 42 inches (commercial or specific)
Picket / spindle spacing
- Less than 4 inch sphere can pass through (between adjacent pickets)
- Less than 4 3/8 inch at typical stair locations (slightly relaxed because of stair pattern)
Top rail
- Must be 36 inches (or 42 inches per local code) above the deck
- Required to provide a continuous handrail equivalent
Bottom rail
- Less than 4 inch from deck (no gap larger than 4 inches between deck and bottom of bottom rail)
Stair handrails
- Required on at least one side of stairs with 4+ risers
- 34 to 38 inches above the nose of the tread
- Continuous along the stair length
- Grippable
Loading
- Top rail must withstand 200 lb concentrated load at any point
- Pickets withstand 50 lb concentrated load
- Tested per ICC AC-308 for engineered components
Why these specific dimensions
36 inch height
- Prevents typical adult from falling over the rail
- Provides good hand-hold for stability
- Most common code requirement
4 inch sphere rule
- Designed to prevent a child's head from passing through
- 4 inch is the threshold above which a child's head can pass
200 lb load
- Tests the rail against a typical heavy adult leaning on it
- Plus a safety factor
Continuous bottom rail (less than 4 inch gap)
- Prevents a child from sliding through under the rail
Railing materials
| Material | Pros | Cons |
|---|---|---|
| Wood (PT, cedar, redwood) | Customizable; traditional look | Maintenance; weathering |
| Composite | Low maintenance; matching deck | More expensive; some heat retention |
| Aluminum | Lightweight; powder-coated colors | Less customizable |
| Steel | Strong; many designs | Rust if not properly coated |
| Glass | Modern; unobstructed view | Most expensive; specific code requirements |
| Cable | Modern; minimal | Stretches; tensioning required |
Component options
Posts
- 4x4 PT (typical residential)
- 6x6 PT (heavier or taller railings)
- Metal post (with cap and base)
Top rail
- 2x6 or 2x4 wood
- Aluminum top rail (some systems)
- Composite top rail
Pickets / spindles
- 2x2 wood
- 1x6 wood (for solid panels)
- Aluminum balusters
- Cable wire
- Glass panels
Bottom rail
- 2x4 typical
- Required to meet bottom rail rule
Post attachment
The post is the structural element supporting the railing. Attachment matters:
Bolt through deck rim
The post passes through (or attaches to) the deck's rim joist:
- Most secure
- Requires post to align with rim joist
- Bolts (1/2 inch typical) with washers
Lag screws to side
Post lagged to the rim joist from outside:
- Common for retrofit
- Requires multiple lag screws per post
- Stainless or galvanized lag screws
Post base hardware
Specific post base hardware (Simpson Strong-Tie post base) for free-standing posts:
- Used for posts not aligned with rim joist
- Attaches post to a post base on top of the deck framing
Hidden mount
Some systems use hidden post mount inside the deck framing:
- Cleaner appearance
- More complex install
Post spacing
For typical residential railing:
- 4 to 6 ft maximum spacing between posts
- Closer spacing for some materials (composite, cable)
- Specific manufacturer requirements for engineered systems
Picket spacing layout
For 36 inch height railing with 4x4 posts spaced 5 ft apart:
- Between posts: 60 inches minus 3.5 inches (1.75 inch each side) = 56.5 inches available
- Picket spacing center-to-center: 4 inches OK (since picket itself is ~1.5 inch, leaving 2.5 inch gap; 4 inch sphere can't pass)
- Number of pickets: 56.5 / 4 = 14 pickets approximately
The math:
- Picket width + space < 5.5 inches (so 4 inch sphere can't pass between adjacent pickets and the post or rail)
Common railing errors
Picket spacing too wide
- 4 inch sphere passes
- Code violation
- Child safety risk
Height below 36 inches
- Doesn't meet minimum
- Some sites require 42 inch (commercial, balcony, etc.)
- Verify against local code
Post anchored only to deck surface (not rim joist)
- Inadequate; pulls off in lateral load
- Fails the 200 lb test
Bottom rail too far from deck
- Greater than 4 inches gap
- Code violation
- Child safety
Inadequate post material
- 2x4 post for railing: inadequate
- Use 4x4 PT minimum
No grippable handrail on stairs
- Required for stairs with 4+ risers
- Specific shape requirements (round, rectangular)
Aluminum and composite railing systems
Many manufacturers offer complete railing systems:
- Trex Transcend Railing
- TimberTech Radiance Rail
- Westbury aluminum
- Fortress Building Products
Benefits:
- Pre-engineered to meet code
- Easier installation
- Long warranty
Customer pays a premium (a modest per linear ft for composite, a modest for aluminum) compared to building from raw lumber. The premium is justified for customers wanting low maintenance and long warranty.
Glass panel railings
Specific code provisions for glass:
- Tempered glass (typically 1/4 inch or 3/8 inch)
- Specific mounting hardware
- Some jurisdictions require laminated glass for certain conditions
Modern look; expensive (a moderate per linear ft).
Cable railings
Specific code provisions:
- Cable spacing (similar to picket spacing rules)
- Cable tensioning (cables can stretch; tension affects safety)
- Post spacing (typically 4 ft maximum due to deflection)
Modern look; allows unobstructed view; specific manufacturer products available.
Local code variations
Some jurisdictions have different requirements:
- California: 42 inch railings on some applications
- Florida: hurricane-specific railing requirements
- Mountain / snow regions: snow load considerations
- Coastal: corrosion considerations
Always verify with local AHJ.
Stair handrail specifics
For stairs with 4+ risers:
Required handrail
- One side minimum (both sides for stairs over a certain width)
- 34 to 38 inches above the nose of the tread
Grippable shape
References
- IRC R312 (Guards and railings).
- IRC R311.7.8 (Stair handrails).
- IRC R507 (Decks).
- ICC AC273 (Acceptance criteria for engineered railing systems).
- ICC AC308 (Acceptance criteria for cable rail systems).
- Manufacturer literature: Trex, TimberTech, Westbury, Fortress.
- Manuall internal: Deck Building Ledger Board Attachment Per IRC.