Place the fireplace mantel on a work surface with the back side facing up. Measure the length of the mounting slot in the back side of the mantel, using a tape measure.
Lay the 2-inch by 4-inch board flat on the table of a miter saw. Measure the length measurement you took in Step 1 from one end of the board. Mark the measurement on the board, using a pencil.
Slide the board along the table of the miter saw, and line up the outside edge of the pencil mark with the edge of the saw blade. Pull the trigger and guide the saw down through the wood in an even motion. Raise the saw back up through the cut and release the trigger.
Run a stud finder along the wall above the fireplace surround and mark the stud locations with a pencil.
Hold the cut 2-inch by 4-inch board with the 4-inch side flush against the wall above the fireplace surround at the height required for the mantel. Lay a level across the top of the board and adjust it for level.
Drive three evenly spaced wood screws through the board into each wall stud, using a screw gun.
Apply construction adhesive to the top and front face of the board, and press the mantel in place over it. Drive wood screws along the top back edge of the mantel every 4 to 6 inches, using a screw gun. Sink the screws just below the surface of the wood.