Replacing a water heater is one of the most common yet intimidating home maintenance tasks. A leaking or failing water heater can cause significant water damage, and no one wants to be without hot water for long. The good news is that replacing a standard electric or gas water heater is well within reach of a competent DIYer with the right tools and knowledge. This guide covers everything from diagnosis and sizing to step-by-step replacement procedures and code requirements, saving you hundreds of dollars in labor costs.
When to Replace vs. Repair
The first decision is whether to repair or replace. The table below helps you make that call based on symptoms and age:
| Symptom | Likely Cause | Repair or Replace? |
|---|---|---|
| No hot water (electric) | Failed heating element or thermostat | Repair ($20–$60) |
| No hot water (gas) | Failed thermocouple or pilot assembly | Repair ($15–$50) |
| Rusty or discolored water | Corroded sacrificial anode or tank interior | Replace (tank is failing internally) |
| Water pooling around base | Leaking tank | Replace (tank has failed) |
| Rumbling or popping noises | Sediment buildup | Flush first; replace if over 10 years old |
| Inconsistent temperatures | Thermostat issue or undersized unit | Repair thermostat or upgrade size |
| Unit is 10–15+ years old | Normal aging and corrosion | Replace proactively to prevent flooding |
A water heater nearing the end of its expected lifespan (typically 10–15 years for tank models) is usually worth replacing rather than repairing, especially if it shows signs of corrosion or leakage. The cost of a flooded basement far exceeds the cost of proactive replacement. For a deeper understanding of how your water heater works, see our guide on how electric water heaters work.
Choosing the Right Replacement Water Heater
Selecting the correct water heater involves several factors including fuel type, tank size, efficiency rating, and physical dimensions. Here is a comparison of the most common types available on the market today:
| Type | First-Hour Rating | Energy Factor (UEF) | Lifespan | Installed Cost | Annual Operating Cost* |
|---|---|---|---|---|---|
| Standard Electric (40 gal) | 30–40 gal | 0.92–0.95 | 10–15 yrs | $800–$1,200 | $400–$600 |
| Standard Gas (40 gal) | 40–55 gal | 0.60–0.70 | 10–15 yrs | $900–$1,500 | $250–$400 |
| Tankless Electric | Unlimited | 0.98+ | 15–20 yrs | $1,500–$3,000 | $350–$500 |
| Tankless Gas | Unlimited | 0.82–0.96 | 15–20 yrs | $2,000–$4,500 | $200–$350 |
| Heat Pump (Hybrid) | 50–65 gal | 3.0–4.0 (UEF) | 10–15 yrs | $1,800–$3,000 | $150–$250 |
*Operating costs vary by local utility rates and usage patterns.
For most households, a standard 40-gallon electric or gas water heater provides the best value. Tankless models offer energy savings and endless hot water but have higher upfront costs and may require upgrading gas lines or electrical service. Heat pump water heaters are the most energy-efficient option but require installation in a space that remains above 40°F year-round and has adequate air volume (at least 1,000 cubic feet).
Sizing Your New Water Heater
Proper sizing ensures you have enough hot water for your household’s peak demand. For tank-style water heaters, sizing is based on the first-hour rating (FHR), which measures how much hot water the heater can deliver in the busiest hour. Use this guide to estimate your needs:
| Household Size | Recommended Tank Size | Typical FHR Needed |
|---|---|---|
| 1–2 people | 30–40 gallons | 30–40 gal |
| 3–4 people | 40–50 gallons | 50–60 gal |
| 5+ people | 50–80 gallons | 70–90 gal |
If you have a large soaking tub, multiple bathrooms, or appliances that use hot water simultaneously (dishwasher + washing machine + showers), consider sizing up one level or switching to a tankless system.
Tools and Materials Needed
- New water heater (correct size and fuel type)
- Flexible supply lines (stainless steel braided, 2 required)
- Dielectric unions (if not pre-installed on the new unit)
- Teflon tape or pipe thread compound
- Pipe wrenches (2, for holding fittings)
- Screwdrivers (flathead and Phillips)
- Adjustable wrench
- Bucket or drain pan (at least 5-gallon capacity)
- Garden hose (long enough to reach a drain)
- Safety glasses, work gloves, and closed-toe shoes
- Sediment pan (if required by local code)
- Expansion tank (required in most jurisdictions)
- Seismic straps (2 sets required in earthquake-prone areas)
Check local codes regarding expansion tanks — many municipalities now require them for all new water heater installations. Our guide on water heater expansion tanks provides detailed guidance on selection, sizing, and installation requirements.
Safety First
Water heater replacement involves electricity, gas, water, and potentially heavy lifting. Follow these safety precautions without exception:
- Electric water heaters: Turn off the breaker at the main panel. Verify power is off with a non-contact voltage tester before touching any wires.
- Gas water heaters: Turn the gas valve to the OFF position. Allow any accumulated gas to dissipate before working. Keep all sources of ignition away.
- Water: Shut off the cold water supply to the heater. Open a hot water faucet upstairs to relieve system pressure and prevent siphoning.
- Lifting: Water heaters are heavy (120–200 pounds when empty). Use an appliance dolly or get a helper. Straining your back is not worth saving on delivery fees.
- Ventilation: For gas heaters in enclosed spaces, ensure adequate combustion air is available per manufacturer specifications and local codes.
Step-by-Step Replacement: Electric Water Heater
Removing the Old Unit
- Turn off power at the breaker and verify with a voltage tester.
- Shut off the cold water supply valve (typically located above the heater on the cold inlet pipe).
- Open a hot water faucet on the top floor to relieve pressure in the system.
- Connect a garden hose to the drain valve at the bottom of the old water heater. Run the hose to a floor drain, sump pit, or outside.
- Open the drain valve and open the T&P relief valve (lift the lever or open the valve) to allow air in, speeding drainage significantly.
- Once fully drained, remove the access panels and disconnect the electrical wiring. Take a photo before disconnecting for reference.
- Disconnect the cold water supply line and hot water outlet line using pipe wrenches. Use a second wrench to hold the fitting stationary to avoid twisting the pipe.
- Remove the old unit using an appliance dolly. Be careful — even drained, residual water will spill.
Installing the New Unit
- Position the new water heater in the drain pan (if required). Ensure it is level and stable using shims if needed.
- Install dielectric unions or flexible supply lines on the cold inlet (usually blue or marked with a blue ring) and hot outlet (usually red or marked with a red ring). Use Teflon tape on threaded connections — wrap in the direction of the threads.
- Install the T&P relief valve (if not pre-installed). Connect a discharge pipe that terminates 6 inches maximum above the floor. The pipe must be unthreaded at the discharge end.
- Install the expansion tank on the cold water supply line per manufacturer specifications.
- Install seismic straps if required — two straps, one in the top third and one in the bottom third of the tank.
- Connect the electrical wiring following your reference photo and the manufacturer’s wiring diagram. Use properly sized wire nuts and ensure all connections are tight. Replace access panels.
- Close the drain valve. Open the cold water supply valve slowly. Open a hot water faucet to let air escape as the tank fills.
- Once water flows steadily from the hot water faucet (no sputtering), close the faucet. Check for leaks at all connections.
- Turn power back on at the breaker. Wait 30–60 minutes for the water to heat before testing.
Step-by-Step Replacement: Gas Water Heater
The removal process for a gas water heater follows the same water-side steps as electric, with these additional considerations:
- Turn the gas valve to OFF and disconnect the gas line at the union. Always use a backup wrench on the fitting to avoid twisting the gas pipe.
- Disconnect the vent pipe at the draft hood. The new heater must be vented according to the manufacturer’s instructions — typically with the correct diameter single-wall or double-wall vent pipe.
- When installing, use new gas line fittings with gas-rated pipe thread compound. Do not use Teflon tape, which can shred and clog gas orifices.
- Install the vent connector with a minimum 1/4-inch per foot upward slope. Ensure the vent is properly supported and connected to an approved chimney or vent system.
- Light the pilot according to the manufacturer’s instructions — most modern units have electronic ignition or a piezo igniter.
- Test for gas leaks with soapy water applied to all connections. Bubbles indicate a leak that must be fixed immediately.
Gas water heater installation is subject to stricter code requirements regarding combustion air, venting, and seismic strapping. If you are unsure about any aspect, consult a licensed plumber or gas fitter.
Seismic Strapping
Most building codes require water heaters to be secured against earthquake movement. Use two 3/4-inch or wider metal straps with expansion bolts into studs. Straps should be placed within the top third and bottom third of the tank height. The straps must not interfere with access panels, gas connections, or the vent system. In an earthquake, an unsecured water heater can shift, break gas or water lines, and cause fires or flooding.
Temperature and Pressure Relief Valve (T&P Valve)
The T&P valve is a critical safety device that releases pressure if the tank exceeds 150 psi or 210°F. Always install a new T&P valve with the new water heater — never reuse the old one. The discharge pipe must be made of copper, CPVC, or other approved material rated for hot water, terminate 6 inches maximum above the floor, not be threaded at the discharge end, not be connected to any other pipe, and drain by gravity only without traps or high spots.
Setting the Temperature
Set the thermostat to 120°F for normal household use. This temperature is hot enough for cleaning and bathing while reducing the risk of scalding and minimizing energy consumption. Higher settings (140°F) are sometimes recommended for dishwashers without booster heaters, but a mixing valve or tempering valve should be installed at the heater to prevent scalding at the tap. Every 10°F reduction in water temperature saves 3–5% on water heating energy costs. For more on related water heating issues, see groaning water heater: diagnosing and fixing noisy water heaters.
Maintenance After Installation
- Flush the tank annually: Connect a hose to the drain valve and drain 3–5 gallons to remove sediment buildup. Sediment reduces efficiency and can cause premature tank failure.
- Check the anode rod every 2–3 years: Replace when more than 50% corroded or when the core wire is exposed. This simple step can double a water heater’s lifespan.
- Test the T&P valve yearly: Lift the test lever briefly — water should flow freely and stop completely when released. If it drips continuously, replace the valve.
- Inspect for leaks: Check all connections, the tank base, and the T&P valve discharge pipe every few months.
For more information on proper water heater care, including how to properly drain and flush your system, see dumping a hot water tank: complete guide to safe water heater draining.
Permits and Inspections
Many municipalities require a permit for water heater replacement. The permit fee is typically $50 to $150 and ensures the installation meets current codes, including seismic strapping, expansion tanks, and proper venting. Some areas also require a final inspection by a building official. Check with your local building department before starting the job. Even if not required by your jurisdiction, following code standards protects your safety and ensures your homeowner’s insurance coverage remains valid in the event of a water damage claim.
Replacing a water heater is a rewarding DIY project that saves hundreds of dollars in labor costs. Take your time, follow safety procedures, and consult a professional if you encounter any unexpected complications. For additional plumbing-related guidance, see our guide on water heater expansion tanks, which covers an increasingly important component of modern water heater installations and code requirements.
