Calculateus

Stair Railing Calculator

Calculate the length of handrail and number of balusters needed for a staircase.

Result

Handrail Length Needed
15 ft (4.57 m)
Balusters Needed
45

Building codes commonly require baluster gaps no wider than 4" (so a sphere that size can't pass through) - check your local code before finalizing spacing.

About the Stair Railing

A stair handrail runs at an angle, not flat, which means its true length comes from the diagonal between a staircase's horizontal run and vertical rise, not either measurement alone.

How It Works

The calculator applies the Pythagorean theorem to the stair's horizontal run and total rise to find the actual sloped handrail length, then divides that length by the baluster spacing to estimate how many balusters are needed.

rail length = √(run² + rise²); balusters = rail length ÷ baluster spacing

Examples

A standard interior staircase

A 12 ft horizontal run with 9 ft of total rise needs about 15 ft of handrail, and at 4 inch baluster spacing, about 45 balusters.

A steeper, shorter staircase

An 8 ft run with the same 9 ft rise needs about 12 ft of handrail, a shorter overall length despite the steeper angle.

Advantages

  • Uses the true sloped length rather than the flat horizontal run for accuracy
  • Applies standard code-minimum baluster spacing guidance
  • Shows both handrail length and baluster count in one calculation

Common Mistakes

  • Ordering handrail material based on the flat horizontal run instead of the sloped length
  • Using baluster spacing wider than local code allows
  • Not accounting for extra balusters needed at landings or direction changes

Edge Cases to Watch For

  • Most US building codes require baluster gaps no wider than 4 inches, so a sphere that size can't pass through; always confirm your local code before finalizing spacing.
  • Landings, winders, and curved staircases add complexity beyond a straight run, and would need separate calculations for each straight section.
  • Post-to-post railing systems space balusters slightly differently than continuous (over-the-post) systems, which can shift the exact count needed at the top and bottom newel posts.

Common Use Cases

  • Estimating handrail length and baluster count for a new staircase
  • Budgeting a stair railing replacement or renovation project
  • Checking baluster spacing against local building code requirements
Written & fact-checked by the Calculateus TeamLast updated August 5, 2026How we verify our formulas

Frequently asked questions

Why does the calculator use the diagonal, not the horizontal run, for handrail length?

A stair handrail runs parallel to the stair slope (the hypotenuse of the run and rise), not flat along the floor - using the diagonal length via the Pythagorean theorem gives the actual rail length you need to order.

Conclusion

The Pythagorean theorem is what separates an accurate handrail length from a rough guess based on the horizontal run alone. Confirm baluster spacing against local code before finalizing an order, since code minimums vary and a railing that fails inspection means redoing the work.