Short answer
Repair makes sense for a younger heater with a failed part like an element, thermostat or thermocouple. Replace it if the tank is leaking, it's near or past 10 years old, or repairs keep adding up.

Signs it's time to replace
A tank that leaks from the body can't be fixed.
- Water pooling under the tank, not from a fitting
- Rusty hot water
- The heater is 10 or more years old (check the date on the label)
- Loud rumbling that flushing doesn't fix
Often worth repairing
No hot water from a tripped breaker, burned-out element, bad thermostat, thermocouple or flame sensor. These parts are usually quick to replace on a heater with years left.
What a replacement involves
Replacing a tank is usually a same-day job for the plumber, but there is more to it than swapping the unit. The old tank is drained and removed, the new one is set, connected to water, gas or electric, and venting, and the relief valve discharge is routed to a safe drain point. Permits and inspection are normally part of the job.
Before choosing a replacement, check the space: a larger tank may not fit the same closet, and a tankless unit needs wall space, venting and often a bigger gas line or a new circuit. The plumber sizes the unit from the household's peak hot-water use: showers, laundry and dishwasher running at the same time, not just the number of bathrooms.
Tank or tankless?
If you're replacing, compare both. Tankless saves space and doesn't run out, but may need a larger gas line or new electrical circuit. See tankless water heaters and water heater repair.
Questions
How do I find my water heater's age?
The serial number on the label usually encodes the manufacture date. The manufacturer's website explains how to read it.
What size water heater do I need?
Tanks are sized by household hot water use at peak times; tankless by flow rate and incoming water temperature. A plumber can size it.
Is it worth repairing a water heater that is 10 years old?
Generally no. If a tank water heater is 10 years or older, replacement is usually more cost-effective because the internal glass lining and anode rod are depleted, putting the tank at high risk of sudden rupture.
How much energy does a tankless water heater save over a tank?
According to the US Department of Energy, tankless water heaters can be 24% to 34% more energy-efficient than conventional storage tanks for homes using 41 gallons or less of hot water daily.
Why does my hot water run out faster than it used to?
Scale buildup on the bottom of the tank and on the elements reduces the usable hot water and slows recovery. Flushing helps on a younger tank; on an older one it is often a sign the tank is wearing out.
What is the anode rod, and does it matter?
The anode rod is a sacrificial metal rod inside the tank that corrodes so the tank lining doesn't. When it is used up, the tank starts corroding instead. Checking it every few years and replacing it when depleted can extend the tank's life.
This guide is general information, not professional, legal or insurance advice. Follow your insurer's instructions and local codes, and put safety first.