Measuring your run before you calculate
Cable railing is unforgiving of bad measurements — every cable in the run gets cut, terminated and tensioned to the same spacing plan. Get the run and height right first.
Measure the horizontal run
Post to post, measure the straight horizontal footprint the railing covers — not the sloped rail length on a stair. The calculator works in horizontal footprint because that's how post spacing and post count get planned.
Confirm your guard height
Measure vertically from the finished walking surface (deck board or tread nosing) to the top of the top rail. Most residential guards land at 36", though taller guards are common on elevated decks.
Pick a spacing target, then check the interaction
Leave the target near 3" for margin under the 4" sphere maximum. On a stair run, the calculator tightens this further — read the Cable & Spacing Reference section to see why.
Don't skip the terminal post load
Every cable in the run pulls on both terminal posts with its full tension. This is the number that gets forgotten — check it in the Terminal Post Loading section before you commit to a post size.
The five formulas behind every result
Nothing on this page is a black box. Here's exactly what runs when you change a number.
Cable Count
Usable height (guard height H, minus 1" for the top rail cap, minus one spacing gap left at the bottom) divided by target spacing S, rounded down, plus the starting cable.
Actual Cable Spacing
Same rounding problem as riser height: n must be a whole number, so the real gap between cables is rarely your exact target — this recalculates it.
Post Count
Terminal posts at both ends plus however many intermediate posts keep every span under the material's max spacing.
Terminal Post Load
Every cable in the run pulls on each terminal post with its full tension T. Cable count multiplies straight through — this is not a small number once n climbs.
Total Cable Needed
Each cable needs the run length plus roughly 6" of extra for swaging and tensioner take-up at the ends, summed across every line and converted to feet.
Walking through a real 8' stair rail run
Same five formulas, filled in step by step, for an 8-foot (96") stair-rake run at a 36" guard height — the default this calculator loads with.
Nominal cable count
Usable height: 36" guard − 1" top rail cap − 3" bottom gap = 32". At a 3" target: 32 ÷ 3 = 10.67, floored to 10, plus the starting cable = 11 cables, spaced at 32 ÷ 10 = 3.2" on-center.
The stair-rake adjustment overrides it
Because this run is a stair, the calculator tightens the target spacing by roughly 15% to offset the ladder-effect risk on an incline: 3" × 0.85 ≈ 2.55". Re-run the same formula: 32 ÷ 2.55 = 12.5, floored to 12, plus the starting cable = 13 cables, actual spacing 32 ÷ 12 ≈ 2.67".
Terminal post load jumps with it
At 250 lbs target tension: 11 cables would have loaded each terminal post to 2,750 lbs. The rake-adjusted 13 cables load it to 3,250 lbs — a single design decision (rake tightening) that pushed the post load up by 500 lbs. This is exactly the kind of interaction that a standard 4x4 wood post was never sized for.
Posts and total footage
At a 36" max post spacing: ceil(96 ÷ 36) + 1 = 4 posts, landing at an actual 32" spacing — comfortably under the max. Total cable needed: 13 × (96 + 6) ÷ 12 = 110.5 ft, rounded up to 111 ft to order.
This is exactly why the terminal post load can jump sharply between a level deck run and a stair run using the same guard height and target spacing — the rake adjustment adds cables, and every added cable adds its full tension to both end posts. Switch Run Type above to see the difference live.
Spacing and tension by cable diameter
The 4" sphere rule is the hard code maximum. These narrower, more conservative targets are common installer practice to account for cable deflection once tensioned and stepped or leaned on.
| Cable Diameter | Typical Spacing (Level) | Typical Spacing (Stair/Raked) | Typical Tension Target |
|---|---|---|---|
| 1/8" (3mm) | 3" o.c. | ≈2.5–2.7" o.c. | 200–350 lbs |
| 3/16" (4.8mm) | 3–3.25" o.c. | ≈2.6–2.9" o.c. | 300–500 lbs |
[VERIFY: exact spacing and tension figures vary by cable-rail hardware manufacturer and cable construction (1x19 vs 7x7 strand) — confirm against your chosen system's published spec sheet before ordering hardware.]
Guard code, quick reference
This calculator checks your result against the two limits below. Full guard and handrail code covers a lot more — see the linked calculators for those.
| Element | Residential (IRC) | Notes |
|---|---|---|
| Guard opening limit | 4" sphere | No opening in the guard may allow passage of a 4" sphere, at any point including after cable deflection. |
| Standard guard height | 36" min | Measured vertically from the walking surface to the top of the guard. |
| Stair guard height | 34"–38" | [VERIFY] |
| Handrail height (separate) | 34"–38" | A graspable handrail is a separate requirement from the guard — see the Handrail Height Calculator. |
Reference only — always confirm against your local jurisdiction's adopted code before building.
Terminal post loading — the part cable railing gets wrong
A cable rail can pass every spacing and height check and still pull its end posts inward within a season, because cable systems load their terminal posts completely differently than a baluster railing does.
Why terminal posts take all the load
Every cable in the run terminates at both end posts and pulls inward with its full tension. A baluster railing has no equivalent — balusters carry no ongoing tension load. On a run with a dozen or more cables, this adds up to thousands of pounds pulling each end post toward the other.
Intermediate posts see far less
Cables run straight through intermediate posts (or through a low-friction guide), so an intermediate post mostly sees the cable's straight-line tension pass by, not accumulate. Reinforcement effort should concentrate on the terminal and corner posts, not the whole run.
Corners double the concentration
A corner post takes the pull from two runs meeting at an angle, not one. On an L-shaped or wraparound layout, corner posts are typically the first place a standard wood post proves undersized. [VERIFY: exact vector sum depends on the corner angle.]
When to reinforce or go steel
[VERIFY: post capacity depends on species, embedment or fastening method, and post cross-section — there is no single number that applies to every wood 4x4.] As a planning signal only, this calculator flags terminal loads above roughly 500 lbs and 1,500 lbs as steps up in reinforcement need.
These are planning-stage estimates, not a stamped structural design. Any terminal post carrying more than a few hundred pounds of cumulative cable tension should be sized, fastened, or engineered specifically for that load — this is the single most common cable railing callback.
Common mistakes when planning a cable railing
Most cable railing complaints — sagging cables, loosening posts, failed inspections — trace back to one of these five planning errors, not to bad tensioning technique.
Using deck spacing on a stair run
The same 3" target that's fine on a level deck can act like a ladder rung on a 35° stair rake. Tighten spacing on raked runs — see the reference table above.
Undersizing terminal posts
Sizing every post the same, based on a baluster-railing mindset, ignores that terminal and corner posts carry the accumulated tension of every cable in the run. This is the most common structural failure point.
Forgetting the bottom gap
The gap between the lowest cable and the deck or tread surface has to satisfy the 4" sphere rule too — it's not exempt just because it's not "between two cables."
Under-tensioning, or tensioning unevenly
Loose cables sag more under a footstep, effectively widening the gap beyond what the on-center spacing suggests. Tension every cable in a run to the same target, not just "tight by feel."
Ignoring thermal expansion on long runs
Stainless cable expands and contracts with temperature. Long exterior runs need re-tensioning seasonally, or a spring-loaded tensioner that self-adjusts — a fixed swage-only termination on a long run will loosen.
Skipping corner-post reinforcement
A corner post resists the pull of two runs at once, not one. Treat it structurally like a terminal post, not an intermediate one.
When to use a cable railing calculator
Cable rail planning shows up any time a builder or homeowner wants an unobstructed sightline instead of balusters — indoors or out.
Deck & Porch Railings
Keeping a view open across a level deck or porch guard.
Stair & Stringer Guards
Raked runs alongside an open stair, where spacing needs the tighter stair-specific adjustment.
View-Lot & Mountain Homes
Maximizing sightlines toward a view where solid or baluster rails would block it.
New Construction Planning
Sizing terminal posts correctly before framing, instead of discovering the load problem after install.
Baluster-to-Cable Retrofits
Replacing an existing wood baluster railing while reusing the same posts — checking whether those posts can take the new tension load.
Permit & Inspection Prep
Confirming spacing and height numbers before a plan check, since cable rail is a frequent point of inspector scrutiny.