You step into the shower ten minutes after someone else finishes, and the water goes cold halfway through. The tank is full. The heater is running. So where did the hot water go?
Your water heater is not a giant kettle that heats all the water to one uniform temperature. It is a thermally stratified column where the top can be 40°F hotter than the bottom, and the system deliberately exploits that difference.
Most people picture a water heater as a single mass of water that gets heated, used, and then reheated from scratch. In reality, the tank is never one temperature. Cold incoming water is routed to the bottom of the tank through a long plastic pipe called a dip tube, while hot water is drawn from the top. Because hot water is less dense than cold water, it naturally floats upward, creating distinct temperature layers. The hottest water sits at the top, right where the outlet pipe is. The coldest sits at the bottom, right where the burner or heating element is. This density-driven sorting is called thermal stratification, and it is the reason your water heater works as well as it does.
The heating cycle starts when the thermostat, a temperature switch pressed against the tank wall, senses that water has dropped below the set point (typically 120°F). On a gas heater, the thermostat opens a gas valve, and a pilot light or electronic igniter fires the burner at the base of the tank. A standard 50-gallon residential unit produces about 40,000 BTU per hour. The flame heats the steel bottom of the tank directly, and combustion gases rise through a flue tube running vertically through the center, transferring additional heat to the surrounding water on the way up.
As the water at the bottom heats up, it becomes less dense and rises. Cooler water from above sinks to take its place. This natural convection creates a continuous circulation that gradually raises the temperature of the entire tank, but the top always stays hottest. When someone opens a hot water faucet, pressure from the main water supply pushes cold water into the tank through the dip tube at the bottom. That cold water displaces the hot layer above it, pushing it out through the outlet at the top. You get the hottest water first, every time.
But here is the critical point: you do not "use up" the heat. You use up the hot layer. As you draw hot water, the cold layer at the bottom grows taller and the hot layer at the top shrinks. When the cold layer reaches the height of the outlet pipe, your shower goes cold. The burner may still be running, but it cannot heat water fast enough to keep up with the flow. This race between consumption and recovery is what determines whether you get a comfortable shower or a cold surprise.
The race between consumption and recovery
Your water heater's first hour rating tells you how many gallons of hot water it can deliver in one sustained hour of use. A 50-gallon gas tank with a 40 GPH recovery rate has a first hour rating of about 80 to 90 gallons: the 50 gallons already stored, plus 30 to 40 gallons reheated during that hour. An electric heater with the same tank size recovers at only about 21 gallons per hour, giving a first hour rating of roughly 65 to 70 gallons. This is why gas heaters recover from back-to-back showers nearly twice as fast as electric ones.
The incoming cold water temperature matters more than most people realize. In northern states, groundwater arrives at 40 to 47°F, meaning the heater has to raise it 73 to 80 degrees to reach the 120°F set point. In the Southeast, inlet water can be 60 to 77°F, requiring only a 43 to 60 degree rise. The same heater recovers significantly faster in Florida than in Minnesota, simply because it has less work to do. This is also why your hot water seems to last longer in summer: the incoming water is warmer, and the hot layer takes longer to be displaced by the smaller temperature differential.
Draw hot water, then watch each heater type race to recover. Gas recovers at ~40 GPH, electric at ~21 GPH, and tankless heats on demand (no tank to refill).
The sediment problem nobody warns you about
Every gallon of water that enters your tank carries dissolved minerals. Over years, those minerals settle to the bottom as sediment, forming an insulating blanket between the burner and the water it is trying to heat.
Sediment buildup is the silent killer of water heaters. Calcium carbonate and other minerals precipitate out of heated water and settle at the bottom of the tank, exactly where the burner applies heat. As the layer thickens, it insulates the water from the flame, forcing the burner to run longer and hotter to achieve the same temperature. The overheated steel beneath the sediment deteriorates faster, shortening tank life. Worse, pockets of water trapped under the sediment layer superheat and violently burst upward, producing the rumbling and popping sounds that signal trouble. A simple annual flush through the drain valve, running water until it clears, can prevent this cascade. Left unchecked, sediment can reduce effective tank capacity by 10 to 20% and increase energy consumption by up to 30%.
The anode rod is the tank's other hidden lifeline. This sacrificial magnesium or aluminum rod hangs from the top of the tank and corrodes in place of the steel walls through galvanic action: a more reactive metal deliberately sacrificing itself to protect a less reactive one. Once the rod is more than 50% depleted, the tank itself begins to corrode. A $25 anode rod replacement every 2 to 5 years can extend tank life from 8 years to 15 or more. Most homeowners have never checked theirs.
The next time your shower goes cold, you will know exactly what happened: the cold layer at the bottom of the tank, fed by the dip tube and pushed upward by incoming water pressure, finally reached the outlet pipe at the top. The hot water was not consumed or destroyed. It was displaced. Understanding this changes how you use hot water: spacing out showers by 30 minutes gives a gas heater time to reheat 20 gallons, enough for another full shower. It also explains why the first shower of the morning is always the hottest (the tank has had all night to fully stratify) and why running the dishwasher and the shower simultaneously drains the hot layer twice as fast. Your water heater is not a kettle. It is a carefully layered column, and density does all the sorting.