Handrail Length Calculator

Calculate the handrail length needed for a staircase from the horizontal run and vertical rise.
Supports imperial and metric.

In the same unit as the run and rise. Leave blank to use 6 ft.
Handrail Length

A handrail has to meet building code requirements for safety, so work out the total length and the post spacing before you buy anything. Both come from the staircase’s total rise, total run, and the post interval you choose.

Stair geometry: Stair Angle = arctan(Total Rise / Total Run) Stair Length (hypotenuse) = √(Total Rise² + Total Run²)

This stair length is the actual handrail run along the slope.

Post spacing: The International Residential Code (IRC) limits guard openings so that a 4-inch sphere cannot pass through (IRC R312.1.3). On the open side of a stair there is an exception: the triangular gap formed by the tread, riser, and bottom rail may pass a 6-inch sphere. Newel posts themselves are typically set every 72–108 inches (6–9 ft) depending on the structure.

Number of Posts = Ceiling(Stair Length / Max Post Spacing) + 1 Actual Post Spacing = Stair Length / (Number of Posts − 1)

Worked example: Staircase: Total Rise = 9 ft, Total Run = 12 ft Stair Length = √(9² + 12²) = √(81 + 144) = √225 = 15 ft At max 8 ft post spacing: Posts needed = Ceiling(15/8) + 1 = 2 + 1 = 3 posts Actual spacing = 15 / 2 = 7.5 ft between posts Handrail length = 15 ft + 18 in of extension allowance (12 in at the top, 6 in at the bottom) = 16.5 ft

Code requirements (IRC 2021):

  • Handrail height: 34–38 inches above stair nosing
  • Required when staircase has 4 or more risers
  • Graspability: diameter 1.25–2 inches for round rails; grip zone profile required for other shapes
  • Ends must return to wall or newel post (no protruding ends)

Material lengths: Standard handrail stock comes in 8 ft and 12 ft lengths. Order 10% extra for waste cuts at angle.


How we build and check this calculator

This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.

SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.


Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.