24/7 Nationwide Plumbing Service — Enter your ZIP code to get a local plumber's phone number

How to Replace a Water Heater – Step-by-Step Guide

By MyTownPlumber Editorial Team · Updated 2026-09-14

If your water heater is leaking, making noise, or not producing enough hot water, you may be wondering how to replace a water heater. The process involves draining the tank, disconnecting utilities, removing the old unit, installing the new one, and reconnecting everything safely. This complete guide walks you through each step, highlights safety precautions, and provides typical cost estimates to help you decide whether to tackle the job yourself or call a professional.

When Should You Replace a Water Heater?

Most water heaters last 8–12 years. If yours is older, frequently needs water heater repair, shows rust in the water, or develops leaks, replacement is often more cost-effective than continued repairs. Other signs include unusual noises (popping or rumbling), insufficient hot water, or a pilot light that won't stay lit on gas models.

Step-by-Step Water Heater Replacement Process

1. Gather Tools and Materials

Before starting, assemble the following tools and safety gear:

  • Adjustable wrench, pipe wrench, and screwdrivers
  • Garden hose for draining
  • Bucket or shop vacuum
  • Pipe dope or Teflon tape
  • Safety glasses and gloves
  • New water heater (same size and fuel type)
  • Flexible supply lines, fittings, and a drain pan (if required by local code)
  • Gas-rated pipe joint compound (for gas models)

2. Turn Off Power/Gas and Water Supply

For electric heaters, shut off the breaker at the panel. For gas heaters, turn the gas valve to “off” and extinguish the pilot light. Close the cold water shut-off valve above the heater.

3. Drain the Tank

Attach a garden hose to the drain valve at the bottom of the tank and route it to a floor drain or outside. Open the drain valve and a hot water faucet upstairs to allow air in. Let the tank empty completely.

4. Disconnect Utilities

Disconnect the cold and hot water lines from the top of the tank. For electric heaters, remove the access panel and disconnect the wires (note their positions). For gas heaters, disconnect the gas line using two wrenches to avoid twisting the pipe.

5. Remove the Old Water Heater

Once disconnected, carefully move the old heater out of the way. If it's heavy, use a dolly or ask for help. Dispose of it according to local regulations (many scrap yards accept steel tanks).

6. Position the New Water Heater

Place the new heater on a level, solid surface. If required by code, install a drip pan and connect a drain line. For gas heaters, ensure proper combustion air clearance from walls.

7. Connect Water Lines

Attach the cold water supply line to the blue or marked inlet and the hot water line to the red or unmarked outlet. Use Teflon tape or pipe dope on threaded connections. Install a temperature and pressure relief (T&P) valve if not pre-installed, and run a discharge pipe to within 6 inches of the floor.

8. Connect Power/Gas

For electric: reconnect the wires (black to black, white to white, ground to ground) and replace the access panel. For gas: reconnect the gas line, apply gas-rated pipe compound, and tighten. Use a soapy water solution to check for leaks at all gas connections.

9. Fill and Test

Open the cold water supply valve and a hot water faucet to let air escape. Once water flows steadily from the faucet, close it. Check for leaks at all connections. For electric heaters, turn on the breaker; for gas, relight the pilot according to the manufacturer's instructions. Set the thermostat to 120°F (49°C) for safety and energy savings, as recommended by the U.S. Department of Energy.

Typical Costs of Water Heater Replacement

Prices vary by region, fuel type, and labor rates. The table below shows typical U.S. ranges:

ComponentTypical Cost Range
Standard electric tank (40–50 gal)$800 – $1,500
Standard gas tank (40–50 gal)$1,000 – $2,500
High-efficiency tank (electric or gas)$1,200 – $3,000
Tankless water heater (gas)$1,500 – $3,500
Labor (professional installation)$400 – $800
Permit fees$50 – $200

These estimates assume a straightforward replacement. Additional costs may arise for drain cleaning if sediment has accumulated in your pipes, or leak detection if hidden damage is found.

Safety and Code Requirements

Water heater installation must comply with local plumbing and building codes. The International Association of Plumbing and Mechanical Officials (IAPMO) publishes the Uniform Plumbing Code, which many jurisdictions adopt. Key requirements include proper T&P valve discharge, seismic strapping in earthquake-prone areas, and gas venting clearances. Installing a water softener can extend the life of your new heater by reducing scale buildup, as noted by the EPA WaterSense program.

Frequently Asked Questions

How long does it take to replace a water heater?

A professional replacement typically takes 2–4 hours. DIY may take a full day, especially if you encounter complications like rusted connections or code issues.

Do I need a permit to replace a water heater?

Most U.S. municipalities require a permit for water heater replacement. Check with your local building department. Failure to obtain a permit can lead to fines or problems when selling your home.

Can I replace a gas water heater myself?

Yes, but gas work carries risks of fire, explosion, and carbon monoxide poisoning. If you are not experienced with gas lines, hiring a licensed professional is strongly recommended.

What size water heater do I need?

For a typical 2–3 person household, a 40–50 gallon tank is sufficient. Use the “first hour rating” (FHR) on the Energy Guide label to match your peak demand.

Should I replace my water heater with a tankless model?

Tankless heaters are more energy-efficient and last longer, but have higher upfront costs and may require upgrading gas lines or electrical service. They work best for households with moderate hot water demand.

Why is my new water heater leaking?

Leaks often occur at loose connections, a faulty T&P valve, or a cracked drain valve. Tighten fittings or replace the valve. If the tank itself leaks, it may be defective — contact the manufacturer.

Replacing a water heater is a significant home maintenance task. If you prefer professional help, our team at MyTownPlumber is ready to assist. Contact us for a free estimate and let our licensed plumbers handle the job safely and efficiently.

Sponsored

Partner Offer

Looking for more options? See today's home-service offers from our advertising partners.

View Sponsored Offer

Advertisement. We may earn a commission if you take up a partner offer. This is not a quote or service provided by this site.