Railing & Baluster Calculators

Four calculators for the rails on a stair, deck or landing: how much handrail to buy and where the brackets go, how to space balusters evenly so the gaps pass the sphere rule, how many cables, fittings and posts a cable railing needs, and how to divide a run into equal glass panels. Each checks the handrail or guard rules of the code you choose.

By the Stair-Math TeamUpdated

The 4 railing and baluster calculators

Which railing calculator do you need?

Pick the calculator by what you are building
Your jobCalculatorWhat you get
A handrail along a stairStair handrail calculatorSloped length, top and bottom extensions, returns, brackets, stock lengths, rail angle and newel heights — one flight or flights with landings
Balusters or spindlesBaluster spacing calculatorHow many balusters, the exact gap and centre-to-centre spacing, and the mark for the first one — level or on the stair
A cable railingCable railing calculatorCable count and length, fittings, posts and intermediate pickets for a level or stair run
A glass railingGlass railing calculatorNumber and width of equal panels, glass height to order, weight per panel and the spigots, standoffs or base shoe to buy

The railing follows the stair, so lay the stair out first with the stair calculator, and check every rail together with the rest of the stair in the stair code checker.

Handrail or guard?

They are two different rules, and many stairs need both. The handrail is for holding: it must be at a height people can reach from every step, with a grip the hand can close around, running the full length of the flight. The guard is for stopping a fall over an open side: it must be high enough and its openings small enough that a child cannot slip through.

  • Stair against two walls, four or more risers: a handrail on one side; no guard.
  • Stair with one open side, more than 30 in high: a guard on the open side — its top rail can serve as the handrail if it is 34–38 in high and graspable.
  • Deck or landing more than 30 in above the ground: a 36 in guard (42 in under the IBC); no handrail needed on the level.

Railing rules by region

Handrail and guard limits the calculators check
RuleUS IRC (homes)US IBCUK Part KAustralia NCC
Handrail height34–38 in34–38 in900–1000 mm≥ 865 mm
Handrail extensionsNone beyond the flight12 in level at the top; one tread at the slope at the bottom——
Guard height, level≥ 36 in≥ 42 in≥ 900 mm (dwellings)≥ 1000 mm
Guard height, on stairs≥ 34 in≥ 42 in≥ 900 mm≥ 865 mm
Openings< 4 in sphere; 4⅜ in on stairs< 4 in sphere< 100 mm< 125 mm

Grip size, wall clearance and how a rail ends (a return to the wall or a newel post) are also code items; the stair handrail calculator covers them.

Balusters, cable or glass?

How the three infill types compare
BalustersCableGlass
What sets the layoutThe gap: equal spacing under the sphere limitCable spacing (3 in typical) and post or picket spacing to limit sagPanel width and the gaps between panels
PostsAt each section endStrong end and corner posts; intermediate posts or pickets about every 3–4 ftFew or none with a base shoe; spigots or standoffs per panel
On stairsUsually two per treadAngled fittings follow the rakeRaked (parallelogram) panels
Watch out forGaps creeping over the limit at the endsCables loosening — the openings are tested under loadWeight and the glass type where people could be below

One deck, four railings

Results from each calculator for a typical outdoor job under the IRC:

Worked results from the four calculators
CalculatorJobResult
Handrail15 risers of 7.2 in, 10½ in treads, rail 36 in high178.24 in of sloped rail at 34.4° — one 16 ft length and 5 brackets at 48 in maximum
BalustersTwo 69½ in deck sections, 1½ in balusters13 per section, 3.571 in gaps at 5.071 in on centre — 26 balusters, 29 with 10% spare
Cable20 ft level run, 36 in guard with a bottom rail9 cables at 3 in spacing, 6 posts, 5 pickets, 189 ft of cable (207.9 ft with 10% waste)
Glass15 ft level run on spigots, 36 in guard4 equal panels 43⅛ in wide and 31½ in tall, about 61 lb each

Railing and baluster FAQs

What is the difference between a handrail and a guard?

A handrail is the rail you hold while you climb — 34–38 in above the nosings under the IRC, with a grip you can wrap your hand around. A guard (guardrail) is the barrier along an open side that stops a fall — at least 36 in high on a deck or landing and 34 in along a stair under the IRC. One rail can do both jobs on a stair if it meets both rules.

When does a deck or stair need a guard?

Under the IRC, wherever a walking surface, stair or landing is more than 30 in above the floor or ground within 36 in of its edge. Below that, a guard is optional — but a handrail is still needed on a stair with four or more risers.

How strong does a railing have to be?

Under the IRC, handrails and the top of guards must resist a 200 lb load applied in any direction, and the infill — balusters, cables or glass — a 50 lb load over one square foot. Post size and fastening carry most of that load, so follow the maker’s post spacing and mounting details.

Do railing rules differ on stairs and on landings?

Yes. Under the IRC, guards along the stair may be 34 in high and their openings may pass up to 4⅜ in, while on a deck or landing they must be 36 in high with openings under 4 in. The triangle between the tread, riser and bottom rail may pass a 6 in sphere.

Which railing type should I choose?

Wood or metal balusters are the simplest to build and repair. Cable keeps the view open but needs strong end posts and close post spacing to keep the cables tight. Glass gives the clearest view with few posts but is heavy and must be laminated where people could be below. Each calculator here lays out its type to code.

Can I use the same railing on the stair and the deck?

Usually yes, as long as the stair section meets the stair rules (handrail height and grip, 4⅜ in openings) and the deck section meets the level rules (36 in or 42 in height, 4 in openings). Cable and glass systems sell separate stair fittings and raked panels for the slope.

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. International Building Code 2021, Sections 1014 and 1015 — Handrails and guards (opens in a new tab)International Code Council. Handrail height 34–38 in and extensions — 12 in level at the top, one tread depth at the slope at the bottom (1014.6); guards 42 in high with openings that do not pass a 4 in sphere (1015).
  3. 2010 ADA Standards for Accessible Design, §505.10 — Handrail extensions (opens in a new tab)U.S. Access Board. Stair handrails extend 12 in horizontally at the top and continue at the slope for one tread depth beyond the bottom nosing.
  4. Approved Document K: Protection from falling, collision and impact (opens in a new tab)UK Government (statutory guidance for England). Handrails 900–1000 mm above the pitch line; guarding to stairs and landings in dwellings at least 900 mm high, with openings that do not pass a 100 mm sphere.
  5. National Construction Code 2019, Volume Two, Part 3.9.2 — Barriers and handrails (opens in a new tab)Australian Building Codes Board. Barrier openings that do not pass a 125 mm sphere; barriers at least 1 m high, 865 mm above the nosings of stairs.

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

All calculatorsEvery Stair-Math calculator on one page, by category.View all

Other stair calculator categories