How to Get a Neutral to a Switch Box for a Smart Switch
Why this matters
The customer bought the smart dimmer, opened the box, and found two wires and a bare ground. Most smart switches need a neutral to power their radio and electronics while the light is off, and switch boxes wired before the neutral requirement often don't have one. The shortcuts people reach for are the ones that cause the call after yours: a neutral borrowed from the receptacle across the hall, a lone white run in from somewhere else, or a device powered through the ground wire. This card is the legitimate ways to get a neutral where it is needed, how to choose between them, and the test that proves the result.
Safety first: a switch box can hold more than one circuit
Kill the circuit at the panel, lock and tag the breaker, and prove every conductor in the box dead with live-dead-live on a CAT III or better meter (proved on a known live source before and after the test, per NFPA 70E Article 120, 120.5 in the 2021 edition and renumbered in 2024; work practices at 29 CFR 1910.333(b)(2)). Test every conductor, not only the ones on the switch. A two-gang box can carry a second circuit, and a bundle of whites at the back can carry return current from a circuit that is still on. When you go up a ladder into the fixture box, test there again: the fixture box sees a different cable set from the switch box.
Fishing through an attic means walking joists in heat with insulation overhead: stay on framing, wear a respirator under your written 29 CFR 1910.134 program (applied to construction by 29 CFR 1926.103) if you are disturbing old loose-fill (vermiculite may contain asbestos; if you see it, stop and do not disturb it until it has been identified), and watch for nails through the roof deck.
Why the box has no neutral
NEC 404.2(C), introduced in the 2011 edition and carried forward in the 2020 and 2023 editions as adopted, requires in substance a grounded conductor at most switch locations controlling lighting in habitable rooms, with exceptions (for example, where the box is reached by a raceway big enough to add one later, or where the wiring can be reached from an unfinished space above or below). Before that edition took effect locally, the cheapest way to wire a ceiling light was a switch loop: the feed lands at the fixture box, and a 2-wire cable drops to the switch carrying only the always-hot and the switched leg. No neutral ever went to the switch, because a plain switch never needed one.
The three legitimate options
BEFORE: 14/2 switch loop
FIXTURE BOX SWITCH BOX
feed BLK ---> loop WHT (taped BLK) ---> SW line
feed WHT ---> lamp WHT
lamp BLK <--- loop BLK <--------------- SW load
AFTER: 14/3 replaces the loop
feed BLK ---> new BLK ----------------> SW line
feed WHT -+-> lamp WHT
+-> new WHT ----------------> SW neutral
lamp BLK <--- new RED <---------------- SW load
Option 1: a neutral is already in the box. Look before you plan. Where the feed comes into the switch box first and continues to the light, the box holds a bundle of whites spliced together at the back, not connected to the switch. That is a neutral, and it is the right one only if it arrived in the same cable as the hot your switch is using: NEC 300.3(B) keeps all of a circuit's conductors, neutral included, in the same cable or raceway. A white bundle that came in on a different cable from a different circuit is somebody else's neutral; landing your device on it sends this circuit's return current down the other circuit's neutral, which 300.3(B) prohibits. It can trip a GFCI or dual-function AFCI on either circuit, and whoever later shuts off the other circuit to work on it still finds current on that neutral.
Option 2: replace the switch loop with a 3-wire cable. Pull out the 2-wire loop and run a 3-wire with ground (14/3 on a 15 A circuit, 12/3 on 20 A, per the conductor sizes in 240.4(D)). At the fixture box, the new white joins the feed neutral bundle, the black joins the feed hot, and the red goes to the fixture. At the switch box, black to line, red to load, white to the device's neutral. This is the permanent fix and the only one that serves any device the customer buys later. Box fill goes up by one conductor in each box; count it before you pull (see related: 'Box Fill Worked Counts for Common Boxes').
Option 3: a device listed for use without a neutral. Some smart switches and dimmers are listed to power themselves by passing a small current through the load while it is off. They work, within limits stated in their instructions: a minimum load, often a lamp-type restriction, and a list of compatible LED lamps. Below the minimum, LED lamps glow or flicker when off. NEC 404.22, as adopted (2017 edition onward), requires in substance that electronic lighting control switches be listed and not put current on the equipment grounding conductor during normal operation, with narrow exceptions; check the current edition. So the bare ground is never the return path, whatever a device's older instructions said.
What is not an option. A single white run on its own from a receptacle box to the switch box. It feels like a neutral, but it separates a circuit's return from its supply, which 300.3(B) prohibits, and it creates induction heating in any metal box or conduit the two paths pass through separately.
How to choose
Pick Option 1 if you can prove it. Pick Option 2 whenever the cable route is reachable: an attic above a top-floor fixture, an unfinished basement below a first-floor switch, or a wall bay you can fish without cutting a finished ceiling. Pick Option 3 when the route is genuinely closed (a slab ceiling, plaster you are not allowed to open) and the load meets the device's listed minimum. Tell the customer what Option 3 trades away: the next device they buy may need a neutral too.
Worked job: a hallway light in a 1994 two-story
The ask. Smart dimmer for the upstairs hall ceiling light, two 9 W LED lamps, on a 15 A circuit wired in 14 AWG. The switch box is a single-gang plastic box with one 14/2 cable. The fixture box is a 4 in octagon box, 1-1/2 in deep, with the attic directly above it.
Proving the loop. With the circuit dead and proved dead, open both boxes. At the fixture box: the feed 14/2 and the loop 14/2, the feed black spliced to the loop's white (no tape on it), the feed white on the fixture. The loop white is the always-hot. Its missing re-identification goes on the ticket; it gets fixed by being replaced.
Option 1 ruled out. The switch box holds one cable and no bundle at the back. No neutral to find.
Option 3 checked and rejected. Two 9 W LED lamps total 18 W, and the customer's chosen model needs a neutral anyway. A listed no-neutral model's minimum load would have to be checked against 18 W in its instructions; with the attic open above, it was not worth the risk of a glowing lamp.
Option 2: box fill, both boxes. 14 AWG counts 2.0 cu in per conductor (NEC 314.16(B)).
- Switch box after: 3 insulated conductors of the 14/3, plus 1 for all the equipment grounds, plus 2 for the device yoke = 6 counts x 2.0 = 12.0 cu in. A single-gang plastic box here is marked 18.0 cu in, so it fits. Smart devices are deep, so check the depth the maker asks for too.
- Fixture box after: feed 14/2 (2) plus new 14/3 (3) plus 1 for the grounds = 6 counts x 2.0 = 12.0 cu in, against 15.5 cu in for a 4 in by 1-1/2 in octagon in Table 314.16(A). No stud or hickey in this box; one would add a count.
The pull. From the attic, drill the top plate of the switch wall bay, tie the 14/3 to the old loop at the switch box, and pull the old cable up and out as the new one comes down. Staple within 12 in of the fixture box and support per 334.30 in the attic (see related: 'NM Cable Support, Protection, and Clearance Rules'). Terminate at the fixture box: new white to the feed white and fixture white, new black to the feed black, new red to the fixture black, grounds together with a pigtail to any metal yoke.
The finish test, in order.
- Before mounting the device, cap each switch-box conductor separately and fold them apart, then restore the breaker. This is a live measurement in an open box: probes only, one hand, nothing uncapped beyond the probe tip. At the switch box: black to white 121 V, black to ground 121 V, white to ground 0.2 V. That proves the new white is a neutral and is continuous back to the bundle. The red to white reads 0 V, because nothing feeds it until the switch closes.
- Breaker off again, verify dead, mount the dimmer: line black, load red, neutral white, ground.
- Restore the breaker. The device powers up with the light off: the status light comes on and it pairs with the customer's app. That is the test this whole job exists to pass.
- Run the light from the device and the app, through the full dimming range. With the light off, look at the lamps in a dark hallway for any glow.
What changes the answer
- A 3-way. A smart 3-way kit needs a neutral at the box with the main device, and some kits want one at the companion too. Map the travelers first; see related: 'Three-Way + Four-Way Switch Wiring'.
- Metal raceway. Where the switch is fed by conduit, pulling one white neutral into the raceway alongside the existing conductors keeps the circuit together and satisfies 300.3(B), if conduit fill allows.
References
- NFPA 70, National Electrical Code, 2023 edition (2020 where numbering moved) as adopted, local amendments checked: 240.4(D), 300.3(B), 314.16, 334.30, 404.2(C), 404.22
- NFPA 70E, current edition, Article 120; 29 CFR 1910.333(b)(2); 29 CFR 1910.134 for respirator use
- See related: Box Fill Worked Counts for Common Boxes
- See related: Three-Way + Four-Way Switch Wiring
- Smart switch and dimmer manufacturer installation instructions (neutral, minimum load, box depth)