How Does a Water Heater Work? (Tank Diagram Explained)

Illustration of a gas tank water heater in a basement with a cutaway showing hot water at the top and cold water at the bottom

A tank water heater is an insulated steel tank that keeps 30 to 80 gallons of water hot and ready. Cold water enters at the top and is piped to the bottom, a gas burner or electric elements heat it, and because hot water rises, the hottest water collects at the top, right where the outlet pipe draws it off when you open a tap.

A thermostat switches the heat on whenever the tank cools below its setting, and a relief valve stands by in case anything goes wrong. That’s the whole idea. The rest of this guide walks through each part, what happens when you turn on a hot tap, and which parts wear out first.

Labeled cutaway diagram of a gas tank water heater showing the cold water inlet and dip tube, hot water outlet, flue and baffle, anode rod, T&P relief valve, insulation, gas valve and thermostat, burner, drain valve and sediment layer
Inside a typical gas tank water heater. Tap the image to see it full size.

The parts of a tank water heater

Gas and electric models share most of their parts. Here is what each one does, roughly from top to bottom.

  • Cold water inlet. Water from your main supply enters through a pipe on top of the tank, usually marked “cold” or colored blue.
  • Dip tube. A plastic tube hangs from the inlet and carries incoming cold water down to the bottom of the tank, so it doesn’t mix with the hot water waiting at the top.
  • Hot water outlet. A short pipe on top draws water from the hottest layer at the top of the tank and sends it to your faucets.
  • Tank and insulation. The steel tank is lined with glass (often called a glass or porcelain lining) to slow rust. A layer of foam insulation between the tank and the outer jacket keeps stored water hot for hours.
  • Anode rod. A long metal rod, usually magnesium or aluminum, that corrodes on purpose. Corrosion attacks the rod instead of any bare steel in the tank. When the rod is used up, the tank starts to rust from the inside.
  • Thermostat and gas valve (gas models). A control on the front of the tank reads the water temperature through a probe and opens the gas valve when the water cools below your setting.
  • Burner and pilot (gas models). The burner sits in a chamber under the tank and heats it from below. A small pilot flame or an electronic igniter lights it.
  • Flue and baffle (gas models). Hot exhaust from the burner rises through a pipe that runs up the center of the tank. A twisted metal strip inside, the baffle, slows the exhaust down so more of its heat passes into the water before it leaves through the vent.
  • Heating elements (electric models). Instead of a burner and flue, an electric tank has two metal elements that reach into the water, one near the top and one near the bottom, each with its own thermostat.
  • Temperature and pressure (T&P) relief valve. A safety valve near the top. Residential T&P valves are typically rated to open at 150 psi or 210°F, releasing water through a discharge pipe that runs down toward the floor.
  • Drain valve. A spigot near the bottom for draining the tank and flushing out sediment.

What happens when you turn on a hot tap

  1. Opening the tap lets hot water leave the top of the tank through the outlet pipe.
  2. Water pressure from your supply line pushes the same amount of cold water in through the inlet. The tank is always full.
  3. The dip tube delivers that cold water to the bottom, under the hot layer.
  4. The thermostat senses that the water has cooled below its setting.
  5. On a gas model, the valve opens and the burner lights; on an electric model, an element switches on.
  6. The burner or element runs until the water is back up to temperature, then shuts off and waits for the next draw.

This is why a long shower can run the tank “dry” of hot water: you are drawing hot water off the top faster than the heater can warm the cold water coming in at the bottom. A bigger tank or a faster burner buys you more time; a tankless heater avoids the problem by heating water only as it flows.

Gas vs. electric: what’s different

Gas tankElectric tank
Heat sourceBurner under the tankTwo elements inside the tank
VentingNeeds a flue and vent to the outsideNo venting needed
Recovery speedFaster: reheats a tank more quicklySlower, especially with one element at a time
Common failuresPilot, thermocouple or igniter, gas valveBurned-out elements, tripped high-limit switch
Who should repairGas parts: a licensed proElements: a confident DIYer with the power off, or a pro

The safety systems

