Cable Railing Calculator

Enter your run length and guard height and get the number of cable runs and their real spacing, the total cable to buy with ends and waste, the fittings, the posts and bay width, and the intermediate pickets that stop the cables deflecting — on a level deck or along a stair.

By the Stair-Math TeamUpdated How we check this calculator

Level or stair?

Your railing

in

Total railing length, end post to end post.

in

36 in for homes (IRC), 42 in commercial (IBC). On stairs, above the nosing line.

in

in

0 = no bottom rail, cables run down to the deck.

in

3 in is the usual maker limit.

Quick picks:

Units

Your cable railing

Elevation of the cable railing to scale with posts, pickets, rails and every cable
Elevation to scale; long runs show the first bays. Drag the top of the first post to change the guard height.

Cable railing check

    Solved with your numbers

      Assumptions: cables run parallel to the rails at equal spacing; one continuous cable per run segment; the end allowance covers the terminal hardware at each end; posts are spaced evenly. Post and frame design for cable tension is not calculated — follow your cable system’s instructions.

      The opening limit comes from IRC R312.1.3; the 3 in spacing, picket and run-length limits are common cable-railing maker guidance, listed under Sources; the quantities are worked out on this page. Tested against 5 worked cases, including an 85 ft run split in two, a stair run and a metric deck. See the method · Sources

      How the cable railing calculator works

      With guard height H, top rail depth d, bottom rail top height b (0 if the cables run to the deck), maximum spacing m and run length L:

      clear zone V = H − d − b (stairs: H − d, measured plumb above the nosing line)

      spaces = ceil(V ÷ m) · cables = spaces − 1 · actual spacing = V ÷ spaces

      run length = L (stairs: L × √(1 + (R ÷ T)²)) · segments = ceil(run ÷ maximum cable run)

      cable per run = run + 2 × end allowance × segments · total = cables × cable per run · with waste = total × (1 + waste %)

      fittings = cables × segments × 2 · posts = ceil(L ÷ max post spacing) + 1 · bay = L ÷ (posts − 1)

      pickets = (ceil(bay ÷ threshold) − 1) × bays when the bay is wider than the threshold

      Worked examples

      A 20 ft deck at 36 in

      1. Inputs240 in run · 36 in guard · 2½ in top rail · bottom rail 3½ in up · 3 in maximum spacing · posts up to 48 in · pickets over 36 in · 6 in per end · 70 ft maximum run · 10% waste.
      2. CablesClear zone 36 − 2.5 − 3.5 = 30 in → 10 spaces → 9 cables at exactly 3.000 in.
      3. Cable240 + 12 = 252 in per cable; 9 × 252 = 189.0 ft; 207.9 ft with waste.
      4. Hardware18 fittings; 6 posts with 48 in bays; one picket in each bay — 5 in all.

      An 85 ft run

      At 85 ft the run is longer than the 70 ft maximum, so each of the 9 cables is split into 2 tensioned segments: 783.0 ft of cable (861.3 ft with waste), 36 fittings, 18 posts at 60 in and 17 pickets.

      A stair

      Over 147 in of horizontal run on 7.2 in risers and 10½ in treads, each cable follows the rake for 178.24 in. A 36 in guard with a 2½ in top rail leaves 33.5 in: 11 cables at 2.792 in, 174.4 ft of cable (191.8 ft with waste), 22 fittings set to 34.4°, 5 posts and 4 pickets.

      How many cables for a 36 or 42 in railing?

      Cable runs at 3 in maximum spacing with a 2½ in top rail
      Guard heightWith a bottom rail 3½ in upCables to the deck
      36 in (IRC)9 cables at 3"11 cables at 2-13/16"
      42 in (IBC)11 cables at 3"13 cables at 2-13/16"

      The table under your result shows the count for other guard heights with your own rails.

      Cable spacing and the 4 in rule

      Guards must not let a 4 in sphere through (IRC R312.1.3). Rigid balusters can be spaced right up to that limit, but cables are flexible: push a 4 in ball between two cables 3½ in apart and it may pass. That is why cable systems keep spacing at 3 in or less, tension the cables hard and limit the distance between supports. The calculator spaces the cables evenly through the whole clear zone, so the real spacing is often a little under your maximum.

      Post spacing and intermediate pickets

      Posts are spaced evenly along the run at no more than your maximum. Where a bay is wider than the picket threshold — about 3 ft for most systems — thin intermediate pickets hold the cables in line without taking the tension. End and corner posts take the full pull of every cable and must be built for it; long runs split into separate tensioned segments with their own fittings.

      Cable railing on stairs

      On a stair the cables run parallel to the nosing line, so each one is longer than the horizontal run — about 21% longer on a 34° stair. The end fittings must pivot or sit on bevelled washers set to the stair angle, and the clear zone is measured plumb above the nosings. The 4⅜ in stair limit in the IRC does not change the 3 in cable spacing.

      Ordering cable

      • Order the total with waste, rounded up to the reel sizes your supplier sells.
      • Check the end allowance for your fittings — swaged ends need less than tensioners with long threaded bodies.
      • Count one fitting for each end of each cable segment, and at least one tensioner per segment.
      • Use the top rail length from the stair handrail calculator on stairs.

      What this calculator does not cover

      Cable railing FAQs

      How far apart should cable railing cables be?

      No more than 3 in apart. The code limit is a 4 in sphere, but cables deflect when pushed, so cable railing makers keep the spacing to 3 in or less with tight cables and close-enough posts. The calculator divides your clear zone evenly so every space is the same and none is over your maximum.

      How many cables are needed for a 36 in railing?

      With a 2½ in top rail and a bottom rail 3½ in above the deck, the clear zone is 30 in, which takes 9 cables at exactly 3 in. Without a bottom rail it takes 11. A 42 in railing takes 11 with a bottom rail and 13 without.

      How much cable do I need?

      Multiply the number of cable runs by the run length plus an allowance at each end for the fittings, then add waste. For a 20 ft deck with 9 cables and 6 in at each end that is 9 × 21 ft = 189 ft, or about 208 ft with 10% waste.

      How far apart should cable railing posts be?

      Most systems allow posts up to about 4–5 ft apart, with an intermediate picket (a thin spacer post) wherever a bay is wider than about 3 ft so the cables cannot be spread apart. End and corner posts must be stiff enough for the full cable tension.

      Do I need intermediate pickets in a cable railing?

      Yes, if a bay between posts is more than about 3 ft. Without them the cables can deflect enough for a 4 in sphere to pass. A 48 in bay needs one picket in the middle.

      Can cable railing go on stairs?

      Yes. The cables run parallel to the stair, so each one is longer than the horizontal run by the slope factor, and the end fittings must pivot or sit on bevelled washers set to the stair angle. Spacing is measured plumb, the same as on a deck.

      Does cable railing meet code?

      It can. The code test is the same as for balusters — a 4 in sphere must not pass anywhere, measured with the cables under load. Keep spacing at 3 in or less, tension the cables properly and fit pickets in wide bays. Some areas also have rules about horizontal infill that children could climb; check locally.

      Should I use 1/8 in or 3/16 in cable?

      1/8 in stainless cable is common on residential decks and looks lighter; 3/16 in is stiffer, deflects less and is often used on long runs and commercial work. Use the size your fittings are made for.

      Sources

      1. International Residential Code 2021, Sections R311.7.8 and R312.1 — Handrails and guards (opens in a new tab)International Code Council. Handrails on flights of four or more risers (R311.7.8), 34–38 in above the nosings (R311.7.8.1), 1-1/2 in wall clearance (R311.7.8.3), continuous from above the top riser to above the lowest riser with returned or newel ends (R311.7.8.4), 1-1/4 to 2 in round grip (R311.7.8.5); guards where the drop exceeds 30 in (R312.1.1), 36 in high or 34 in on the open side of stairs (R312.1.2), openings that do not pass a 4 in sphere, 4-3/8 in on stairs and 6 in at the stair triangle (R312.1.3).
      2. Cable railing manufacturer installation guidanceCommon maker guidance: cables no more than 3 in apart; 2 fittings per cable run; intermediate pickets where posts are more than about 3 ft apart; straight runs up to about 70 ft and about 50 ft where the run turns corners. Follow the limits of the system you buy.
      3. Cable quantityCommon practice: cable per run = run length plus an end allowance at each fitting, with a waste allowance for cutting and tensioning.
      4. Cable railing geometryDerived from geometry: equal spacing = clear zone ÷ number of spaces; on stairs the cable length is the horizontal run × √(1 + (riser ÷ tread)²) and the fitting angle is atan(riser ÷ tread).

      Code text is the final word. Editions and local amendments differ — check the edition your building department enforces.

      Railing & baluster calculatorsAll 4 tools for handrails and guards — handrail length, baluster spacing, cable railing and glass railing.View all 4

      Other stair calculator categories