ThermostatsHow-to Video

Thermostat Wiring: Wire Color Codes and Step-By-Step Guide

Thermostat wiring by color and terminal letter, plus how to swap a 2-, 3-, 4- or 5-wire thermostat step by step after you photograph the old wiring.

Quick answer

Match thermostat wires by the terminal letter, not the color. R is 24-volt power, C is common, W is heat, Y is cooling, G is the fan and O/B is a heat pump valve. Turn off the breaker and photograph the wires first.

The time for replacing the thermostat has arrived, and you should know how to do it properly.

Unfortunately, there are a lot of guides with misleading information, and it can do more harm than good for you, so I’m glad you found this in-depth guide describing everything you need to know about thermostat wiring.

You must know how to replace the thermostat properly, so you’ll learn step-by-step how to install a new thermostat, no matter which type of thermostat you own.

Before jumping straight into that, take notes on the wiring color codes, as they’re essential in this process. This guide covers low-voltage thermostats, which carry about 24 volts. If yours is labeled 120 or 240 volts and has thick wires, as with electric baseboard heaters, call an electrician. Before you touch any wire, turn off power to the heating and cooling system at the breaker.

Thermostat Wiring Explained [Full Guide]1K+ views · 7:31 · Home Caprice on YouTube
Watch on YouTube

Thermostat Wiring Color Codes

Thermostat bases differ. A basic one has only a few terminals, while an advanced heat pump model can have 16, marked with letters such as C, R, Y1, Y2, W1, W2, O/B, G, RS, ODT, AUX NO, AUX C, AUX NC and BK.

It all depends on your thermostat wires because 2-wire and 3-wire thermostats might not have all of these, but that’s not so important.

For each terminal, there’s a specific wire marked with a color.

The most important thing is to learn what each terminal does. Colors are only a guide: installers do not always use the standard ones, so go by the letter on the terminal, and check it against the old thermostat’s labels.

TerminalUsual wire colorWhat it does
R (Rc, Rh)Red24-volt power. Rc is the cooling side and Rh the heating side; many systems have one R wire.
CBlue or blackCommon wire. Keeps a smart thermostat powered.
W or W1WhiteFirst stage heat (furnace or boiler).
W2 or AUXWhite or variesSecond stage heat; on a heat pump, backup (auxiliary) heat.
Y or Y1YellowCooling; on a heat pump, the compressor.
Y2Yellow or variesSecond stage cooling.
GGreenFan.
O/BOrange or blueHeat pump reversing valve. Only heat pump systems have it.

Black or Blue Wire (marked with “C”)

The C wire is connected directly to the transformer and is part of a 24V electric circuit.

In modern smart thermostats, the black or blue wire is usually connected to the C terminal. A blue wire can also be a B wire on a heat pump, so go by the terminal letter, not the color.

Older thermostats often run on batteries and do not need a C wire, so your wall may not have one. Many smart thermostats need one, or an adapter kit; Google says Nest often works without it, but some systems require a C wire or its Power Connector.

Red Wire (marked with “R” or “RC”)

You can think of red wire as the power wire, because it provides 24-volt power to the system.

Almost every thermostat has a red wire. If your system has separate heating and cooling transformers it will have two red wires, marked Rh and Rc, and that is a job for a professional.

White Wire (marked with “W1” or “W2”)

You can think about white wires as snow because they’re strictly for heating.

White carries the call for heat, so you will find it on thermostats for furnaces and boilers, and it is not used on a cooling-only system.

It goes to the heating equipment. On a heat pump, W2 or AUX controls the backup heat.

W2 is the second stage of heat. On a heat pump it usually controls the backup (auxiliary) heat. Our guide to emergency heat vs auxiliary heat explains how the two differ.

Orange & Blue Wire (marked with “O/B”)

O/B controls the reversing valve in a heat pump, so only heat pump systems have it. Depending on the brand, the valve is energized for cooling (O, usually orange) or for heating (B, usually blue).

Because blue is also a common color for the C wire, check the terminal label before you connect anything.

Not a DIY job?

Get matched with a local HVAC technician

Networx matches you with vetted pros near you. Free, no obligation.

Find a Pro →

Green wire (marked with “G”)

This one is specific as it goes directly into the fan.

There isn’t anything spectacular about it, and they’re easy to remember.

Yellow wire (marked with “Y1” or “Y2”)

Y1 is first-stage cooling; on a heat pump it controls the compressor. It’s yellow, and it’s easy to spot it from the beginning.

Y2 is for more advanced air conditioning systems that have 2 compressors or a two-stage compressor.

In most cases, you’ll have a Y1 in your thermostat.

Other wires

These terminals are rarely used, and they’re usually on the right side of the thermostat.

