Cable Railing Code: Cable Spacing, Post Spacing & the 4-Inch Rule
Cable railing does not have a universal 3-inch cable-spacing code or a universal 4-foot post-spacing code. For residential decks, cable is an infill system inside a guard. The completed guard must satisfy the applicable opening, height, structural, stair, and handrail requirements while also following the installation requirements for the specific cable-railing system.
The number that matters most is the 4-inch opening limit. Under the common residential IRC framework, required guard openings generally cannot allow a 4-inch-diameter sphere to pass through, with different opening limits at certain stair locations.
Quick Answer: Think 4-inch code opening limit → roughly 3-inch cable spacing in many systems → manufacturer-specific post/support spacing. The 3-inch and 4-foot numbers commonly seen online are system-design values—not universal IRC cable-railing rules.
Cable Railing Code Quick Reference
| Requirement | Common Residential Rule | What It Means for Cable Railing |
|---|---|---|
| When a guard is required | Generally when the walking surface is more than 30 in. above floor or grade below within 36 in. horizontally of the open edge | Determine whether a guard is required before designing the cable system |
| Level guard height | Generally 36 in. minimum | Cable infill does not change the required guard height |
| General guard openings | 4-in.-diameter sphere generally may not pass | Cable spacing, tension and supports must control the finished opening |
| Open side of stairs | Different stair-specific opening exception applies | Do not simply copy the level cable layout onto the stairs |
| Stair triangle | Separate opening exception applies at the tread/riser/bottom-rail triangle | Bottom cable/rail geometry requires separate attention |
| Cable spacing | No universal IRC 3-in. cable-spacing rule | Use the documented spacing for the selected system |
| Post spacing | No universal IRC 4-ft cable-post rule | Structural posts and intermediate supports are system-specific |
| Stair handrail | Separate handrail requirements can apply | A cable guard top rail is not automatically a compliant graspable handrail |
| Structural performance | The completed guard must satisfy applicable design loads | Posts, attachments, blocking and framing matter—not just the cable |
Code-edition warning: The 2024 IRC organizes residential guard provisions under Section R321.1. Earlier editions commonly placed comparable guard provisions under R312.1. Your local jurisdiction may use an earlier edition or local amendments.
The Most Important Cable Railing Code Distinction
The residential guard establishes the required opening performance.
Manufacturers use tighter unloaded spacing to help control flexible cable openings.
Post spacing, intermediate pickets, tension and run limits depend on the system.
This distinction prevents one of the most common cable-railing mistakes: turning a manufacturer’s installation detail into a supposed universal building-code rule.
For the broader residential guard requirements behind these numbers, see Deck Railing Code.
What Is the 4-Inch Rule for Cable Railing?
For the general residential guard condition, openings are typically limited so a 4-inch-diameter sphere cannot pass through. Cable railing has to satisfy that requirement just like another permitted guard-infill system.
The complication is that cable is flexible. The distance measured between two unloaded cables does not by itself tell you how the completed assembly will behave when the cables move.
That is why a cable system may specify cable spacing noticeably tighter than four inches. The tighter starting dimension provides room for the system to control movement and deflection.
Is Cable Railing Supposed to Be 3 Inches Apart?
Three inches is common, but it is not a universal IRC cable-spacing requirement. It is better understood as a common system-design dimension used by manufacturers to help the completed flexible infill satisfy the applicable opening requirement.
For example, Feeney recommends cables no more than 3 inches apart with a post or vertical member at least every 3 feet in its standard CableRail frame guidance. Viewrail Express uses 3-1/8-inch cable spacing with posts no more than 4 feet on center.
Do not mix specifications. A cable-spacing dimension from one system, post spacing from another, and tension recommendation from a third do not automatically create a documented railing assembly.
Once you are ready to select an actual system, compare the documented configurations in Best Cable Railing Systems.
Why Cable Deflection Changes the Spacing Question
Cable is not a rigid baluster. When force is applied, it can move. That means the effective opening can become larger than the unloaded cable-to-cable measurement suggests.
Cable movement depends on the complete system, including:
- vertical cable spacing
- distance between posts or intermediate supports
- cable diameter and construction
- manufacturer-specified tension
- run length
- post stiffness
- top-rail and frame stiffness
- corners and changes in direction
- termination hardware
This is why simply pulling a loose cable tighter is not a reliable fix for an incorrect layout. Excessive tension can increase loads on posts, fittings and terminations while leaving the underlying support geometry outside the manufacturer’s design.
How Far Apart Can Cable Railing Posts Be?
There is no universal answer such as “cable railing posts must be 4 feet apart.” Different systems handle cable deflection in different ways.
The first distinction is whether a vertical member is a structural guard post or a lighter intermediate cable support. Those are not necessarily the same thing.
| Example | Documented Layout | Important Distinction |
|---|---|---|
| Feeney standard CableRail guidance | Post or vertical member at least every 3 ft; cables no more than 3 in. apart | The vertical member can be an intermediate support rather than another structural end post |
| Feeney DesignRail | Some configurations use wider structural-post spacing with intermediate pickets | Structural-post spacing and cable-deflection support spacing are separate dimensions |
| Viewrail Express | Posts no more than 4 ft O.C.; cables 3-1/8 in. O.C. | Those dimensions belong to that particular system configuration |
For the structural-layout side of this question, continue with Deck Railing Post Spacing.
How High Does Cable Railing Need to Be?
Cable infill does not create its own guard-height rule. For a typical one- or two-family residential deck under the IRC framework, a required level-deck guard is generally at least 36 inches high.
Do not automatically substitute a 42-inch rule simply because the railing uses cable. The required height depends on the governing code, occupancy and project conditions—not the infill material.
The guard trigger also matters. Under the common IRC framework, a guard is generally required where an open-sided walking surface is more than 30 inches above the floor or grade below at any point within 36 inches horizontally of the open edge.
For the complete height rules and measurement references, see Deck Railing Height: 36 or 42 Inches?.
Cable Tension Creates a Structural Load Path
Cable tension does not replace the ordinary structural requirements for a guard. The completed railing still needs an adequate post connection and a load path into the deck framing.
End posts, corner posts and stair transitions can be particularly important because they receive forces created by the cable system.
The exact connection and blocking detail should come from the selected railing system, applicable approved documentation, an accepted prescriptive detail, or project-specific engineering.
Related: Deck Blocking and Deck Railing Code.
Cable Railing Code on Stairs
Cable railing on stairs introduces three separate issues: the stair guard, guard openings and the graspable handrail. They should not be treated as one requirement.
The IRC framework uses stair-specific opening exceptions rather than applying the general level-guard opening rule identically to every part of the stair. The triangular opening formed by the tread, riser and bottom rail is also treated separately.
Cable systems add another layer because the cable runs at an angle. Posts, drilled holes, fittings, washers, terminations and transitions may therefore differ from the hardware used on a level run.
Important: A cable railing top rail is not automatically a compliant stair handrail. A required handrail has separate rules for height, graspability, continuity, clearance and termination.
Use Stair Railing Code for the guard/opening requirements and Deck Handrail Code for the graspable handrail requirements.
Are Horizontal Cable Railings Against Code?
Do not assume there is a blanket IRC prohibition on horizontal cable infill for a residential deck simply because the cables could be perceived as climbable. The residential guard question centers on the requirements that actually apply to the completed assembly.
That does not mean climbability should be ignored. It can still be an important household design consideration, particularly where young children regularly use the deck.
A homeowner who dislikes horizontal climbable elements can compare cable with vertical cable, traditional balusters, glass, aluminum and other systems in Best Deck Railing Systems.
Stainless Steel, Corrosion & Coastal Cable Railing
Code compliance does not guarantee that a cable system is suitable for every exposure. Exterior cable railing also has to withstand the actual environment.
Durability can be affected by:
- saltwater and airborne chlorides
- persistent moisture
- dissimilar-metal contact
- damaged protective finishes
- cleaning practices
- cable and fitting material
- post and fastener material
Do not reduce the coastal decision to a generic instruction such as “buy 316 stainless.” Check the manufacturer’s requirements for the entire assembly, including cable, fittings, posts, coatings, fasteners, isolation details, maintenance and warranty limitations.
Can You Install Cable Railing on Existing Deck Posts?
Possibly—but existing posts should not automatically be considered adequate just because they supported a previous railing.
Before reusing them, verify:
- post material and condition
- structural-post spacing
- post size and stiffness
- post-to-deck attachment
- blocking and framing around the connection
- corner and termination conditions
- compatibility with the selected cable system
Cable introduces tension into the railing assembly, so a post layout that worked with another infill type may not match the selected cable manufacturer’s requirements.
What an Inspector May Check on Cable Railing
Inspection practice varies by jurisdiction, but it is useful to prepare for inspection by evaluating the entire guard assembly rather than looking only at cable spacing.
- is a guard required?
- correct guard height?
- acceptable openings?
- stair exceptions handled correctly?
- posts secure?
- appropriate attachment?
- blocking/framing adequate?
- corners and terminations correct?
- correct cable spacing?
- correct support spacing?
- proper fittings and terminations?
- installation documentation available?
- stair guard correct?
- openings correct?
- required handrail present?
- handrail graspable and continuous?
7 Common Cable Railing Code Mistakes
1. Calling 3 Inches “The Cable Railing Code”
Three inches is a common manufacturer spacing recommendation. It is not a universal IRC cable-to-cable spacing rule.
2. Assuming Every Cable Post Must Be 4 Feet Apart
Some systems use 4-foot structural-post spacing. Others use different structural-post spacing combined with intermediate cable supports.
3. Ignoring Cable Deflection
A resting cable measurement does not tell the entire story. The system must control movement as part of the finished guard assembly.
4. Increasing Cable Tension to Fix a Bad Layout
More tension is not a substitute for correct spacing, supports, run geometry and terminations. Stay within the selected manufacturer’s procedure.
5. Forgetting the Post-to-Deck Connection
A strong cable and rigid-looking post do not help if the post attachment cannot transfer guard forces into the deck framing.
6. Copying the Level Layout Onto the Stairs
Stair openings, cable angles, fittings, terminations, guard geometry and handrails require separate consideration.
7. Mixing Components Without Documentation
Cable, posts and fittings that each look strong independently do not automatically form a documented railing system when combined.
Plan a Cable Railing in the Right Order
- Determine whether a guard is required.
- Confirm the required guard height.
- Identify the applicable opening requirements.
- Separate level railing from stair conditions.
- Select a documented cable-railing system.
- Use that system’s cable and support spacing.
- Verify posts, blocking and attachment.
- Verify the stair handrail separately.
- Check local code adoption and permit requirements.
Best rule: Code establishes what the completed guard must accomplish. The selected railing system tells you how that particular product is designed to accomplish it.
What Comes After the Code Check?
Once you know the railing can be designed for the applicable guard requirements, the next decision is whether cable is actually the right railing system for your deck.
Cable Railing Cost
Estimate posts, cable, fittings, corners, stairs, framing work and installation.
Cable Railing Pros & Cons
Evaluate views, maintenance, installation difficulty, exposure and cost.
Best Cable Railing Systems
Compare cable systems and choose the configuration that fits your project.
Need Help With a Cable Railing Installation or Code Issue?
Cable railing problems can involve more than loose wire. Post attachment, blocking, corners, stair transitions, existing framing and the requirements of the selected system can all affect the installation or repair.
If you are comparing professional options, give each contractor the same railing footage, system or post material, stair and corner layout, mounting method and known framing conditions. That makes the quotes easier to compare.
Compare Local Railing Contractors →
Affiliate disclosure: The Backyard Standard may earn a commission if you submit a service request through this link.
Cable Railing Code FAQ
What is the code spacing for cable railing?
There is no single universal IRC cable-to-cable spacing dimension. The completed residential guard generally has to satisfy the applicable opening limitation, while the cable-system manufacturer specifies cable spacing and supports designed for that particular assembly. Around 3 inches is common, but it should not be treated as a universal code number.
Is cable railing supposed to be 3 inches apart?
Many cable-railing systems use approximately 3-inch cable spacing to help control openings as the cables deflect, but the exact dimension should come from the documentation for the system being installed.
Does the 4-inch sphere rule apply to cable railing?
Cable used as residential guard infill generally has to satisfy the applicable guard-opening limitation. Because cable can move, the complete system layout has to account for that flexibility.
How far apart can cable railing posts be?
There is no universal IRC cable-post spacing. Some systems use structural posts around 4 feet apart, while others permit wider structural-post spacing and use intermediate vertical members to control cable deflection. Follow the selected system.
Can cable railing posts be 6 feet apart?
Some documented systems can use structural posts at approximately 6 feet while using intermediate supports between them. Other systems do not permit that layout. Six feet is therefore neither universally allowed nor universally prohibited.
How high should residential cable railing be?
For a typical required level-deck guard under the residential IRC framework, the guard is generally at least 36 inches high. Cable infill does not create a different guard-height requirement.
Can I tighten loose cable until it passes?
Only adjust cable within the manufacturer’s procedures and limits. Excessive tension is not a substitute for correct cable spacing, support spacing, run length, terminations or framing.
Are horizontal cable railings against code?
Do not assume a blanket residential IRC prohibition merely because the cables are horizontal. Verify the locally adopted code, amendments, project type and selected system.
Does cable railing need a handrail on stairs?
A stair can require a graspable handrail even when a cable guard is already present. Whether the guard top can perform both functions depends on the applicable height, graspability, continuity and other handrail requirements.
Can I install cable railing on my existing deck posts?
Only if the existing posts, spacing, attachment, framing and condition are compatible with the selected cable system and the applicable guard requirements. Do not assume posts designed for another railing are automatically suitable for cable.
Continue Planning Your Deck Railing
Deck Railing Guide
Plan the complete railing system from code and structure through materials and cost.
Deck Railing Code
Review guard triggers, height, openings, loads, stairs and structural requirements.
Deck Railing Height
See when residential guards are 36 inches and when 42-inch rules apply.
Deck Railing Post Spacing
Understand structural posts, system spans, attachment and intermediate supports.
Stair Railing Code
Separate stair guard, opening and handrail requirements.
Deck Handrail Code
Check graspability, height, continuity, clearance and termination.
Sources & Technical References
Last reviewed: September 2026
- International Code Council — 2024 IRC Section R321.1, Guards
- Feeney — CableRail Technical Guidance
- Feeney — CableRail Installation for Wood & Metal Frames
- Viewrail — Express Cable Railing Specifications
- Viewrail — Cable Railing Systems & Technical Guidance
Scope: This guide focuses on common U.S. one- and two-family residential deck conditions using the 2024 IRC as a model-code reference. Local adoption, amendments, proprietary evaluated systems, multifamily or commercial work, and project-specific conditions can change the requirements.
The Cable Railing Code Rule to Remember
Do not design a cable railing by memorizing “3-inch cables and 4-foot posts.” Design the completed guard.
First establish whether a guard is required and determine its applicable height, opening, stair, handrail and structural requirements. Then choose a cable system and follow that system’s documented cable spacing, supports, terminations, run limits, attachment and tensioning requirements.
Remember: 4 inches is the general guard-opening rule. Approximately 3-inch cable spacing and various post-spacing limits are ways individual cable systems may be designed to satisfy that requirement.


