How to Replace a Water Heater
Updated February 20, 2026
Replace a tank-style water heater from start to finish -- drain, disconnect, swap the unit, reconnect plumbing and gas or electric, and test for leaks and proper operation.
Overview
This is one of the more complex DIY plumbing projects, but experienced homeowners can handle it. Tank water heaters last 8-12 years. Signs it is time: rust-colored water from the hot side only, visible corrosion on the tank, water pooling underneath, or the unit just not keeping up despite troubleshooting. The job involves draining the old tank (40-80 gallons), disconnecting plumbing and power, hauling out 100-150 pounds of empty tank, positioning the new unit, reconnecting everything, and testing. This guide covers both gas and electric. Tankless is a different animal and generally best left to a pro.
What You'll Need
Safety First
- Gas heater: gas supply valve off before you touch any gas lines. After reconnecting, test every joint with soapy water. Bubbles mean a leak. Do not use the heater until all connections are confirmed leak-free. Gas leaks mean explosion and carbon monoxide risk.
- Electric heater: breaker off before disconnecting any wiring. Verify with a non-contact voltage tester. These units run on 240 volts -- contact with live wires can be fatal.
- A full tank weighs 400-600+ pounds. It must be completely drained before moving. Even empty, 100-150 pounds. Hand truck or dolly and a helper.
- The T&P relief valve and discharge pipe are critical safety components. Discharge pipe must route to within 6 inches of the floor. Never cap, plug, or remove the T&P valve -- it prevents the tank from exploding if temperature or pressure exceeds safe limits.
Step-by-Step Instructions
-
Turn Off the Power Source and Water Supply
Gas: gas control knob to OFF, then close the gas shut-off valve on the supply line. Electric: breaker off at the panel. Then close the cold water supply valve at the top of the heater (or the main if there is no dedicated valve). Open a hot faucet nearby to release pressure and let air in, which speeds draining.
Tip: Label the breaker if it is not already -- you will be toggling it multiple times. Gas units: know the difference between the gas control knob (thermostat dial on the heater) and the gas shut-off valve (on the supply pipe). Both must be off. -
Drain the Old Water Heater
Garden hose on the drain valve at the bottom. Route to a floor drain, outside, or buckets. Open the valve (round knob or flathead slot). It drains by gravity but slow if only one faucet is open for air. Open more hot faucets to speed it up. A 50-gallon tank takes 20-40 minutes. Water will be hot -- route carefully, keep kids and pets away. Close the valve once empty.
Tip: Drain valve clogged with sediment? Open and close it a few times quickly to knock the blockage loose. Still stuck? Remove the valve entirely with a wrench and let it flow through the open fitting. Towels and a big bucket ready -- the initial flow will be heavy. -
Disconnect the Plumbing and Power Connections
Disconnect the hot and cold water pipes from the top. Flex connectors: unscrew with a wrench. Hard-piped (soldered copper or threaded): cut with a pipe cutter, leave enough length to reconnect. Disconnect the T&P discharge pipe. Gas: disconnect the gas line at the union or flex connector. Electric: remove the cover plate, verify power is dead with a tester, disconnect wires (photo first for reference), and remove the conduit.
Warning: Gas lines: do not force old threaded connections. Galvanized steel that is corroded can crack if you muscle it. Two wrenches (hold the pipe, turn the fitting) and penetrating oil on stubborn threads. -
Remove the Old Unit and Position the New One
Hand truck or dolly to move the empty tank -- still 100-150 pounds. Watch doorways and stairs. Position the new heater in the same location, on the same platform (gas heaters in garages must be elevated 18 inches in most codes). Level the tank (shims if the floor is uneven). Verify the water connections and power source align with your existing plumbing and gas or electric.
Tip: Measure the space before buying -- height, width, depth. Also measure every doorway between the installation spot and the outside. Common mistake: buying a bigger tank that will not fit through the door. -
Connect the Plumbing
Connect cold inlet (typically right, marked on top) and hot outlet (typically left). Use dielectric unions or nipples if transitioning between copper pipe and steel tank fittings -- prevents galvanic corrosion. Easiest method: flexible water heater connectors ($10-15 each, braided stainless steel). Or hard-pipe with copper and SharkBite or solder. Install the T&P valve (if not pre-installed) and attach the discharge pipe, routed to within 6 inches of the floor. Turn on cold water, fill the tank. Open a hot faucet -- when water flows steady with no air sputtering, the tank is full.
Tip: Flex connectors are strongly recommended over hard piping. They absorb vibration, handle slight misalignment, and make the next replacement much easier. $10-15 each and they save real time versus cutting and soldering. -
Connect the Power Source and Test
Gas: reconnect the supply line with a flex connector (if code allows) or rigid pipe with gas-rated Teflon tape on all threads. Open the gas valve and test every connection with soapy water -- bubbles mean a leak that must be fixed before you proceed. Light the pilot per the manufacturer's instructions, set thermostat to 120 degrees. Electric: reconnect wiring to match your photo from step 3, replace the cover plate, flip the breaker. Wait 1-2 hours for a full tank to heat. Check all plumbing connections for leaks. Test the T&P valve -- lift the lever briefly, water should discharge and stop when you release.
Tip: Do not turn on the power until the tank is completely full. Running a burner or element on an empty tank damages the tank and heating elements. Fill first, power second, always.
Pro Tips
- Match fuel type and capacity to your household. 40-gallon for 1-2 people, 50 for 3-4, 75+ for 5+. Switching fuel types (gas to electric or vice versa) means running new utility lines -- that is a major additional project.
- Consider high-efficiency. Standard gas heaters run about 0.60 EF. High-efficiency (0.67+) and ultra-high with power venting (0.80+) cost more upfront but save $100-200 per year. Payback in 3-5 years.
- Earthquake straps ($15-25) even outside earthquake zones. They prevent tipping, which can break gas and water connections. Many codes require them regardless of seismic zone.
- Drain pan ($15-30) under the new heater with a line routed to a floor drain. If the tank ever develops a slow leak, the pan catches it. Code-required in many areas when installed in living space or above finished rooms.
- Thermostat to 120 degrees, not higher. Adequate for all household needs, reduces scalding risk, and cuts energy costs. Every 10-degree drop saves 3-5%. Factory default on many heaters is 140 -- unnecessarily high.
When to Call a Pro
Call a plumber if you are not comfortable with gas lines (gas leaks are extremely dangerous), if the job needs new gas pipe or electrical wiring, if you are switching fuel types, if the venting needs modification, if the space is too tight for safe heavy lifting and connections, or if your local code requires a permit and inspection (many do).