Set your stair rail against the stairs and verify that you received the proper length. The stair rail should extend past the top and bottom stair.
Run a stud finder along the wall, and mark each stud with a piece of tape. You’ll know you’ve passed over a stud because the stud finder will typically either beep or light up.
Set the handrail into position again and trace the rail’s top onto the masking tape at the stair rail’s top. This will guide where you position the stair rail brackets.
Line up a bracket so that it is perpendicular to the stairs and touches the line you drew.
Mark the screw holes through the bracket onto the tape for referencing.
Drill pilot holes through the marked screw holes on the tape. The pilot holes should be roughly 1/8 inch to allow the screw to grip the wall and wood. If your screw hole is not making contact with the stud, pull out and angle it inward slightly so each screw bites into the stud.
Remove the masking tape from the wall once every stud has been prepped for a bracket.
Place a screwdriver bit onto your drill and screw the brackets into the wall, angling the screws as necessary.
Set the stair rail onto the brackets and screw it into place.