How Does a Water Heater Work? Inside the Tank in 2027
Cold water enters the tank through a dip tube, a burner or heating element warms it to the temperature on the thermostat, and hot water leaves from the top when you open a tap. How does a water heater work in short: heat, store, and deliver. Tankless models skip the tank and heat water only while the tap runs.
The shower turns cold halfway through your rinse. You stand there, shampoo in your hair, and for the first time in years you actually think about the tall white cylinder in the garage. It has been humming away in the corner since the day you moved in, and you have never once looked inside it.
Most of us treat that cylinder like a mystery box. Water goes in cold, water comes out hot, and nobody asks questions until the morning it stops.
I have seen homeowners replace a perfectly good heater because a ten dollar part failed, and I have seen others live with lukewarm showers for a year because they assumed a new tank was the only fix. Once you know how does a water heater work, both mistakes get a lot harder to make.
What Happens When You Turn On the Tap
Everything starts at the tap, not at the heater. Open a hot water faucet and water leaves the top of the tank and runs through the pipes to your shower or sink.
At the same moment, cold water from your home supply line enters the tank through the cold water inlet. A long pipe inside the tank, called a dip tube, carries that cold water all the way to the bottom, so it does not mix with the hot water waiting at the top. That inlet is the first step in the answer to how does a water heater work.
Hot water floats. Cold water sinks. That simple fact, called stratification, is what keeps a tank useful: the hot layer sits on top ready to use while the cold layer settles at the bottom to be heated next.
As you use hot water, more cold water flows in, the temperature inside the tank drops, and the thermostat notices.
The thermostat works like the one on an oven. When the water falls below the set temperature, it switches the heat on.
When the water reaches the set temperature again, it switches the heat off. The tank then holds that hot water, wrapped in insulation, until the next tap opens.
Here is the whole sequence in one breath: tap opens, hot water leaves the top, cold water enters at the bottom through the dip tube, the thermostat fires the burner or the heating element, and the tank refills with heat. Close the tap and the heater keeps the water warm on standby, ready for the next shower. That loop is the answer to how does a water heater work, and every type below is just a different way to run it.
Inside the Tank: The Parts That Do the Work
Strip away the brand name and almost every tank water heater is built from the same parts. Learn them once and you can read any heater, gas or electric, the way a plumber does. Each part answers a small piece of how does a water heater work.
The tank itself is a steel cylinder, usually 30 to 80 gallons in a US home, with a glass or enamel lining on the inside to slow rust. Insulation wraps the outside so the water stays hot between uses instead of losing heat to the room around it, and the tank is the quiet core of the system, day after day, and it is the first thing to picture when you ask how does a water heater work. That lost heat has a name, standby heat loss, and it is one reason a tank heater uses energy even when nobody is home.

The dip tube is a plastic pipe that runs from the cold water inlet at the top down to near the bottom of the tank. Its job is to deliver incoming cold water low, where it belongs, and to keep the hot layer on top untouched. A cracked dip tube is a common and cheap failure: cold water mixes at the top, showers run short, and many homeowners wrongly assume they need a whole new heater.
The anode rod is the part almost nobody has heard of, and it is the reason a steel tank can hold water for a decade without rusting through. Ask how a water heater works without rusting from the inside, and the anode rod is the answer.
It is a rod of magnesium or aluminum that hangs inside the tank and corrodes on purpose, so the water attacks the rod instead of the tank wall. Once the rod is fully eaten away, the tank itself becomes the next thing corrosion goes after.
The thermostat and the heating parts sit at the heart of the system, and they are the first thing to check when you ask how does a water heater work. A gas heater has a burner under the tank and a flue running up through the middle to carry combustion gases outside. An electric heater has one or two metal heating elements submerged in the water, like the coil in a toaster, with the upper element heating the top of the tank first so hot water is ready fast.

