Handrails are installed on stairs to assist in ascending and descending by providing something to grasp for balance. Building codes require any flight of stairs with four or more rises to be built with a handrail on at least one side.
Handrails are required on stairways and must meet specific guidelines. The top of the handrail must be between 34" - 38" above the nosing of the stair treads. It is important that your handrail be installed so that it runs the full length of the stairs and returns at the ends.
There are many techniques and profiles for the grip. It must meet the basic requirement which states that the handrail shall not be less than 1 1/4" or more than 2 5/8" in diameter, and it must provide a smooth grippable surface. The handrail must be made out of decay-resistant material. Some deck contractors router a cavity in cedar 2x4s to create handrails.