Thermostat Wiring Explained: Wire Colors, Terminals and Diagrams

A thermostat wiring diagram shows which wire connects to which terminal, and what each one tells your heating and cooling system to do. Once you know the letters (R, C, W, Y, G and O/B cover most homes), the wiring behind your thermostat is much easier to read.

The one rule to remember: go by the terminal letter, not the wire color. Colors usually follow a convention, but nothing enforces it. This guide explains every common terminal, shows the wiring for the main system types, and covers what changes with a smart thermostat.

Thermostat Wiring at a Glance

Most 24V thermostats use the same handful of terminals:

  • R: 24V power from the transformer (Rh and Rc on systems with two transformers).
  • C: the common wire, which gives the thermostat constant power.
  • W: heat. W2/AUX is second-stage or backup heat.
  • Y: cooling, or the compressor on a heat pump.
  • G: the indoor fan.
  • O/B: the reversing valve on a heat pump.

Red is usually R, white W, yellow Y, green G and blue or black C, but always confirm by the letter each wire was connected to on your old thermostat.


Thermostat Wiring Colors and Terminals

Here’s what each terminal does and the wire color you’ll usually find on it:

TerminalUsual wire colorWhat it does
R (Rh, Rc)Red24V power from the HVAC transformer
CBlue or blackCommon: completes the 24V circuit and powers the thermostat
W or W1WhiteHeat, first stage
W2 or AUXVariesSecond-stage heat, or backup heat on a heat pump
Y or Y1YellowCooling; on a heat pump, the compressor for heating and cooling
Y2VariesSecond-stage cooling
GGreenIndoor fan (blower)
O/BOrange or dark blueHeat pump reversing valve
EVariesEmergency heat on some heat pump thermostats

A few terminals need more explanation.

R, Rh and Rc. R carries 24V power from the transformer at your furnace or air handler. If your old thermostat has wires on both Rh and Rc, your system has two transformers: Rh powers the heating and Rc powers the cooling. With only one R wire, it powers both.

C, the common wire. C doesn’t turn anything on. It’s the return side of the 24V circuit, so with R and C connected the thermostat gets constant power. Older thermostats ran on batteries and didn’t need it, which is why many homes have no C wire connected.

Why colors can’t be trusted. Honeywell’s wiring guide puts it simply: there’s no standard for which color wire controls each function. Installers use whatever conductor is free, so you can find a blue wire on W or a black wire on C. Thermostat wiring colors are a useful hint, not proof.

You’ll also see thermostat cable labeled with two numbers, like 18/5. The first is the wire gauge (18 AWG) and the second is the number of conductors inside the jacket, so 18/5 has five wires. Extra conductors are often folded back in the wall, unused.


Common Thermostat Wiring Diagrams

Each thermostat wiring diagram below covers one common system. Start by counting the wires at your thermostat, since the number usually tells you what kind of system you have.

Thermostat Wiring Explained - chart showing what 2, 4, 5 and 6 or more thermostat wires usually mean, from heat only to furnace with central AC and heat pump, and whether a C wire is present

Two Wires: Heat Only

Two wires, almost always R and W, means a heat-only system such as a gas furnace without central air or a boiler. The thermostat works as a switch: it connects R to W when the room gets cold, and the heat turns on. There’s no C wire, which matters if you want a smart thermostat (more on that below). Our guide to the best 2-wire thermostats lists the ones that work with this setup.

Four or Five Wires: Furnace and Central Air

This is the most common setup in US homes. The thermostat cable runs to the control board in your furnace or air handler, and each wire lands on the matching letter there.

Thermostat Wiring Explained - thermostat wiring diagram for a furnace and central AC: R, C, W, Y and G wires run from the thermostat to the furnace board, with Y and C continuing to the outdoor unit
  • R brings 24V power up from the transformer.
  • W turns on the furnace.
  • Y turns on the air conditioner. From the furnace board, a separate two-wire cable carries Y and C out to the outdoor unit.
  • G runs the blower fan on its own (for example, when you set the fan to On). Our guide to thermostat fan On vs Auto explains when that’s worth it.
  • C gives the thermostat constant power.

With four wires, it’s usually R, W, Y and G with no C. That’s the classic “no C wire” home, and it’s the setup the brand adapters are designed for.

Heat Pump

A heat pump heats and cools with the same outdoor compressor, so its wiring works differently.

Thermostat Wiring Explained - heat pump thermostat wiring diagram: R, C, G, W2/AUX, Y, O/B and E wires to the air handler, with C, Y and O/B continuing to the outdoor unit
  • Y runs the compressor in both heating and cooling mode.
  • O/B switches the reversing valve, which decides whether the heat pump heats or cools.
  • W2 or AUX turns on the backup heat (usually electric heat strips in the air handler) when the heat pump can’t keep up.
  • E, if you have it, is emergency heat: backup heat only, with the compressor off (our guide to aux heat explains the difference).
  • R, C and G work as they do on a furnace system.

Most heat pumps energize the reversing valve in cooling, which is the O setting. Some brands, such as Rheem and Ruud, energize it in heating, which is the B setting. If the setting is wrong, the heat pump blows cold air when you ask for heat (and the opposite). The heat pump’s manual or the label on the outdoor unit tells you which one you have. If you’re choosing a new thermostat for this kind of system, see our guide to the best thermostats for heat pumps.

Two R Wires: Rh and Rc

