You can connect a light switch and outlet to the same circuit, but the wiring order matters

A light switch and outlet can share the same electrical circuit, but how you wire them determines whether the switch controls the outlet, the light, both, or neither. The most common setup is to run power to the outlet first, then branch off to the switch and light fixture. This way the outlet stays live all the time, and the switch controls only the light. If you want the switch to control the outlet instead — useful for lamps plugged into that outlet — you wire it differently.

Before you start, turn off power at the breaker and test the wires with a non-contact voltage tester to confirm the power is off. Working with live wires can cause serious injury or death. If you are not comfortable working inside walls or junction boxes, hire a licensed electrician. Local building codes may require a permit for this work, and an inspector will check it before you close up the walls.

Key Takeaways

  • Always turn off power at the breaker and test with a voltage tester before touching any wires.
  • To keep the outlet always-on and control only the light, run power to the outlet first, then branch to the switch and fixture.
  • To make the switch control the outlet instead, wire the switch to interrupt the hot wire feeding the outlet.
  • Use the correct wire gauge for your circuit: 14-gauge wire for 15-amp circuits, 12-gauge for 20-amp circuits.
  • Secure all connections inside a junction box or outlet box; never leave spliced wires exposed inside a wall.

The two main wiring configurations

The first configuration keeps the outlet permanently powered and the switch controls only the light. Power enters the outlet box, where you connect the hot (black) wire to the outlet's brass terminal. From the outlet's silver terminal, you run a neutral (white) wire back to the power source. Then you run a separate hot wire from the outlet box to the switch box, and from the switch to the light fixture. The switch interrupts only the hot wire going to the light, so the outlet stays live whether the light is on or off.

The second configuration makes the switch control the outlet. Power enters the switch box first. The hot wire goes to one terminal of the switch, and a wire from the other terminal runs to the outlet box. When you flip the switch on, power flows to the outlet; when you flip it off, the outlet loses power. This setup is useful if you want to control a lamp by flipping the wall switch instead of reaching behind furniture to plug and unplug it.

Wiring the outlet-first setup step by step

Start at the breaker panel. Turn off the breaker that controls this circuit. Use a voltage tester on the existing outlet or light fixture to confirm power is off. Once you are certain the power is off, you can begin.

Run a cable from the power source (either an existing outlet, the breaker panel, or a junction box) to the outlet box. Strip about 6 inches of the outer sheathing from the cable. Inside you will find a black (hot) wire, a white (neutral) wire, and a bare copper (ground) wire. Connect the black wire to the brass screw on the outlet, the white wire to the silver screw, and the copper wire to the green screw. Secure the outlet in the box.

From the outlet box, run a new cable to the switch box. Strip the sheathing and connect the black wire to one of the switch terminals (it does not matter which one). Run another black wire from the other switch terminal to the light fixture's hot terminal. Connect the white and copper wires from the cable to the light fixture's neutral and ground terminals. The switch now controls only the light; the outlet remains powered at all times.

Wiring the switch-first setup step by step

This configuration is simpler if you want the switch to control the outlet. Turn off the breaker and test for power. Run a cable from the power source to the switch box. Connect the black wire to one switch terminal and the other switch terminal to a new black wire that runs to the outlet box.

In the outlet box, connect the black wire from the switch to the brass terminal of the outlet. Connect a white (neutral) wire directly from the power source to the silver terminal of the outlet — this wire does not go through the switch, because the outlet always needs a neutral path. Connect the ground wire to the green screw. Now when you flip the switch, power flows to the outlet; when you turn it off, the outlet loses power.

Wire gauge and circuit capacity

Use 14-gauge wire for a 15-amp circuit and 12-gauge wire for a 20-amp circuit. The gauge is printed on the cable sheathing. If you use wire that is too thin for the circuit's amperage, the wire can overheat and cause a fire. If you are unsure what amperage your circuit is rated for, check the breaker in the panel — the number on the breaker (usually 15 or 20) tells you the circuit's capacity.

Do not mix gauges on the same circuit. If the existing wiring is 12-gauge, use 12-gauge for all new runs. If it is 14-gauge, stick with 14-gauge throughout. Mismatched wire gauges can create bottlenecks where thinner wire overheats while thicker wire remains cool, defeating the protection the breaker is supposed to provide.

Securing connections in boxes

All wire connections must be inside a box — either an outlet box, switch box, or junction box. Never leave spliced wires exposed inside a wall. Use wire nuts (the plastic caps that twist onto spliced wires) to join wires of the same gauge, and twist them until they are tight and no bare wire is visible. Wrap the connection with electrical tape for extra security.

Make sure the box is large enough for the number of wires inside. A standard single-gang outlet box holds up to 8 wires; a switch box holds up to 8 wires. If you are running multiple cables into one box, you may need a larger box. Check the box's rating, printed inside on the back or sides. Cramming too many wires into a small box can damage insulation and create a fire hazard.

Testing your work before closing the wall

Before you patch drywall or close up the wall, turn the breaker back on and test the circuit. Flip the switch and confirm the light turns on and off. Plug a lamp into the outlet and confirm it works. If the outlet is supposed to be controlled by the switch, unplug the lamp, flip the switch off, and plug the lamp back in — it should not turn on. Flip the switch on and the lamp should light.

If something does not work as expected, turn the breaker off again and recheck your connections. Look for loose wire nuts, wires touching the wrong terminals, or reversed hot and neutral wires. Once everything works correctly, you can close up the wall. Testing before you seal everything up saves you from having to tear open drywall later to fix a mistake.

When to call an electrician

Call a licensed electrician if you are not confident working inside electrical boxes, if your home has aluminum wiring (which requires special handling), if you cannot locate the power source for the circuit, or if the breaker keeps tripping when you turn the power back on. An electrician can also help you understand your local building code and whether a permit is required before you start.

Electrical work mistakes can cause fires, electrocution, or damage to appliances. If you have any doubt about your ability to complete the work safely, hiring a professional is the right choice. The cost of an electrician is far less than the cost of a house fire or a serious injury.

Frequently Asked Questions

Can I use the same cable to run power to both the switch and the outlet?

No. You need separate cables for each device. One cable runs from the power source to the outlet, and a second cable runs from the outlet to the switch (or from the power source to the switch, depending on your configuration). Using one cable for both creates a fire hazard.

What if the switch and outlet are in different rooms?

You can run cable between rooms, but it must be inside the walls or conduit, never exposed. The wiring process is the same — just longer cable runs. Make sure the cable is rated for in-wall use (usually marked NM or Romex on the sheathing).

Do I need a permit for this work?

Permit requirements vary by location. Many jurisdictions require a permit for any new wiring, while others only require one if you are adding a new circuit. Check with your local building department before you start. An unpermitted installation can affect your home's resale value and may not be covered by insurance if something goes wrong.

What does it mean if the breaker keeps tripping?

A tripping breaker usually means there is a short circuit — two wires touching that should not be, or a wire touching the metal box. Turn off the breaker, recheck all your connections, and make sure no bare wire is exposed. If you cannot find the problem, stop and call an electrician.

Can I control the outlet from two different switches?

Yes, but you need three-way switches and a more complex wiring setup. This is beyond basic outlet and switch wiring and is best left to an electrician.