Installing a sub-panel in a garage makes it convenient to turn the electricity off and on when needed. You do not want to have to go all the way down to the basement when you need to shut the power off in the garage. The first thing you need to think about is the size of voltage sub-panel you will need. This will depend on what you will be doing in the garage. If you are running welders and compressors that require high voltage then you will need a 100-amp sub-panel. If you are just doing small jobs then you will only need a 50-amp to 60-amp sub-panel. The most common outbuilding sub-panels are 60-amp.
Dig an 18-inch deep trench from the location where the wire will enter the house to the garage.
Use 1 1/4 inch PVC conduit for a 100-amp sub-panel or 1 inch PVC conduit if the sub-panel is 50 amps or less. Run the conduit from the garage to the main panel box. If concrete has not been poured in the garage, run conduit down into the ground on the inside of the garage. Use a 90 degree sweep connector, instead of a sharp 90 degree connector, to make it easier to pull the wire through. If the concrete is already done, run the conduit up the wall on the outside of the garage and use a PVC LB access fitting to go through the wall where the sub-panel box is to be mounted. Do the same at the main panel box.
Screw a piece of plywood that is 6 inches bigger then the sub-panel to the wall where the sub-panel is going. This is called a backer. Screw the sub-panel box to the center of the backer and connect the conduit to the sub-panel. Some local codes require the backer to be painted black.
Use #8 THHN wire for a 50-amp sub-panel or #2 THHN wire if the sub-panel is 100 amps. Run the wire from the main panel to the sub-panel box. Run black, red, white and green wires from the sub-panel box to the main panel box.
In the sub-panel, connect the red and black wires to the main lugs on the top of the main buss. Connect the white wire to the neutral buss bar, located along the side of the main bus, and connect the green wire to the ground buss bar, which is connected directly onto the sub-panel.
In the main panel box, install the breaker into the main buss. Connect the red and black wires to the screws on the breaker. Connect the white wire to the neutral buss bar and the green wire to the ground buss bar.
Test the sub-panel with a voltage meter to ensure itl has the correct amperage. Replace the panel box covers and turn the garage breaker on.