If there’s a wire on Rh and another on Rc, your heating and cooling have separate transformers, which is common when a boiler and a separate air conditioner share one thermostat. Keep the two wires on separate terminals and remove any jumper between them.


Smart Thermostat Wiring

Smart thermostat wiring uses the same terminals as any other thermostat. The difference is power: a screen and a Wi-Fi radio need steady 24V power, and that’s what the C wire supplies. Without it, you can get a drained battery, Wi-Fi dropping out or a thermostat that keeps restarting.

If you don’t have a C wire, you have three options:

  • A spare wire. If an unused conductor is folded back in the wall, it can become your C wire, but only if you connect it to C at both ends: the thermostat and the furnace control board.
  • The brand’s adapter. The ecobee Power Extender Kit combines the Y and G functions to free up a wire for C, so it needs at least four wires. Honeywell’s C-Wire Adapter does something similar, turning G and Y into C and K. Google sells the Nest Power Connector for Nest thermostats. Our C-wire adapter guide explains which one fits which thermostat.
  • A thermostat that doesn’t need one. The Nest Learning Thermostat (4th gen) runs without a C wire in most homes, but not on heat-only, cool-only or single-stage heat pump systems. See our list of smart thermostats that work without a C wire.

Two more details are different from brand to brand. If you have one R wire, ecobee puts it in Rc, Honeywell puts it in R (with the R and Rc jumper in place), and Nest accepts it in Rh or Rc. And Nest thermostats and the Honeywell Home X8S don’t use jumpers at all. The setup app shows the right layout for your model, so follow it. Our guide to Nest thermostat installation lists every connector on the current Nest models. For Honeywell’s wall plate and its R-switch, see our guide to Honeywell thermostat installation.


How to Wire a Thermostat

If you’re wondering how to wire a thermostat when you replace one on the same system, it’s mostly a matter of moving each wire to the same letter:

  1. Turn off the power to your furnace or air handler at the breaker.
  2. Remove the old thermostat’s cover and photograph the wiring with the terminal letters visible.
  3. Label each wire by the letter of its terminal, not by its color.
  4. Disconnect the wires and wrap them around a pencil so they don’t fall into the wall.
  5. Connect each wire to the matching terminal on the new base. Leave any wire that wasn’t connected before unconnected.
  6. Turn the power back on and test heating, cooling and the fan one at a time.

For the full process (compatibility check, mounting and app setup), see how to install a smart thermostat. If something stops working after the swap, a wire in the wrong terminal or a power problem is the usual cause; our Nest thermostat troubleshooting guide covers the most common power symptoms. For a Honeywell, see our Honeywell thermostat troubleshooting guide, and for an ecobee, our ecobee thermostat troubleshooting guide. If a Honeywell was set up for the wrong type of system, our guide on how to reset a Honeywell thermostat shows how to start the setup again.


When to Call a Pro

Some wiring isn’t a standard 24V system, and a standard smart thermostat can’t control it:

  • Line voltage (120V or 240V). Thick wires, often joined with wire nuts, usually mean electric baseboard heat. These need a line-voltage thermostat; see our guide to smart thermostats for baseboard heaters.
  • Millivolt. Some gas wall heaters and fireplaces run on a very small voltage.
  • Communicating systems. Some high-end HVAC lines use their own data wiring and a matching wall control.

An HVAC pro is also the right call if there’s no C terminal on your furnace board, if you need new cable run through the wall, or if you’re not sure how a multi-stage or dual-fuel system is wired.


The Bottom Line

Reading a thermostat wiring diagram comes down to a few letters: R for power, C for constant power, W for heat, Y for cooling, G for the fan and O/B for a heat pump. Label by terminal, never by color, and check for a C wire before you buy a smart thermostat. When you know what your wiring supports, our guide to the best smart thermostats will help you choose.

What do the letters on a thermostat mean?

R is 24V power, C is the common wire for constant power, W is heat, Y is cooling (the compressor on a heat pump), G is the fan and O/B controls a heat pump’s reversing valve. W2 or AUX is second-stage or backup heat.

What color is the C wire on a thermostat?

It’s usually blue or black, but there’s no color standard. A C wire is whatever wire is connected to the C terminal at both the thermostat and the furnace or air handler control board.

Can I wire a thermostat by color?

No. Wire colors follow a convention, but installers don’t always use it. Label each wire by the terminal letter it was connected to on the old thermostat and connect it to the same letter on the new one.

What is the difference between Rh and Rc?

Rh powers the heating and Rc powers the cooling on systems with two transformers. If you only have one R wire, it powers both, and the terminal it goes into depends on the thermostat brand.

Does a smart thermostat need a C wire?

Most do, because the screen and Wi-Fi need constant power. Without one, you can use a spare wire connected at both ends, the brand’s C-wire adapter, or a model like the Nest Learning Thermostat (4th gen), which runs without a C wire in most homes.

What does the O/B wire do?

It controls a heat pump’s reversing valve, which switches between heating and cooling. Most heat pumps use O (energized in cooling), while some brands, such as Rheem and Ruud, use B (energized in heating).

Evan Mercer, founder and lead researcher at Smart Home Matrix

Written by Evan Mercer

Founder & Lead Researcher, Smart Home Matrix

Evan digs through spec sheets, firmware changelogs, and thousands of owner reviews so you don’t have to. Every guide starts with a compatibility check and ends with picks he would install in his own home. Read more about Evan and this site, or see exactly how we choose products.