How Does a Water Heater Work? Tank, Tankless and Heat Pump (With Diagram)

Disclosure: As an Amazon Associate, Sweet Home Advisor earns from qualifying purchases. If you buy through links on this page, we may earn a small commission at no extra cost to you.

A tank water heater works by bringing cold water into the bottom of an insulated tank through a dip tube, heating it with a gas burner or electric elements, and sending the hot water out the top when you open a tap. A thermostat keeps the stored water at the set temperature (usually 120°F). A tankless water heater has no tank: when you open a hot tap, water flows through a heat exchanger and is heated on demand, typically delivering 2 to 5 gallons per minute. A heat pump water heater moves heat from the surrounding air into the tank instead of creating it.

Quick comparison

  • Tank (storage): heats and stores 30 to 80 gallons; lasts about 10 to 15 years
  • Tankless (on-demand): heats water as it flows; often lasts 20+ years
  • Heat pump (hybrid): a tank that uses a heat pump; the most efficient electric option

Flow rate and lifespan figures from the U.S. Department of Energy.

Parts of a water heater (diagram)

Labeled diagram of the parts of a tank water heater Cold water in Hot water out Dip tube(sends cold waterto the bottom) Anode rod(attracts corrosion) T&P relief valve Discharge pipe Thermostat andupper element Lower elementand thermostat Drain valve Insulation andouter jacket Steel tank Electric tank shown. Gas tanks replace the elements with a burner, gas valve and a flue up the center.
Main parts of a tank water heater. Gas models add a burner, gas control valve, pilot or igniter, and a center flue.
PartWhat it does
TankA steel tank, glass-lined inside, that holds the hot water
Dip tubeCarries incoming cold water to the bottom so it doesn’t mix with the hot water at the top
Heat sourceTwo electric elements, or a gas burner at the bottom
ThermostatTurns the heat on and off to hold the set temperature
Anode rodA sacrificial metal rod that corrodes instead of the tank; see our anode rod guide
T&P relief valveOpens if temperature or pressure gets too high; see how to replace a T&P valve
Drain valveLets you drain the tank and flush out sediment
Flue and burner (gas)The burner heats the tank from below; the flue carries exhaust out through the center
InsulationFoam between the tank and outer jacket that cuts heat loss

How a tank water heater works, step by step

  1. Cold water enters through the cold inlet and travels down the dip tube to the bottom of the tank.
  2. The water is heated. In a gas heater, the burner under the tank fires; in an electric heater, the elements switch on.
  3. Hot water rises to the top of the tank, because hot water is less dense than cold.
  4. You open a hot tap: hot water leaves from the top, and cold water refills the bottom.
  5. The thermostat senses the drop in temperature and turns the heat back on until the tank is back to the set point.

Sediment from hard water settles at the bottom of the tank over time. It can cause popping noises and lower efficiency, which is why flushing matters; see how to flush a water heater and why water heaters pop.

Gas vs electric tank heaters

Gas heaters heat faster (a higher recovery rate) and need venting and a gas supply. Electric heaters are simpler to install and need no venting, but recover more slowly. Electric elements can fail; see how to test a water heater element.

How does a tankless water heater work?

  1. You open a hot tap. A flow sensor detects water moving through the unit.
  2. The heat source turns on: a gas burner or electric elements heat a heat exchanger.
  3. Water passes through the heat exchanger and is heated to the set temperature as it flows.
  4. You close the tap and the unit shuts off. No water is kept hot in between.

Because there’s no standby heat loss, the Department of Energy estimates tankless heaters can be 24% to 34% more energy efficient than storage heaters for homes using 41 gallons or less of hot water a day, and 8% to 14% more efficient for homes using around 86 gallons a day. The trade-off is flow: running a shower and the dishwasher at once can exceed a single unit’s capacity. See what size tankless water heater you need.

How does a heat pump water heater work?

A heat pump water heater works like a refrigerator in reverse. A fan pulls in surrounding air, a refrigerant absorbs its heat, a compressor raises the temperature, and a coil transfers that heat into the tank. Because it moves heat rather than generating it, it uses much less electricity than a standard electric tank. It needs space and works best in a room that stays above about 40°F. See our heat pump water heater guide.

Which type should you choose?

TankTanklessHeat pump
Upfront costLowestHigher (often needs new venting or wiring)Highest
Running costHighestLowerLowest for electric homes
Hot water supplyLimited by tank sizeEndless, limited by flow rateLimited by tank size
Typical lifespan10 to 15 years20+ yearsAbout 10 to 15 years

For costs, see water heater replacement cost and how long water heaters last.

Frequently asked questions

How long does a water heater take to heat up?

A 40- or 50-gallon gas tank usually reheats in about 30 to 60 minutes; an electric tank can take 1 to 2 hours. A tankless unit heats water within seconds of turning on.

Why does my hot water run out?

The tank may be too small for your household, sediment may be taking up space, or a dip tube or element may have failed. See water heater troubleshooting.

What temperature should a water heater be set to?

Most manufacturers and the Department of Energy suggest 120°F, which saves energy and reduces scalding risk.

Does a water heater use electricity when not in use?

Tank heaters lose heat through the tank walls (standby loss) and reheat periodically even when no one uses hot water. Tankless units don’t.

Sources: U.S. Department of Energy, Tankless or Demand-Type Water Heaters (flow rates, efficiency, lifespan); manufacturer installation manuals. Updated November 2026.

Leave a Comment