mystaircalculator.com logo mystaircalculator.com
  1. Home
  2. Calculators
  3. Railing, Baluster & Safety
  4. Cable Railing Calculator
Railing, Baluster & Safety

Cable Railing Calculator

Enter your rail run and guard height. Get cable count, on-center spacing, total cable footage, fitting counts and the terminal post load your end posts actually have to resist — checked against the 4-inch sphere rule as you type.

Free to use No sign-up required Checked against IRC guard rules Level decks & raked stairs
Cable count & spacing calculated Terminal post load included Fitting & footage counts built in Last verified July 2026
Checked line-by-line by our in-house stair-planning team before publishing — figures re-verified July 2026. This tool covers residential DIY-scale cable rail runs; large commercial runs should get a manufacturer engineering review.
in

Measure the straight horizontal footprint of the run, terminal post to terminal post — not the sloped rail length on a stair.

Raked runs get a tighter spacing recommendation — see the Cable & Spacing Reference section below.

inches

Most installers target under the 4" sphere-rule maximum to leave margin for cable deflection once tensioned and stepped on.

Advanced: posts & turns
inches

Auto-fills a typical max for the selected post material — override if your system's spec sheet says otherwise.

posts
Advanced: tension & rake
lbs

Typical installer target; your cable system's spec sheet is the final word — ranges vary by hardware brand and cable diameter.

°

Steeper rakes tighten the recommended spacing further to keep the run from acting like a ladder.

Elevation diagram of the calculated cable railing run

Results

Cable Count
lines
Actual Spacing
in
Post Count
posts
Actual Post Spacing
in
Total Cable Needed
ft
End Fittings
pcs
Tensioners
pcs
Corner Fittings
pcs
Terminal Post Load
lbs
How to measure

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.

1

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.

2

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.

3

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.

4

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 math

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

n = floor( (H − 1 − S) ÷ S ) + 1

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

S_actual = (H − 1 − S) ÷ (n − 1)

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

p = ceil( Run ÷ Max Post Spacing ) + 1

Terminal posts at both ends plus however many intermediate posts keep every span under the material's max spacing.

Terminal Post Load

F = n × T

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

L = n × (Run + 6") ÷ 12

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.

Worked example

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.

1

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.

2

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".

3

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.

4

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.

Cable & spacing reference

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 DiameterTypical 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.]

Code reference

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.

ElementResidential (IRC)Notes
Guard opening limit4" sphereNo opening in the guard may allow passage of a 4" sphere, at any point including after cable deflection.
Standard guard height36" minMeasured vertically from the walking surface to the top of the guard.
Stair guard height34"–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.

Beyond spacing

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

F_terminal = n × T

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

F_intermediate ≈ small lateral component only

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

Corner load ≈ 2 × single-run pull (vector sum)

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

Compare F_terminal to your post's rated capacity

[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.

Avoid these

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.

Who uses this

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.

FAQ

Common questions

How far apart should cable railing be spaced?
Code sets a hard maximum of a 4" sphere passing through anywhere in the guard. Most installers target closer to 3" on-center on a level run, and tighter still on a stair, to leave margin for cable sag once the cables are stepped or leaned on.
Why does a stair cable railing need tighter spacing than a deck railing?
On an inclined run, horizontal cables sit closer to a climbable ladder shape than they do on a level run, which is a particular concern for young children. Tightening the on-center spacing on a rake reduces that risk beyond what a level-run spacing alone provides.
How much tension should cable railing have?
Typical residential installations target somewhere in the 200-500 lb range per cable, measured with a tension gauge, though the exact number depends on the hardware manufacturer, cable diameter, and post spacing. Always check your specific system's published spec sheet.
Why is my terminal post loosening after installation?
Every cable in the run pulls on each terminal post with its full tension, and those pulls add together. A run with a dozen or more cables can load a single end post with well over a thousand pounds of cumulative inward pull, which an ordinary wood 4x4 sized for a baluster railing was never built to resist.
Do I need a bigger post at the corners?
Usually yes. A corner post resists the pull from two runs meeting at an angle rather than one, which concentrates more load there than at a straight intermediate post — treat corner posts structurally like terminal posts.
What size wire or cable is standard for railing?
1/8" (3mm) and 3/16" (4.8mm) 1x19 stainless steel cable are the two most common diameters for residential railing. The thicker 3/16" cable holds tension better over longer runs but costs more per foot and needs slightly larger-bore fittings.
304 or 316 stainless steel cable — which one do I need?
316 stainless resists corrosion better and is generally recommended for coastal or high-moisture exterior installations. 304 stainless is a common, less expensive choice for interior or drier exterior climates. [VERIFY: confirm the recommendation against your specific coastal exposure and hardware manufacturer's guidance.]
How much extra cable should I buy beyond the calculated footage?
This calculator already adds roughly 6 inches per cable for swaging and tensioner take-up. Buying an additional 5-10% beyond the total is a common cushion for cutting mistakes, since cable is typically sold by the reel or a fixed spool length.
Can I run cable railing through existing wood posts?
Often yes for intermediate posts, but check the terminal post load first. A post that comfortably held a baluster railing may not be adequate once it's resisting the cumulative tension of a dozen or more cables — see the Terminal Post Loading section above.
How many fittings does a cable railing job need?
Plan on two end fittings per cable — typically a fixed stud at one terminal post and a tensioner at the other — plus additional fittings at any corner post the cable passes through or terminates at. This calculator totals both counts from your run inputs.
Does cable railing need a permit?
In most jurisdictions, yes — cable railing is a guard, and guards are typically covered under the same permit as the deck or stair it protects. Confirm with your local building department before installation.