A tank of very hot water under pressure has to be able to relieve itself if a control fails. That’s the job of the T&P relief valve: if pressure or temperature climbs past its rating, it opens and dumps water through the discharge pipe. Never cap or plug that pipe, and if the valve drips or discharges repeatedly, have it checked, because it usually means pressure or temperature in the tank is too high.

Most heaters also have a high-limit cutoff that shuts the heat off if the thermostat fails, and many modern gas models are built to stop flames from igniting flammable vapors near the floor. Gas burners also need clear air around them, so don’t store paint, gasoline or solvents next to the heater.

Smell gas near the water heater? Don’t try to relight anything or touch light switches. Leave the house and call your gas utility or 911 from outside.

Which parts wear out first

A traditional tank water heater typically lasts 8 to 12 years, according to manufacturer A.O. Smith. Most tanks don’t fail all at once; one of these usually goes first:

  • The anode rod. Once it’s eaten away, the tank itself starts to corrode. Rusty hot water or a rotten-egg smell can both point to the anode.
  • Sediment. Minerals in the water settle on the bottom of the tank. On gas models, water trapped under that layer boils in small bursts, which is the popping or rumbling noise many older heaters make. Sediment also wastes energy and stresses the tank bottom.
  • Heating parts. Electric elements burn out, and gas pilots, thermocouples and igniters wear. These are repairable and don’t mean the whole heater is finished.
  • The tank. A leak from the tank body itself can’t be repaired. If water is coming from the tank rather than a fitting or valve, plan on a replacement.

How to help it last longer

  • Set it to 120°F. The U.S. Consumer Product Safety Commission recommends 120°F to reduce scald risk: water at 140°F can cause a third-degree burn in about six seconds. A lower setting also slows mineral buildup and saves energy.
  • Flush out sediment. Draining a few gallons from the drain valve, or doing a full flush as your owner’s manual describes, keeps the bottom of the tank clear. In hard-water areas this matters more.
  • Have the anode rod checked. Checking it every few years and replacing it before it’s gone can add years to a tank. It’s often stiff and awkward to remove, so many homeowners leave it to a plumber.
  • Keep the area clear. Leave space around a gas heater for air and service access, and keep flammable products far away from it.

When to call a pro

  • You smell gas, or the pilot won’t stay lit on a gas model.
  • Water is leaking from the tank body.
  • The T&P valve is dripping or discharging water.
  • You see scorch marks or soot around the burner door or vent.
  • The water is rusty, smells bad, or runs out much faster than it used to and a flush hasn’t helped.

Frequently asked questions

How long does a water heater take to heat a full tank?

It depends on tank size, the burner or element rating, and how cold your incoming water is. As a rough guide, a gas tank recovers faster than an electric one of the same size, and a full tank of cold water can take anywhere from about half an hour to over an hour to come up to temperature. Your heater’s label lists its recovery rate in gallons per hour.

What temperature should my water heater be set to?

120°F is the common recommendation for safety and efficiency. Some households choose a higher setting for specific reasons, such as a dishwasher without its own heater; if you do, consider anti-scald valves at the fixtures.

Why is my water heater making popping noises?

Almost always sediment. Water trapped under mineral deposits on the bottom of the tank turns to steam and pops as the burner heats it. Flushing the tank often reduces the noise; our guide to water heater popping noises walks through it. If you’re seeing water around the base instead, see water heater leaking from the bottom.

Is a tankless water heater the same thing without a tank?

Not quite. A tankless heater has no storage at all: it heats water as it flows through a heat exchanger, so it never runs out but has a limit on how much hot water it can supply at once. A.O. Smith puts their typical life at 15 to 20 years.

Can I drain my water heater myself?

Many homeowners do. Turn the heater off (or set a gas model to “pilot” or “vacation”), shut the cold supply, attach a hose to the drain valve, and open a hot tap to let air in. The water coming out can be very hot, so let it cool first and follow your owner’s manual.

Sources


General information only, not professional advice. Diagrams are AI-generated and simplified. Found a mistake? Tell us.