Measuring your stair before you order railing
This calculator builds the whole material list off two numbers you already have from planning the stair itself: total rise and total run.
Reuse your total rise and run
If you've already run the Rise & Run Calculator for this stair, enter the same two numbers here — the rail follows the same rake line as the stringer.
Decide which sides get a guard vs. a wall rail
An open side (no wall) needs posts and balusters to meet the guard requirement. A side against a stud wall just needs a wall-mounted handrail on brackets — no balusters.
Pick a baluster style
Wider balusters mean fewer of them for the same spacing rule, but check the reference table below — cost and look vary a lot between wood and iron.
Read the compliance chips
Green means the result sits inside IRC residential limits. Amber flags a manufacturer guideline rather than a hard code number — still worth checking, but confirm it against your specific rail system.
The six formulas behind every result
Nothing on this page is a black box. Here's exactly what runs when you change a number.
Rail Run Length
The straight-line rake distance the handrail has to cover, from the Pythagorean triangle formed by total rise and total run.
Rail Rake Angle
The overall slope of the stair envelope. Runs a degree or two steeper than the individual riser-to-tread angle — see the worked example for why.
Balusters per Section
Span is the clear post-to-post distance, G is the max allowed clear gap (4" by default), and W is baluster width. This is the standard even-spacing solve.
Actual Clear Gap
Once n is fixed to a whole number, balusters get spread evenly and the true gap comes out slightly under your target — this is the number that has to stay under 4".
Newel Posts
Every open (guarded) side needs a start post, an end post, and one more per turn or landing corner.
Rail Material
Each rail run (one per open side, plus one per wall side) needs the rake length plus a small allowance per corner joint, then a waste factor for cuts and mistakes.
Walking through a 108" rise, 130" run flight
Same rise and run as the Rise & Run Calculator's own worked example, with the default "open + wall" configuration and square wood balusters.
Rail length and angle
√(108² + 130²) = 169.0" of rail run. atan(108 ÷ 130) = 39.7°. That's about 2° steeper than the 37.6° step angle you'd get from riser÷tread alone — total run here is measured across 13 tread depths while total rise spans all 14 risers, so the overall envelope slope always reads a little steeper than the per-step ratio.
Baluster span and count
With no turns, the open side is one section. Subtracting roughly 3.5" for the two 4×4 newel post faces leaves a 165.5" clear span. At 1.5" wide balusters and a 4" max gap: n = ceil((165.5−4) ÷ (1.5+4)) = 30 balusters.
Actual spacing
Spreading 30 balusters evenly across the 165.5" span gives an actual clear gap of (165.5 − 45) ÷ 31 = 3.89" — under the 4" limit, so the spacing chip passes with a small margin to spare.
Posts, brackets, rail and fasteners
One open side with no turns needs 2 newel posts. The wall side needs brackets every 48" or less: ceil(169.0 ÷ 48) + 1 = 5 brackets. Two rail runs (open + wall) at 169.0" each, plus 10% waste, round to about 31.0 linear ft of handrail stock. Fasteners: 30 balusters × 2, plus 2 posts × 4 lag bolts, plus 5 brackets × 3 screws = 83 fasteners total.
This is why the baluster count is so sensitive to post width and turns — the same 169" rail run with one turn splits into two shorter sections, and short sections lose proportionally more clear span to the extra post faces, which usually raises the total baluster count slightly even though the overall rail length barely changes.
How baluster width changes the count
Narrower balusters need more pieces to close the same gap. This is the exact width each style uses in the calculation above.
| Style | Width | Effect on count | Typical use |
|---|---|---|---|
| Square wood | 1.5" | Baseline — fewest pieces of the four styles | Traditional interior stairs, painted or stained trim |
| Round wood (turned) | 1.25" | Slightly more pieces than square wood | Colonial / turned-baluster staircases |
| Iron, round | 9/16" | Roughly double the count of square wood | Modern or wrought-iron guard systems |
| Iron, square | 1/2" | Highest count — narrowest profile | Slim modern iron balusters, mixed-material rails |
Want spacing solved on its own, without the rest of the material list? Use the Baluster Spacing Calculator.
IRC residential railing code, quick reference
This calculator checks your result against the two hard limits below. Full residential code also covers handrail grip profile and guard height on landings — see the linked calculators for those.
| Element | Residential (IRC) | Commercial (IBC) |
|---|---|---|
| Handrail height (stairs) | 34"–38" | 34"–38" |
| Guard height (landings/decks) | 36" min | 42" min |
| Max baluster clear spacing | 4" (sphere) | 4" (sphere) |
| Handrail grip diameter (circular) | 1.25"–2" | 1.25"–2" |
| Guard trigger height above grade | 30"+ | 30"+ |
Reference only — always confirm against your local jurisdiction's adopted code before building.
Posts, brackets & ordering the right stock
A rail can pass every spacing check and still fail in the field over three things this section covers — post sag, bracket blocking, and buying baluster stock that's actually long enough after cutting.
Post spacing and top-rail sag
Unlike baluster spacing, there's no single IRC number for how far apart guard posts can be — it's set by the rail manufacturer's structural rating, and it varies by rail material and post size. 72" is a common wood-rail rule of thumb; confirm against your specific system before finalizing post layout.
Wall bracket blocking
Wall-mounted handrail brackets need solid blocking behind the drywall at every screw location, not just at the ends. Mark bracket positions before rough-in — retrofitting blocking after drywall is up is the single biggest reason wall rails end up screwed only into drywall anchors.
Baluster stock length
Pre-turned balusters are sold in standard lengths (32", 34", 36", 39", 42"). The 1" allowance here is a rough shoe/dowel deduction — some baluster and shoe systems eat significantly more length than that, so this result is a starting point for ordering, not a final cut list.
Continuous graspability
Code requires the handrail to be continuous, without interruption by newel posts or other obstructions, for the full length of the stair flight. Post caps and rail-to-post transitions have to keep a graspable profile running through, not stop and restart at each post.
These are planning-stage estimates, not a stamped structural design. A long unsupported rail span, an unusual load case, or a custom bracket system may need the manufacturer's engineering data regardless of what this calculator shows.
Common mistakes when planning stair railing
Most rail material shortages — and most failed guard inspections — trace back to one of these five planning errors.
Measuring post-to-post instead of clear span
Forgetting to subtract post width before running the spacing formula overstates the usable span and understates how many balusters you actually need.
Applying the flat 4" sphere rule on the raked section without a check
The sphere test still applies along the slope, but a very steep rake can tighten the effective triangular opening near the bottom of each baluster more than the flat clear-gap number suggests — inspectors check both.
Ordering baluster stock without a shoe allowance
Buying pieces at exactly your rail height leaves nothing for the tenon or shoe block — round up to the next standard stock length, not down.
Skipping blocking for wall brackets
Brackets screwed only into drywall anchors will eventually pull loose under a real hand load. Plan blocking locations before drywall goes up.
Forgetting handrail continuity at posts
Code requires the graspable rail to run continuously past newel posts. A design that stops and restarts the profile at every post is a common reason for a failed rough-in inspection.
When to use a stair railing calculator
Railing material planning shows up right after rise-and-run layout is locked, for almost every stair project.
Basement / Interior Open Guard
Sizing a post-and-baluster guard for a newly opened basement stairwell.
Deck Stair Railing
Material list for an outdoor guard alongside a deck stair build.
Wall Handrail Replacement
Swapping an old wall-mounted rail and figuring out bracket count and blocking.
New-Construction Package
Estimating the full railing bill of materials before ordering for a new-build stair.
Code Compliance Retrofit
Checking whether an older stair's baluster spacing needs to be tightened to pass a current inspection.
Iron Baluster Upgrade
Comparing baluster count and material between a wood-to-iron guard upgrade.