Two safety parts deserve your attention. The temperature and pressure relief valve, called the TPR valve, sits on the top or side of the tank and releases water if the temperature or pressure inside ever gets dangerously high.
Test it once a year by lifting the lever and checking that water comes out and then stops. The drain valve sits near the bottom and lets you flush sediment out of the tank.
Some homes also have an expansion tank, a small tank mounted nearby that absorbs the extra pressure created when heated water expands in a closed plumbing system. It is a small detail, but it matters when you ask how does a water heater work safely in a closed system. If your home has a check valve or a pressure reducing valve on the main line, an expansion tank protects your fixtures and your heater from that pressure.
How Does a Gas Water Heater Work?
A gas water heater heats from below. When the thermostat senses the water has cooled, it opens the gas valve and the burner under the tank ignites, usually from a pilot light or an electronic igniter. That ignition is the moment fuel turns into flame and heat, and it is the first thing people picture when you ask how does a water heater work on gas.
The flame heats the bottom of the tank, and heat rises through the water until the whole tank reaches the set temperature. Hot gases from the burner travel up through a flue in the middle of the tank, which adds extra heat on the way out, then vent outside through a chimney or a vent pipe. Because the burner needs no electricity to run, a standard gas tank heater with a standing pilot keeps working during a power cut, which is a real comfort in a storm.
Gas tank heaters heat fast. A standard gas tank recovers about 30 to 40 gallons per hour, which is the recovery rate, the amount of water the heater can raise by 90 degrees Fahrenheit in one hour. If you have ever wondered how does a water heater work fast enough for a family of five, recovery rate is the number to check.
The trade off is venting and efficiency. A gas burner loses some heat up the flue, and the heater needs a safe vent path outside plus fresh air for combustion. Gas heaters also need a carbon monoxide check now and then, because any gas appliance that burns fuel can produce it if the vent is blocked.
How Does an Electric Water Heater Work?
An electric water heater heats from inside the water itself. Two heating elements sit submerged in the tank, one near the top and one near the bottom, and each one works like the element in an electric kettle. That is the short version of the story when you ask how does a water heater work on electricity.
When the thermostat calls for heat, the upper element switches on first and warms the top of the tank, so usable hot water is ready quickly. The lower element then heats the rest of the tank. Once the whole tank reaches the set temperature, both elements switch off and the insulation takes over.

Electric resistance heating converts electricity to heat one to one, so every unit of electricity becomes one unit of heat in the water. That sounds perfect, but electricity usually costs more per unit of heat than gas, so electric tank heaters are often the cheapest to buy and the most expensive to run, which is a trade off worth knowing when you ask how does a water heater work on a budget. The US Department of Energy puts typical annual use for a standard electric tank at 3,500 to 4,500 kilowatt hours.
Electric heaters have no flame, no flue and no combustion gases, so they need no vent and can sit in a closet or a small utility space. The parts that fail most often are the heating elements and the thermostats, and both are inexpensive to replace compared with a new tank. That is worth knowing before you agree to a full replacement quote.

One detail catches new owners by surprise: an electric tank recovers slowly, about 20 to 25 gallons per hour. If your household uses a lot of hot water in a short burst, a bigger tank or a higher first hour rating matters more on an electric model than on a gas one.
How Does a Heat Pump Water Heater Work?
A heat pump water heater, sometimes sold as a hybrid, does not make heat the way a burner or an element does. It moves heat from the air around it into the water, using a compressor and a refrigerant loop, the same basic idea as a refrigerator running in reverse.
Because it moves heat instead of creating it, a heat pump heater is 2 to 3 times more energy efficient than a standard electric resistance heater, according to the US Department of Energy. ENERGY STAR certified models use about 70 percent less energy than a standard electric tank, saving a family of four about $550 a year and about $5,600 over the life of the heater, according to ENERGY STAR figures reported by Consumer Reports. Those numbers explain why people who ask how does a water heater work on a heat pump usually start with the energy bill.
The catch is the room it sits in. A heat pump heater needs a space that stays 40 to 90 degrees Fahrenheit all year, with at least 1,000 cubic feet of air around the unit, and it cools the room slightly as it works.
A warm garage or a large basement is ideal. A small closet is not.
Heat pump heaters also recover slowly, so they suit households with steady, spread out hot water use better than a house where four people shower back to back at 7 in the morning. Most hybrid models carry backup electric elements for those busy mornings, which is a good feature to check before you buy.
How Does a Tankless Water Heater Work?
A tankless heater, also called a demand type or instantaneous heater, has no tank at all. When you open a hot water tap, a flow sensor wakes the unit up, and cold water runs through a heat exchanger, a coil of pipe over a powerful gas burner or a set of electric elements, that raises the water temperature in seconds on its way to the tap. That on demand heating is the clearest case of how does a water heater work when there is no tank to store anything in.
Close the tap and the heater shuts off. There is no stored hot water, so there is no standby heat loss and no tank to run dry, and that is the part tankless owners notice first on the energy bill, and it is the first thing to check when you ask how does a water heater work. The US Department of Energy says tankless heaters are 24 to 34 percent more energy efficient than a conventional storage tank in homes that use 41 gallons of hot water a day or less, and 8 to 14 percent more efficient in homes that use about 86 gallons a day.

