Dear Mr. Electrician:  I want to control my ceiling fan and light separately with two wall switches.

Answer:  To control the ceiling fan and light separately with two wall switches, a three conductor cable needs to be installed from the switch location to the ceiling fan location.  NOTE: Some text links below go to applicable products on Amazon.  As an Amazon Associate I earn from qualifying purchases.

The old existing wall switch that controlled the switched outlet
The old existing wall switch that controlled the switched outlet

In the above switch box the white wire is usually the hot wire or the LINE and the black wire is the LOAD.  When the wiring is checked at the outlet, a white wire is seen connected to the hot black wires.  This is normal, however the white wire should have been re-identified with a different color.

An electrical outlet that is controlled by a wall switch
An electrical outlet that is controlled by a wall switch

In the above photo of an electrical outlet controlled by a wall switch, notice the white wire and two black wires connected together.  One of the black wires is the LINE or hot wire into the outlet box, but instead of getting terminated directly onto the outlet it is connected to the white wire that goes to the wall switch.  This white wire should have been re-identified with a different color other than white, gray or green.

The black wire from the switch box is connected onto the outlet.  One of the white wires connected to the outlet is the neutral conductor that is part of the same cable as the LINE black wire.

Switched outlet wiring connections
Switched outlet wiring connections

I changed the wiring connections so that the outlet was hot at all times and the switch box now had a hot and a neutral.  My post about converting a switched outlet to hot will be very helpful to you.

Drilled hole in wall top plate view from attic
Drilled hole in wall top plate view from attic

The blue arrow points to a hole that was drilled into the top plate of the wall so that a cable could be fished down to the switches.  The green arrow indicates where the ceiling drywall meets the top plate of the wall.

Fiberglass wire fishing rod resting on top of attic insulation
Fiberglass wire fishing rod resting on top of attic insulation

A fiberglass wire pulling rod was used to pull the 14/3 Romex cable across the attic.

14/3 Romex cable for ceiling fan power is stapled to attic truss
14/3 Romex cable for ceiling fan power is stapled to attic truss

The 14/3 Type NM-B Romex cable is stapled to the side of the attic trusses.

Type NM-B 14/3 electrical cable going down into the wall to the new switch box
Type NM-B 14/3 electrical cable going down into the wall to the new switch box

The hole in the top plate was filled in later with firestop caulk because I didn’t want to get that stuff on my camera.

14/3 Romex cable installed in attic to power new ceiling fan
14/3 Romex cable installed in attic to power new ceiling fan
Newly enlarged hole with wires protruding for a two gang old work electrical switch box
Newly enlarged hole with wires protruding for a two gang old work electrical switch box

The old switch box was removed and the existing hole in the wall was made larger to accommodate the new two gang plastic old work electrical box.

Switch wires pigtailed and ready for new wall switches to control the ceiling fan and light
Switch wires pigtailed and ready for new wall switches to control the ceiling fan and light

I used the excess wire from the 14/3 Romex as pigtails for the LINE connections to the switches.  The 14/3 contains the light and fan LOAD wires going up to the ceiling fan.

Two gang old work plastic switch box installed in a wall with a sheet metal screw for extra support
Two gang old work plastic switch box installed in a wall with a sheet metal screw for extra support

One #8 x 1 1/4″ sheet metal screw was driven through the box into the wood wall stud to secure the electrical box.  Care must be taken to not over drive the screw into the wood and consequently distort the electrical box.

Doing this can be considered a code violation by some electrical inspectors, but it does make the electrical box more secure over the long term.

Two single pole toggle switches wired to control a new ceiling fan with a light
Two single pole toggle switches wired to control a new ceiling fan with a light
Two single pole toggle switches mounted on a two gang old work plastic electrical box
Two single pole toggle switches mounted on a two gang old work plastic electrical box

Depending on the brand and type of wall plate to be installed, it is sometimes better to remove the ears from the switches and outlets when installing them on plastic old work boxes.  When I install steel old work boxes I usually remove the ears.  See how I changed one switch to two switches in this ceiling fan installation blog post.

Ceiling fan electrical box hanging from the ceiling by a 14/3 Romex cable
Ceiling fan electrical box hanging from the ceiling by a 14/3 Romex cable

Above, the old work fan brace is installed inside of the ceiling.  The steel octagonal fan rated box is ready to be attached.

Ceiling fan electrical box mounted onto ceiling fan brace with wires hanging out
Ceiling fan electrical box mounted onto ceiling fan brace with wires hanging out

All metal electrical boxes must be grounded.  Part of the grounding conductor is under the green grounding screw with the end hanging out for connecting to.  The fan box above also has 8/32 screw holes for a standard ceiling light fixture to be attached.

UPDATE: The grounding method of the metal box depicted above is no longer permitted beginning with the 2020 National Electrical Code 250.148(C).  The box must now have a separate grounding pigtail which gets connected to all of the other ground wires in the box.

CLICK HERE to see Ceiling Fans on Amazon

Close shot of a ceiling fan electrical box ground screw
Close shot of a ceiling fan electrical box ground screw

In the photo above the box is grounded by looping the grounding conductor from the feed cable around the ground screw.  This method of box grounding is no longer permitted.  The box must have its own grounding pigtail.  See my blog post about grounding outlets and switches for more details.

Ceiling fan bracket attached to ceiling fan electrical box with wires hanging out
Ceiling fan bracket attached to ceiling fan electrical box with wires hanging out

The above is one of many different styles of ceiling fan bracket that comes with each ceiling fan.  They are all made to be mounted onto a standard fan rated electrical box.

Ceiling fan bracket with rod attached and wires spliced
Ceiling fan bracket with rod attached and wires spliced

All ground wires get connected together.  All white neutral wires go together.  If you are going to install a remote control receiver, this is where it gets inserted.

Ceiling fan bracket with ceiling fan rod attached and wires spliced inside of the ceiling fan electrical box
Ceiling fan bracket with ceiling fan rod attached and wires spliced inside of the ceiling fan electrical box

All of those wires jammed inside of the electrical box is a compelling reason to use a 2 1/8″ deep fan rated electrical box instead of an 1 1/2″ box.

Ceiling fan photographed while spinning
Ceiling fan photographed while spinning

See my Ceiling Fan Wiring Diagrams post for several choices of ceiling fan switch wiring.