Home Electrical and Fire Safety
How to Wire Lights: Switches and 3-Way Circuits Done to Code
Updated
Every switched light runs on three conductors: a hot wire, a neutral, and a ground, with the switch interrupting the hot. Trouble on these jobs comes from overstuffed boxes, wrong wire gauge, a missing neutral at the switch, and connections that loosen over time and start to burn. Lighting circuits are one branch of the home electrical system, fed from the panel alongside receptacle and appliance circuits.
Before You Touch Anything
Kill the power at the breaker, not the wall switch. A wall switch only opens the hot on one leg. In switch-loop setups and in older homes with mixed-up wiring, live wires can still be in the box with the switch off.
Test it twice. 1. Use a non-contact voltage tester ($15–$30) on every wire in the box. Check the tester on a known live outlet first. 2. Confirm with a two-lead tester or multimeter, hot-to-neutral and hot-to-ground. Non-contact testers can miss things, especially on backstabbed devices or shared neutrals.
Look for more than one circuit. Switch boxes with two or more switches often carry two separate circuits. Turning off one breaker can leave half the box live.
Check the permit rules. Most jurisdictions let a homeowner replace a fixture or switch like-for-like without a permit. Running new cable, adding a circuit, or adding a new switched light usually needs one. Many areas allow homeowner permits for owner-occupied single-family homes. The inspection costs little compared with an insurance claim that gets denied over unpermitted work.
Wire Basics for Lighting
| Circuit breaker | Copper wire gauge | Common cable | Approx. price (250 ft roll) |
|---|---|---|---|
| 15 amp | 14 AWG | 14/2 NM-B with ground | $110–$120 |
| 15 amp (3-way runs, switch with neutral) | 14 AWG | 14/3 NM-B with ground | $135–$215 |
| 20 amp | 12 AWG | 12/2 NM-B with ground | Roughly 1.5× the 14/2 price |
Match the wire to the breaker, never the other way around. If any 14 AWG wire is on a circuit, that circuit gets a 15-amp breaker. You'll often find 14 AWG fixture leads spliced to 12 AWG house wire, and that's fine because the fixture leads are rated for it. A run of 14 AWG cable on a 20-amp breaker is not fine.
Color conventions: - Black (and red in 3-wire cable): hot, or switched hot - White: neutral, unless it's re-marked with black or red tape to show it's being used as a hot - Bare copper or green: equipment ground
What a 15-amp lighting circuit can carry: about 1,440 watts if you size it for continuous load at 80%. With LED lighting, wattage rarely limits you. A whole floor of LED cans may draw under 200 watts. The circuit layout and the number of devices matter more than load.
Job 1: Replacing an Existing Fixture
This is the most common job and the easiest to get right.
- Shut off the breaker and test as described above.
- Take down the old fixture. Before you disconnect anything, photograph the connections. If you see more than one cable entering the box, note which wires are bundled together.
- Check the box. It must be a ceiling box listed for fixture support. A fixture over 50 pounds needs a box listed for that weight or independent support. In a two-story entry, settle the foyer chandelier height before setting the box, since chain length and mounting depend on it. A ceiling fan needs a box marked "acceptable for fan support," whatever the fan weighs. A plastic "old work" box clipped to drywall is not a fan box.
- Mount the new crossbar from the fixture kit to the box ears. Ground it to the box if the box is metal.
- Connect the wires: - Fixture white to house white (neutral) - Fixture black to house black (switched hot) - Fixture ground to house ground, plus a green pigtail to the box if it's metal
- Make good connections. For twist-on wire connectors, strip to the length on the package, hold the wire ends even, and twist until the wires twist together under the connector. Tug each wire hard. Lever-style push connectors (such as Wago 221 style) are listed and work well, especially for joining stranded fixture leads to solid house wire.
- Fold the wires in neatly, mount the fixture, install the bulbs, restore power, and test.
Old house, no ground wire? Homes built before the mid-1960s often have two-wire cable with no ground. A metal fixture can still be installed, but it won't be grounded. Code allows a few retrofit grounding methods. A licensed electrician should handle that rather than a jumper to a water pipe.
Fixture has a ribbed wire and a smooth wire? On lamp-style fixture cord, the ribbed or marked conductor is neutral (white) and the smooth one is hot (black).
Job 2: Adding a New Light with a Switch
Which Way the Power Runs
Power can come in two ways, and they're wired differently.
Power to the switch first (preferred for new work). Run cable from the power source to the switch box. Then run 14/2 from the switch box to the light. - Switch box: incoming white connects to outgoing white (neutral passes through). Incoming black goes to one switch terminal. Outgoing black goes to the other switch terminal. All grounds are spliced together with a pigtail to the switch's green screw. - Light box: white to fixture white, black to fixture black, ground to ground.
Power to the light first (switch loop). Power arrives at the ceiling box, and a cable drops down to the switch. - Current code requires a neutral at most switch locations. That means running 14/3 down to the switch, not the old 14/2 switch loop. The extra conductor costs a few dollars and lets you use a smart switch or occupancy sensor later. - At the light: incoming black goes to the 14/3 black (always-hot feed down to the switch). The 14/3 red comes back as switched hot and goes to the fixture black. Incoming white connects to both the 14/3 white and the fixture white. - At the switch: black and red go on the switch terminals. White is capped, or connected to a smart switch's neutral.
The neutral-at-the-switch rule applies to switches serving bathrooms, hallways, stairways, and habitable rooms. A few exceptions exist, such as switches in conduit with room to pull a neutral later, or switches controlling receptacles. Running 14/3 avoids the question.
Boxes and Box Fill
Overfilled boxes are the most common violation an inspector writes up on homeowner jobs. Each conductor needs space:
| Wire gauge | Volume per conductor |
|---|---|
| 14 AWG | 2.00 cubic inches |
| 12 AWG | 2.25 cubic inches |
How to count: - Each insulated wire entering the box counts as 1. - All grounds together count as 1. - Each switch or device counts as 2, based on the largest wire connected to it. - Internal cable clamps count as 1 total. - Pigtails that don't leave the box count as 0.
Example: a single switch box with two 14/2 cables. Four insulated wires (4) + grounds (1) + switch (2) + clamps (1) = 8 × 2.00 = 16 cubic inches minimum. A standard 18 cubic inch single-gang box passes. A shallow 14 cubic inch old-work box does not.
The volume is stamped inside every plastic box. Buy deeper boxes than you think you need. They cost under a dollar more.
Running the Cable
- Staple NM cable within 12 inches of each box and every 4½ feet along framing.
- Drill holes in the center of studs and joists, at least 1¼ inches from the face. Where you can't keep that distance, use a steel nail plate.
- Leave at least 6 inches of free wire inside each box, with at least 3 inches sticking out past the front.
- Keep at least ¼ inch of cable sheathing inside the box past the clamp.
- Don't staple cables flat on top of each other, and don't crush the cable with the staple.
Breaker Requirements
A new circuit in bedrooms, living rooms, family rooms, hallways, closets, kitchens, laundry areas, and similar spaces needs AFCI protection. A 15-amp combination AFCI breaker runs about $40–$90 depending on brand and panel type. Plug-on-neutral styles are generally cheaper. Buy the breaker made for your panel brand. "Classified" replacement breakers exist, but a mismatched breaker is a common cause of panel failures.
When code or the device maker gives a torque value for terminal screws (most breakers and many devices do), the current code requires tightening to that value. A torque screwdriver costs $30–$80 and is worth it.
Job 3: Three-Way Switches (Two Switches, One Light)
This setup is for stairways, hallways, and rooms with two doors.
What you need: - Two 3-way switches ($5–$10 each, or $25–$50 for a 3-way dimmer kit) - 14/3 cable between the two switches - 14/2 or 14/3 for the power feed and the run to the light
Key terminals on a 3-way switch: - Common: the darker (black or bronze) screw - Two travelers: the brass screws - Ground: the green screw
Wiring with power at Switch 1 and the light beyond Switch 2: 1. Switch 1: incoming hot (black) goes to the common screw. Red and black of the 14/3 go to the two traveler screws. Incoming white splices to the 14/3 white. 2. Switch 2: red and black from the 14/3 go to the traveler screws. The common screw goes to the black of the cable heading to the light. Whites splice together. 3. Light: white to white, black to black. 4. Grounds: connect them everywhere, with pigtails to every switch and to metal boxes.
The common terminal is where most 3-way jobs go wrong. If the light works only when one switch is in a certain position, a traveler and the common have been swapped at one of the switches. When replacing old 3-way switches, mark the common wire before you disconnect anything.
For a third switch location, add a 4-way switch between the two 3-ways. Both travelers in and both travelers out go through it, using 14/3 on each side.
Recessed Lighting
Canless LED wafer lights have mostly replaced traditional cans in remodeling work. They run about $12–$30 each in multipacks, sit in a 4–6 inch hole, and each comes with a small junction box that clips in next to it.
- Daisy-chain from one junction box to the next with 14/2. Each little box has a fill limit printed on it, often room for only two cables. Respect it.
- Check the IC rating. Any fixture touching insulation must be IC-rated (insulation contact). Nearly all wafer lights are, but older cans may not be.
- Check the wet or damp rating for fixtures in showers and on covered porches.
- Lay out the spacing before cutting holes. A common rule for spacing is about half the ceiling height. An 8-foot ceiling gets fixtures about 4 feet apart and about 2 feet from walls. Downlights work best as one layer among several, so plan layered room lighting with sconces, lamps and task light alongside them.
Dimmers and LED Bulbs
- Buy a dimmer labeled for LED / CFL / incandescent and check the dimmer maker's compatibility list for your fixture.
- Flickering, buzzing, or lights that won't fully turn off usually mean a compatibility problem. Many LED dimmers have a low-end trim adjustment to fix this.
- Smart dimmers and switches nearly all need a neutral. This is where the extra conductor in 14/3 pays off.
- Typical prices: basic LED dimmer $20–$40, smart dimmer $40–$70.
Shopping List for a Typical New Switched Light
| Item | Approx. cost |
|---|---|
| 14/2 NM-B, 250 ft roll (enough for several jobs) | $110–$120 |
| 14/3 NM-B (sold by the foot or in 50–250 ft rolls) | $1–$2/ft by the foot |
| Ceiling box (fixture-rated) | $3–$8 |
| Fan-rated brace box | $15–$30 |
| Single-gang deep switch box | $1–$3 |
| Single-pole switch | $2–$5 |
| Wire connectors (assorted pack) | $5–$15 |
| Non-contact voltage tester | $15–$30 |
| Wire stripper (sized for 12 and 14 AWG) | $15–$30 |
| 15 A combination AFCI breaker (if adding a circuit) | $40–$90 |
Common Mistakes Inspectors Find
- Backstabbing devices. Push-in holes on cheap switches and receptacles loosen over time. Use the screw terminals, with the wire wrapped clockwise ¾ of the way around the screw.
- Overfilled boxes, as covered above.
- No neutral at new switch locations.
- White wire used as a hot without re-marking. Wrap black or red tape on both ends. Older homes often break wire color conventions, so confirm what each conductor does with a tester before reconnecting it.
- 14 AWG wire on a 20-amp breaker.
- Loose cable, meaning unstapled runs or cables with no clamp where they enter a box.
- Splices outside a box. Every splice must be inside an accessible junction box with a cover.
- Ungrounded metal boxes.
- Fixtures hung from non-rated boxes, especially ceiling fans.
- Missing AFCI on new circuits in living spaces.
When to Call an Electrician
- Aluminum branch wiring (marked "AL" on the cable jacket, common in 1965–1973 homes)
- Knob-and-tube wiring
- Any work inside the main panel if you've never done it before. The service lugs stay live even with the main breaker off.
- Burn marks, melted insulation, or a breaker that trips repeatedly
- A box full of wires from multiple circuits that you can't trace with confidence
- Anything where the permit office requires a licensed contractor
Swapping a fixture and running a single switched light are realistic homeowner projects. Do the testing, keep the box fill honest, and pull on every connection before folding it into the box.