The limit is flow rate, not storage. A tankless unit delivers 2 to 5 gallons per minute, and gas models give higher flow rates than electric ones.
Run a shower and a dishwasher at the same time and even a large gas unit can struggle, because the water is moving too fast to heat fully. That is why tankless heaters are sized by flow rate and temperature rise, not by gallons of storage.
Tankless heaters last a long time. The Department of Energy puts their life at more than 20 years, against 10 to 15 years for a storage tank, and their parts are easy to replace. The trade off is the install cost: gas models can need a larger gas line and a new vent, electric models can need a much bigger circuit, and hard water can leave mineral scale in the heat exchanger, so a yearly flush matters in hard water areas.
Solar, Indirect and Point of Use Heaters
Three less common types round out the picture, and each one answers a different kind of home, so each one answers how does a water heater work in its own way. A solar water heater uses rooftop collectors to capture heat from sunlight and move it into a storage tank. Active systems use pumps and controls, passive systems rely on natural circulation, and almost every solar setup needs a backup heater for cloudy days.
An indirect water heater has no burner or element of its own. It is a storage tank with a heat exchanger inside, and your home boiler or furnace heats water that circulates through that exchanger and warms the tank. It works well in homes that already run a boiler for heat.
A point of use heater is a small unit that serves one tap, usually a distant bathroom sink or a kitchen sink far from the main tank. It heats a small amount of water right where it is needed, so you stop waiting for hot water to travel down a long pipe run. It is a fix for a layout problem, not a replacement for a main heater.
Once you have seen all eight types, the core idea stays the same, and it is the same idea that answers how does a water heater work for every home: cold water in, heat added by fuel, electricity or sunlight, hot water stored or delivered on demand.
Water Heater Types at a Glance
The table below puts the types side by side so you can see the trade offs in one place. Use it to narrow the choice, then size the winner properly with the section that follows. Keep that question in mind as you read it, because each row is a different answer to how does a water heater work.
| Type | How it heats and who it suits |
|---|---|
| Gas tank, 10 to 15 years | A gas burner under the tank heats the water. Best for busy households that need fast recovery. |
| Electric tank, 10 to 15 years | Two heating elements warm the water from inside. Best for homes with no gas line and small spaces. |
| Heat pump, 10 to 15 years | Moves heat from room air into the water. Best for warm garages and basements with low bills. |
| Tankless gas, more than 20 years | Heats water on demand in a heat exchanger. Best for endless hot water with low daily use. |
| Tankless electric, more than 20 years | Heats water on demand with electric elements. Best for small homes and single points of use. |
| Solar, 20 years or more | Rooftop collectors heat the water, with a backup heater. Best for sunny climates with low running cost. |
| Indirect, 10 to 15 years | A boiler heats water through a heat exchanger. Best for homes that already run a boiler. |
| Point of use, 5 to 10 years | A small unit that serves one tap. Best for a distant sink far from the main tank. |
No type wins on every line. A gas tank wins on recovery speed, a heat pump wins on running cost, and a tankless wins on endless supply. The right choice is the one that fits your fuel, your space and your morning routine, not the one with the best brochure.
What Size Water Heater Do You Need
Size is where most buying mistakes happen, because the number on the tank is not the number that matters when you ask how does a water heater work for your household. What matters is the first hour rating, the gallons of hot water a storage heater can supply in one hour starting with a full tank. It is printed on the yellow EnergyGuide label as capacity first hour rating, and you want a model whose first hour rating is at least as big as your peak hour demand.
Peak hour demand is the hot water your household uses in its busiest hour, usually the morning. The Department of Energy worksheet counts each use in gallons: a shower 20, shaving 2, hand dishwashing or food prep 3, an automatic dishwasher 7, and a clothes washer 15 for a front loader or 25 for a top loader.
Take a family of four on a school morning. Three showers use 60 gallons, one shave adds 2, and hand dishwashing adds 3. That totals 65 gallons in one hour, so that household needs a first hour rating of 65 gallons or more.
The Department of Energy uses that exact example in its sizing guide, and it is the fastest way to see why a 40 gallon tank can still serve a family of four if its recovery rate is strong.
Recovery rate is the other half of the sizing math. It is the gallons of water the heater can raise by 90 degrees Fahrenheit in one hour, about 30 to 40 for a standard gas tank and about 20 to 25 for an electric one. First hour rating is roughly the usable water in a full tank plus one hour of recovery, which is why a gas tank with the same gallons as an electric tank can handle a busier morning.
Tankless heaters size differently. Add up the flow rates of the fixtures you run at the same time, a shower at 2.5 gallons per minute and a faucet at 0.75, and you need a unit that can deliver at least 3.25 gallons per minute at your temperature rise. The Department of Energy uses that example too, and it is the number to check before you buy.
A quick rule of thumb for tank size: a 30 to 40 gallon tank suits one or two people, a 40 to 50 gallon tank suits three or four, and a 50 to 80 gallon tank suits five or more. Treat that as a starting point only. The first hour rating and your real morning routine are the numbers that decide.
What Temperature Should You Set Your Water Heater To
The US Department of Energy recommends setting a water heater to 120 degrees Fahrenheit. That number is a balance between three things: comfort, safety and cost, and it is worth understanding all three before you turn the dial.
Every 10 degree cut in the set temperature saves 3 to 5 percent on water heating costs, and dropping from 140 to 120 degrees saves about 6 to 10 percent, or about $36 to $61 a year, according to the Department of Energy. Water heating is about 18 percent of a home energy bill, the second largest energy expense after heating and cooling, so that saving is real money over the life of a tank.
Safety is the stronger reason. The US Consumer Product Safety Commission warns that tap water scalds are a real risk, especially for children and older adults.
At 150 degrees Fahrenheit a third degree burn takes about 2 seconds, at 140 degrees about 6 seconds, at 130 degrees about 30 seconds, and at 120 degrees about 5 minutes. That gap between 6 seconds and 5 minutes is the difference between a startled yell and a trip to the hospital.
| Water temperature | Time to a third degree burn |
|---|---|
| 150 degrees Fahrenheit | About 2 seconds |
| 140 degrees Fahrenheit | About 6 seconds |
| 130 degrees Fahrenheit | About 30 seconds |
| 120 degrees Fahrenheit | About 5 minutes |
There is one counterweight to the 120 degree advice. Legionella bacteria, which cause Legionnaires disease, grow best between 77 and 113 degrees Fahrenheit, and building guidance from the Centers for Disease Control and Prevention is to store hot water above 140 degrees and keep circulating hot water at or above 120 degrees.
The practical answer is a thermostatic mixing valve, a small valve that lets you store water hotter in the tank while delivering about 120 degrees at the tap. If anyone in your home is older, very young or has a weak immune system, ask a plumber about a mixing valve before you change the setting.
To change the temperature, and to see how does a water heater work at a lower setting, find the thermostat behind the access panel on an electric heater or the dial on the gas valve of a gas heater, and move it in small steps. Wait a full day, test the water at the tap farthest from the heater, and adjust again if needed. Never set a gas heater below the range printed on its label, and never touch the gas valve if you smell gas.
How to Read the Yellow EnergyGuide Label
Every new water heater sold in the US carries a yellow EnergyGuide label, and it holds three numbers worth reading before you buy. The first is the capacity, listed as the first hour rating for a tank heater or the flow rate in gallons per minute for a tankless model.
The second is the Uniform Energy Factor, or UEF. It measures how much of the energy going in becomes hot water coming out, and higher is better. Most traditional storage heaters score 0.63 to 0.95, gas tankless models score 0.82 to 0.97, and ENERGY STAR heat pump models score 3.3 to 4.1, because they move heat instead of making it.
The third is the estimated yearly operating cost, which lets you compare two models side by side in dollars instead of in engineering terms. A cheaper heater with a low UEF can cost more over ten years than a pricier model with a high one, and the label makes that trade off visible in one glance.
Read the label the way you would read a car window sticker: capacity tells you if it fits your household, UEF tells you how efficiently it works, and the yearly cost tells you what it will really cost to own. That is the short answer to how does a water heater work in the store, before it ever reaches your garage.
Keep It Running: A Simple Maintenance Checklist
A water heater asks for very little, and the little it asks for is what keeps it alive past year ten. The Department of Energy maintenance schedule for a storage heater fits on one line: flush a quart of water from the tank every 3 months, check the temperature and pressure valve every 6 months, and inspect the anode rod every 3 to 4 years. Follow that schedule and the whole job stays a curiosity, not an emergency, once you know how does a water heater work.
Flush the tank once a year to clear sediment, every 6 months if your water is hard. Minerals like calcium and magnesium settle at the bottom of the tank, trap heat, make the heater work harder and cause the popping and rumbling noises that owners often mistake for a dying tank. A yearly flush is a hose, a bucket and half an hour, and it is the single best thing you can do for a tank heater.

