Remove the screws holding the old rail’s hardware to the wall, turning the screws counterclockwise with a screwdriver. Measure the length of the old railing before removing it from your house.
Measure the new rail and cut off any portion that exceeds the length of the old rail, using a circular saw. Sand the portion of the rail you trimmed until it is smooth.
Mark a straight vertical line intersecting a straight horizontal line where the old railing's top and bottom mounts are located on the wall. Use a torpedo level to ensure the lines sit level. Measure that the lines intersect 36 inches above the stair treads.
Hold the railing over the wall where you plan to install it. Mark on the underside of the rail where the top and bottom intersecting lines sit. Attach the mounting hardware to the spots you marked on the underside of the rail by driving screws through the hardware’s mounting holes.
Hold the stair rail so the mounting hardware lines up with the intersecting lines on the wall, and then drive screws through the hardware and into the wall studs. Attach hardware to the underside of the rail at the location of the other wall studs, and then drive screws through the hardware and into the studs.