Replacing a water heater sits right on the line between “weekend DIY” and “call a professional.” As a licensed plumber, here’s the honest version: swapping a like-for-like electric water heater is within reach for a confident DIYer, while gas units add real complications — combustion air, venting, gas connections, and carbon-monoxide risk — that send most homeowners (rightly) to a pro. This guide walks the full process so you understand what’s involved, then tells you plainly where the line is.
Should you replace it yourself? An honest gut-check
Be honest about three things first: the fuel type, your local code, and your comfort with the riskiest step.
| Factor | Electric | Gas |
|---|---|---|
| Hardest part | 240V wiring connection | Gas line + venting / combustion air |
| Carbon-monoxide risk | None | Yes — bad venting can be deadly |
| Typical DIY time | 3–5 hours | 4–7 hours (if at all) |
| Permit usually required? | Often | Almost always |
| Honest take | Doable if you’re handy | Usually a pro job |
Most areas require a permit to replace a water heater — it forces an inspection of the venting, the temperature-and-pressure (T&P) relief valve, and seismic strapping where it applies. Skip it and an inspector can flag it at resale. When in doubt, know where the DIY line is.
Tools and materials you’ll need
- The new heater — match capacity and fuel type, or rethink the setup with our water heater picks (or weigh tank vs. tankless)
- A pipe/tubing cutter, and for PEX a crimp tool
- Two pipe wrenches or channel-locks, an adjustable wrench, and a garden hose
- Two flexible water-heater connectors, thread sealant tape, and a new T&P valve + discharge tube
- For gas: a flex gas connector (where code allows), leak-detector solution, and a way to confirm draft
- An expansion tank if your home is a closed system (a pressure-reducing valve or check valve on the main)
Step-by-step: replacing a tank water heater
1. Shut everything off
Electric: switch off the breaker feeding the heater. Gas: turn the gas control to “off” and close the gas shut-off. Then close the cold-water shut-off above the heater. Not sure the heater is even the problem? Start with our no-hot-water troubleshooting guide — you may not need a replacement.
2. Drain the old tank
Connect a garden hose to the drain valve at the base and run it lower than the tank. Open a hot-water faucet to break the vacuum, then open the drain valve. A full 50-gallon tank takes 20–30 minutes to empty. The water is hot — let it cool first if you can.
3. Disconnect the connections
Disconnect the hot and cold water lines up top. For gas, disconnect the gas line at the union and detach the vent (flue) hat. For electric, remove the access cover, confirm power is off with a tester, and disconnect the wiring — note which wire goes where.
4. Remove the old heater and set the new one
Old tanks are heavy and sloshy — get a helper or a hand truck. Position the new heater so the connections line up, confirm it’s level, and reattach any seismic strapping required in your area.
5. Connect the water lines
Install the new flexible connectors (or solder/PEX rigid lines) to the correct hot and cold ports — they’re marked. Wrap threaded fittings with sealant tape and don’t overtighten.
6. Install the T&P valve and expansion tank
Thread in the new temperature-and-pressure relief valve and run its discharge tube to within 6 inches of the floor. Never cap or plug this valve — it’s the one thing between a failed thermostat and a ruptured tank. Add the expansion tank on the cold side if your system is closed.
7. Refill and check for leaks
Close the drain valve, open the cold-water supply, and open a hot faucet upstairs. When water runs steady with no sputtering air, the tank is full. Walk every connection for drips before you energize anything.
8. Restore power or gas — carefully
Electric: only after the tank is completely full (dry elements burn out in seconds), restore the breaker. Gas: open the gas valve, check every joint with leak-detector solution, relight per the manufacturer’s instructions, and — critically — do a draft test at the vent hood to confirm exhaust goes up the flue, not into your home.
The safety steps people skip (don’t)
- The T&P valve and discharge tube — the single most important safety device on the tank.
- Gas venting / draft test — a backdrafting flue spills carbon monoxide into the house. Can’t confidently verify draft? Stop and call a pro. Keep a working CO detector regardless.
- Set the thermostat to 120°F — safe from bacteria, cool enough to prevent scalds and trim energy loss.
- Pull the permit — gets the install inspected and keeps you clean at resale.
When to call a pro (no shame in it)
Call a licensed plumber if it’s a gas unit and you’re not 100% confident on the gas connection and draft test; the venting needs to change; you’re switching fuel types or going tankless; or local code requires a licensed installer. Rather hand it off? Our cost to replace a water heater breakdown shows what’s fair to pay, and our gas vs. electric comparison helps you decide if a change is worth it.
Frequently asked questions
How long does it take to replace a water heater?
A like-for-like electric swap typically runs 3–5 hours for a DIYer; a gas unit takes longer and is usually best left to a pro. A professional often finishes a straightforward replacement in 2–3 hours.
Do I need a permit to replace my own water heater?
In most areas, yes. The permit triggers an inspection of the venting, the T&P relief valve, and strapping. Skipping it can cause problems at resale.
Can I replace a gas water heater myself?
Technically yes, but the gas connection, venting, and carbon-monoxide draft test carry real safety risk. Most homeowners should hire a licensed plumber for gas units.
What temperature should I set my new water heater to?
120°F — the temperature health and safety groups recommend. Hot enough to be safe, cool enough to prevent scalds and reduce energy waste.
Related guides: Cost to Replace a Water Heater · Tank vs. Tankless · Gas vs. Electric · Best Water Heaters · No Hot Water? Troubleshooting
Related: make a new heater last with an annual flush — here’s how to flush a water heater.
Get the free Homeowner’s Plumbing Survival Handbook
The 12 most common plumbing problems, how to fix them yourself, and exactly when to call a pro. Enter your email and it is yours instantly.