Check the anode rod every 3 to 4 years in normal water, sooner in hard water, where a rod can wear out in about 2 years. A rod with more than 6 inches of core wire showing needs replacing, and a new rod costs far less than a new tank. This is the maintenance step that most often decides whether a heater lasts 8 years or 15.
Test the TPR valve once a year by lifting its lever and checking that water flows out and then stops. If nothing comes out, or if it keeps dripping after the test, call a plumber. Never cap or plug a TPR valve, and never ignore a valve that is leaking, because it is the one part standing between a normal tank and a dangerous one.
On a tankless unit, the main job is descaling the heat exchanger once a year in hard water areas, or every two years in soft water areas. On a heat pump unit, clean the air filter and check the condensate drain now and then, the same way you would on an air conditioner.
Write the dates on a card taped to the tank. The heater will not remind you, and a ten minute job done on time beats a thousand dollar replacement done too late. Our home maintenance checklist keeps this job alongside the other seasonal tasks your house needs, so nothing slips through.
Signs Your Water Heater Is Failing
Heaters rarely die without warning. They send signals for weeks or months first, and knowing them is the difference between a planned replacement and a flooded garage floor. Most of those signals make sense once you have seen the inside of the tank, which is where how does a water heater work stops being a mystery.
Rusty or discolored hot water usually means the inside of the tank is corroding, often because the anode rod is gone. Popping or rumbling sounds mean sediment has built up and trapped water is turning to steam under it. A tank that runs out of hot water faster than it used to often has a cracked dip tube or a failed lower heating element, both cheap fixes, so do not assume the tank is finished.
Water pooling at the base of the tank is the serious one. A leak from the tank itself cannot be repaired, and it means replacement time.
A leak from a fitting, a valve or a pipe connection can often be fixed, so check where the water is coming from before you order a new heater. Higher energy bills with no change in use, a rotten egg smell from the hot tap, and water that swings hot and cold are all worth a look too.
Age matters as a guide, not as a verdict. A standard tank lasts 10 to 15 years, a tankless more than 20, and a well maintained tank can run past 15. When a tank is past 10 years and showing two or more of these signs, start getting quotes instead of waiting for the floor to tell you.
Our guide to replace a water heater walks through the replacement decision, step by step, so you can plan it on your own schedule.
Related guides
These guides go deeper on the jobs around how does a water heater work, from replacing a worn out tank to keeping the rest of the house on schedule.
- How to Replace a Water Heater
- Home Maintenance Checklist for Every Season
- Best Home Maintenance Apps in 2027
- How to Drain a Water Heater in 2027
- How to Flush a Water Heater in 2027
- How to Drain a Gas Water Heater in 2027
- How to Flush a Gas Water Heater in 2027
- How to Flush Tankless Water Heater Units in 2027
- How Long Does It Take to Drain a Water Heater in 2027
- How Long Does a Water Heater Last in 2027
- What Is a Tankless Water Heater in 2027
- How Does a Tankless Water Heater Work in 2027
Frequently Asked Questions
How long does a water heater last?
A standard storage tank lasts 10 to 15 years, and a tankless heater typically lasts more than 20 years, according to the US Department of Energy. A tank that gets a yearly flush and a fresh anode rod can run past 15 years, while a neglected tank in hard water can fail in 8. Age alone is not a verdict, so check the signs in the section above before you decide.
What temperature should I set my water heater to?
Set it to 120 degrees Fahrenheit, which is the temperature the US Department of Energy recommends. At 120 degrees a third degree burn takes about 5 minutes, against about 6 seconds at 140 degrees, and you save about $36 to $61 a year compared with running at 140 degrees. If you store water hotter for Legionella control, fit a thermostatic mixing valve so the tap still delivers about 120 degrees.
Why is my hot water running out so fast?
The most common causes are a cracked dip tube, a failed lower heating element on an electric heater, or heavy sediment cutting the usable volume of the tank. A cracked dip tube lets cold water mix with the hot layer at the top, so showers run short even though the tank is full. All three are cheaper to fix than a new tank, so get the heater checked before you replace it.
How often should I flush my water heater?
Flush a storage tank once a year, or every 6 months if your water is hard. The US Department of Energy also suggests draining a quart of water from the tank every 3 months as a light routine, and checking the temperature and pressure valve every 6 months. A yearly flush clears the sediment that causes popping noises, slow recovery and higher bills.
What does the anode rod do?
The anode rod is a magnesium or aluminum rod inside the tank that corrodes on purpose, so the water attacks the rod instead of the steel tank wall. Inspect it every 3 to 4 years and replace it when more than 6 inches of core wire is showing. Once the rod is gone, the tank rusts fast, and that is how most tanks actually die.
Is a tankless water heater worth it?
It depends on how much hot water you use. A tankless heater is 24 to 34 percent more energy efficient than a storage tank in a home that uses 41 gallons of hot water a day or less, but only 8 to 14 percent more efficient at about 86 gallons a day, according to the US Department of Energy. If your main question is how does a water heater work best for low daily use, tankless is hard to beat.
Water heaters involve hot water, gas, electricity and pressure, so take safety seriously. Never cap or plug the temperature and pressure relief valve, never work on a gas heater if you smell gas, and switch off the power at the breaker before you touch any wiring on an electric heater. If a tank is leaking from the body itself, or the water smells strongly of gas, call a licensed plumber and do not wait.
Go and look at your heater this weekend. Read the label, check the temperature setting, lift the TPR valve lever, and write the install date on a card taped to the tank.
Ten minutes now is the cheapest insurance a water heater ever gets, and the next cold shower will not catch you by surprise. Now that you have read this far, that ten minutes will make sense, because you know how does a water heater work.
Sources: US Department of Energy, Energy Saver, Water Heating; US Department of Energy, Energy Saver, Sizing a New Water Heater; US Department of Energy, Energy Saver, Storage Water Heaters; US Department of Energy, Energy Saver, Tankless or Demand Type Water Heaters; US Department of Energy, Energy Saver, Heat Pump Water Heaters; US Department of Energy, Energy Saver, Solar Water Heaters; US Consumer Product Safety Commission, Publication 5098, Avoiding Tap Water Scalds; Consumer Reports, How to Choose a Water Heater; Reservoir Home, How Water Heaters Work; Viking Plumbing, How Does a Water Heater Work; Flotechs Plumbing, All About Water Heaters. Figures are national planning ranges from those sources, not quotes, so get written advice from a licensed local plumber before you budget or change a gas appliance.