However, you must know that sometimes wire codes can have different colors than we mentioned here – it all depends on the technician who installed the thermostat.

Always check the letter on the terminal against these colors and a photo of the old wiring.

Take a look at smart air conditioners that have built-in thermostats.

Best Way To Remove The Old Thermostat

It’s easy for a technician to replace the old thermostat when they’ve met with color codes hundreds and thousands of times already.

But what should an average Joe do?

First turn off the power to your heating and cooling system at the breaker and confirm that nothing turns on. Then it is simple – just take a picture.

If you unscrew the terminals and remove all the wires, you might forget how to connect each one properly, so take a picture of the old thermostat before moving further.

Now, a lot of people think that you can remove the thermostat right away, and you can easily rearrange wires. The problem is that wires can easily be lost in the wall, and you’ll have difficulty reaching them.

You probably want to avoid it, so just spread the wires and bend them outwards to prevent them from getting lost behind the wall.

By now, you should be able to remove the old thermostat, and now we come to the more interesting part…

Installing A New Thermostat

Now you have to put the new thermostat in the exact same position as the old thermostat.

Start reconnecting wire by wire like they’ve been connected to the old thermostat. Luckily, you have a picture on your phone now that helps you connect it properly.

Don’t worry if you didn’t take a picture; use the table above, but go by the terminal letter on the old thermostat, because colors can differ.

Let’s summarize them again:

  • Yellow wire (Y) – for cooling
  • White wire – for heating
  • Rh – heating power
  • Rc – cooling power
  • Green wire – for fan
  • Red wire – for power (24V)
  • Blue or black wire (C) – common

When you’re reconnecting the wires, it’s very important that you tighten down the screw. Once you’ve checked it’s tightened enough, you can move to the new wire.

These were the basics of wiring a thermostat, now let’s talk about different types of thermostat wiring.

Even if your AC is broken or not functional, you can cool down your home without using AC.

Different Types Of Thermostat Wiring

2-Wire Thermostat Wiring

The 2-wire thermostat wiring is used for heat-only systems, such as a furnace or boiler, and it uses only two wires, as the name says.

It has only 2 wires:

  • Red wire – power
  • White Wire – heating

Wiring this type of thermostat is very easy, and you could even do it blindfolded – just kidding, don’t try it 😊

Let’s break everything step-by-step:

  1. Remove the thermostat
  2. Take a picture of the properly positioned wires
  3. Unscrew both wires from the terminal
  4. Put new 2 wires in the thermostat in the same path as they were in the old thermostat
  5. Put the control panel back once you’ve reconnected both wires

It’s as simple as that. If you’ve done everything properly, the new wires should control everything the same as the old thermostat.

3-Wire Thermostat Wiring

A 3-wire setup (R, W and G) is typically a furnace with a fan wire, so it is used for heating.

The three wires have the following codes: R, W, and G.

  1. R = Red wire for power
  2. W = White wire
  3. G = Green wire.

Same as with a 2-wire thermostat, you just need to follow the same exact step-by-step process.

Note: White wire is sometimes marked as W and W1, so don’t get confused with both, as it all depends on the thermostat model.

4-Wire Thermostat Wiring

This is the standard layout for a system that heats and cools. Many smart thermostats, such as Google Nest, also want a fifth wire, the C wire, although Google says Nest often works without one.

In addition to red, green and white wire, this type of thermostat also has a yellow wire for cooling.

You can see these thermostats on HVAC devices that can cool and heat.

The only thing you have to pay attention to here is to connect the cooling wire (usually yellow) to Y – many people get lost here, so stay focused.

It’s a bit harder than the previous types of thermostats we mentioned, but just pay attention to the cooling wire.

5-Wire Thermostat Wiring

This is the same type as a 4-wire, but it only has an additional “C” wire.

A 5-wire setup (R, W, Y, G and C) controls a furnace with an air conditioner. A heat pump usually adds an O/B wire, so it can need more wires.

There’s a black wire that you need to connect to the C terminal. Other than that, everything is the same as with a 4-wire thermostat.

We have the basics covered for a standard low-voltage system. If anything looks different from this guide, such as thick 120 or 240 volt wires or two red wires, call a professional.

FAQ

Air Conditioner Icon
Do you need an electrician to change a thermostat?

No! If you have the tools required, you should be able to replace a thermostat yourself. There are instructions with the new thermostat that will tell you exactly how to do it but if you don’t feel comfortable doing it yourself, you can hire a local handyman, HVAC tech or electrician.

Written byDominic MittonContent writer at Home Caprice

Content writer from Croatia. Dominic studies Information Science at the University of Sarajevo, which helps him research and organize his work.

28 tricks to cut your energy bills

One free cheat-sheet by email. That's it.

Get the free cheat-sheet →