Measure the height between the top and bottom rails of the railing system, using a measuring tape. Most deck railing has a bottom and top rail with beams that run vertically to connect them.
Measure two-by-four board to the distance determined in Step 1. Mark the wood with the length, using a pencil.
Set a square on the wood across the 4-inch side of the two-by-four where the mark is and draw a line.
Cut along the mark with a saw. For a clean, quick cut, use a circular saw. Cut more than one board if you have more than one location that must be connected to the house.
Set the cut two-by-four board so the length of its 4-inch side is resting up against the end of the railing system that will be up against the house.
Attach the board to the ends of the top and bottom railing bars, using a drill. Drill in 2 1/2-inch galvanized screws to the ends.
Place the railing on the deck the same as the rest of the railing sections. The two-by-four end piece should be up against the wall of the house. Drill screws into the house wall through the two-by-four. If you are installing on vinyl siding, locate a stud and set the deck up so that the railing will hit that spot. For bricks, drill in masonry screws, and for wood siding, drill in wood screws.