How to Install a Water Heater in 2027

To install a water heater, shut off the water, gas or power, then drain the old tank. Set the new tank level, connect the water and fuel lines, vent it if it burns gas, and fill the tank before you turn anything on. A like for like swap takes a morning and about $850 to $1,300 in parts.

There was a rust colored puddle under the tank on Tuesday morning, and the pilot had gone out twice that week. The tank was eleven years old, and it had stopped pretending it would last another winter.

A plumber would charge about $1,850 for the swap, and the same 50 gallon gas tank sat on a shelf at the home center for $829. A like for like tank swap is one of the few plumbing jobs a careful homeowner can finish in a day. It is also one of the few where a single skipped step can flood a basement or fill a house with gas.

This guide walks the middle line. You get every step, the real costs for both paths, the permit and code rules, and a clear list of the moments to stop and call a pro. I would not touch a gas line that needs moving, and neither should you.

Do it yourself or call a plumber

A like for like swap is a moderate job, not a beginner job. A pro crew finishes in 2 to 4 hours.

Plan a full morning, 4 to 6 hours, for your first one, and keep the whole day free in case a fitting fights back.

Most people who install a water heater themselves already own a pipe wrench and have soldered a copper joint or two. If you have never touched plumbing or wiring, this is a big first job, and a pro is the better call.

The skills that matter most when you install a water heater are pipe fitting, soldering and patience, not speed.

Stop and call a pro if Why
The gas line needs moving or a new gas line is needed Gas pipe work needs a licensed pro in most places
A new 240 volt circuit is needed New circuits need a licensed electrician and a permit
The vent has to move or the flue is damaged Bad venting causes carbon monoxide poisoning
The tank sits in an attic or above living space A leak there floods the house, so the pan and piping must be perfect
The permit office says the work needs a licensed pro Some cities require a license for any water heater swap
You smell gas at any point Leave the house and call the gas company

A tank usually lasts 8 to 12 years, so a swap is a once a decade job for most homes. Our guide to how long a water heater lasts helps you judge whether yours is near the end.

If the swap turns into a fuel change, a new vent run or a panel upgrade, the job stops being a swap. That is the point to get quotes instead of pushing on, and our guide to install a tankless water heater shows what a bigger switch really involves.

What the job costs either way

If you install a water heater yourself, the parts bill is the whole bill. The unit is most of it, and the parts below are priced from Home Depot listings checked on 26 November 2026.

Part Price
50 gal gas tank $709 to $1,079
Expansion tank $34 to $60
Drain pan $12 to $41
Relief valve $15 to $24
Heat trap nipple $13
Water connectors, gas flex line, tape and fittings $50 to $80 allowance
Do it yourself total About $850 to $1,300
Pro installed, same job $1,200 to $2,550

The pro price comes from Roof and Yard, which lists $1,200 to $2,550 installed for a 50 gallon gas tank. Angi reports an average tank swap of $1,349, while Fixr reports about $1,400. Our guide to how much a new water heater costs breaks the pro quote down line by line.

The saving is the labor. This Old House puts labor for a tank swap at $300 to $800, and Angi at $150 to $450. You keep that money, but you also take on the risk, the permit and the disposal, so the saving is only real if the job goes smoothly.

The parts bill above is what you pay when you install a water heater yourself and nothing goes wrong.

A tankless swap is a different job with a different bill. The venting and gas line work can push the pro price past $3,500. Read our guide to what it costs to install a tankless water heater before you price that switch.

Permits and code rules first

A permit to install a water heater runs $25 to $300 in most cities, though Fixr reports fees up to $1,500 in some places. Most cities require one for a water heater swap, and the inspection that follows checks the vent, the expansion tank and the relief valve.

Call the building department before you buy anything. Ask whether a homeowner can pull the permit, whether gas work needs a licensed pro, and what the inspector wants to see. A job done without a required permit can void your insurance and stall a future sale.

Ask how long a permit to install a water heater takes in your city, since some offices issue it the same day and others take a week.

Rule What it means
Temperature and pressure relief valve Opens at 150 psi or 210 degrees F, with a full 3/4 inch discharge pipe running down to a safe drain
Drain pan Required where a leak could damage the house, with a drain line to an approved spot
Expansion tank Required on closed water systems, precharged to the static water pressure of 40 to 60 psi
Seismic straps Two straps, one in the upper third and one in the lower third of the tank, in seismic zones
Venting Atmospheric vents need a rise of 1/4 inch per foot on horizontal runs
Clearance At least 6 inches of clear space on all sides of the tank

These rules come from the International Residential Code and the International Plumbing Code, and your city may use a different edition or add its own rules. The local inspector has the last word, so treat this table as the usual case, not the final answer.

Pick the right tank before you buy

The most common sizing mistake is buying the tank before measuring the space where you will install a water heater. Tanks built after 2015 carry more insulation, so a new 50 gallon tank is wider and taller than the one it replaces.

Measure the height and width of the old tank, the doorway it must pass through, and the ceiling above the new spot. A tank that will not fit through the basement door turns a morning job into a return trip to the store.

Household Tank size
1 to 2 people 30 to 40 gal
3 to 4 people 40 to 50 gal
4 to 6 people 65 to 75 gal

Size by the first hour rating on the yellow label, not just gallons. That rating says how much hot water the tank can deliver in its busiest hour. A shower uses about 20 gallons, so a family of four that showers back to back needs a first hour rating near 70 gallons or more.

Gas heats faster than electric, so a gas tank can be smaller for the same household. If you are weighing a switch, read our guide to what a tankless water heater is and our guide to the best tankless water heater before you decide. That is why a gas home can install a water heater one size smaller than an electric home with the same family.

A heat pump water heater needs warm air around it and a drain for condensate, so it suits a garage better than a closet. Our guide to what size tankless water heater you need covers the flow rate maths for a tankless switch.

Tools and parts to gather

Buy or borrow everything below before you install a water heater. A mid job trip to the store with a drained tank and no hot water is the worst kind of errand.

Tool Why you need it
Pipe wrench and adjustable wrench Loosening and tightening water and gas fittings
Tubing cutter Cutting copper pipe cleanly
Screwdrivers Access panels and thermostat covers
Non contact voltage tester Proving the power is off before you touch a wire
Carpenter level Setting the tank straight
Garden hose Draining the old tank
Bucket and old towels Catching the water that always escapes
Appliance dolly and a helper Moving a tank full of sediment
Part Notes
New tank, right size and fuel Check the label for capacity, fuel and first hour rating
Two flexible water connectors Corrugated stainless steel or copper, 3/4 inch
Dielectric unions or heat trap nipples Stop rust where copper meets steel
New temperature and pressure relief valve Never reuse the old one
Discharge pipe, 3/4 inch Runs from the relief valve down to a safe drain
Expansion tank Match it to your water pressure, 40 to 60 psi
Drain pan with drain line Required where a leak could damage the house
Gas flex connector and pipe sealant Gas models only, rated for gas
Thread seal tape Wrap male threads only
Shims Level the tank on an uneven floor
Seismic straps Two, in seismic zones

Lay the parts out in the order you will use them. A tidy pile makes it easier to install a water heater without hunting for a fitting with wet hands.

Shut off the utilities and drain the old tank

A man draining a water heater with a green garden hose

  1. Turn off the cold water supply valve at the top of the tank. Open a hot water faucet somewhere in the house and let it run until the water turns cool.
  2. For a gas tank, turn the gas control knob to off and close the gas shutoff valve on the supply pipe. For an electric tank, switch off the dedicated breaker and prove it is dead with a non contact voltage tester.
  3. Attach a garden hose to the drain valve at the bottom of the tank and run it to a floor drain or outside. Open the relief valve lever to let air in so the tank drains faster.
  4. Wait until the flow stops. A 50 gallon tank can take half an hour or more to drain, longer if sediment clogs the valve.

Our guide to how to drain a water heater covers this step on its own, with the sediment tricks that help a slow valve. Draining is the slowest part of the job when you install a water heater, so start it early and let it run while you lay out the new parts.

Let the water cool before you drain it. A tank full of 140 degree water can scald in seconds, so run the hot faucet until the water turns cool first.

Lift the old tank out of the way

Take a photo of the old connections before you touch a fitting. The photo shows exactly how the old tank was piped, and it is the cheapest insurance on the whole job when you install a water heater in its place.

  1. Disconnect the water lines at the top of the tank. Unscrew flexible connectors with two wrenches, or cut soldered copper pipe a few inches above the fittings.
  2. For a gas tank, loosen the gas union with two wrenches and cap the open gas line at once with a black iron cap and sealant rated for gas. For an electric tank, remove the access panel and disconnect the wires, capping each one with a wire nut.
  3. Remove the vent pipe from the draft hood and the discharge pipe from the relief valve. Keep the discharge pipe if it is in good shape, since the new tank can reuse it.
  4. Tip the tank onto an appliance dolly with a helper and wheel it out. An old tank full of sediment weighs far more than a new one, so do not try this alone.

Most scrap yards take old tanks for free, and some cities collect them with bulk trash. Check the local rules before you leave it at the curb, since a tank counts as scrap metal in most places.

An old tank is the heaviest part of the day, and it is the step most people skip when they picture how to install a water heater in their heads.

Set the new tank level and steady

Clean the floor where the old tank stood and set the drain pan down first. Stand the new tank in the pan and check it with a level, slipping plastic shims under the base until it sits straight.

Point the thermostat and access panels toward the room so you can reach them later. Keep at least 6 inches of clear space on all sides, and check the manual for the exact clearances your model needs.

In seismic zones, strap the tank with two straps, one in the upper third and one in the lower third, anchored to wall studs. A full 50 gallon tank holds about 415 pounds of water alone, plus the steel, so a strap that only grips drywall will not hold it.

Connect the water lines

Gloved hands using a pipe wrench to install a water heater

Thread the dielectric unions or heat trap nipples onto the cold inlet and the hot outlet on top of the tank. Wrap the male threads with seal tape first, three or four turns, and tighten with a wrench without forcing them.

The blue coded fitting goes on the cold inlet with the arrow pointing into the tank. The red fitting goes on the hot outlet with the arrow pointing away from the tank. A fitting put in backwards blocks the water flow, so check the arrows twice.

Connect the flexible water lines from the house pipes to the fittings on the tank. Tighten them snug with a wrench, then give each joint a firm tug to check it holds.

Screw the new relief valve into its port on the tank or on the hot side, and point it down. Never reuse the relief valve from the old tank, since a valve that has sat for years may not open when it must.

Run the discharge pipe from the relief valve down to a safe drain, keeping the full 3/4 inch size all the way. The pipe must end within 6 inches above the drain, and it must never have a valve or a trap in it.

Hook up the gas line

A gas water heater with a power vent in a basement

This is the step where most people who install a water heater for the first time slow down, and that is the right instinct. Gas mistakes do not leak water on the floor. They fill a house with gas.

Fit the sediment trap first, a short capped pipe below the gas connection that catches dirt and moisture before it reaches the control valve. Then connect the flexible gas line from the trap to the gas control valve on the tank.

Turn the gas back on and brush soapy water over every joint. Bubbles mean a leak, so tighten the joint and test it again. If bubbles keep coming, turn the gas off and call a pro.

If the gas line itself needs moving, a bigger pipe, or a new shutoff valve, stop here. That work belongs to a licensed pro, and most cities require a gas permit for it.

Wire the electric tank

The open wiring compartment of an electric water heater

Check the breaker first. An electric tank needs its own dedicated 30 amp, 240 volt circuit, wired with 10 AWG cable. If the old tank ran on a shared circuit or the wires look scorched, stop and call an electrician.

Connect the two hot wires to the upper thermostat terminals and the ground wire to the green ground screw, following the wiring diagram on the tank. Tighten each terminal firmly and replace the access plate.

Do not turn the breaker on yet. An electric tank with no water in it burns out its heating elements in seconds, and that mistake costs a new set of elements before the first shower.

Vent a gas tank so it drafts right

A draft hood and metal flue pipe on top of a water heater

Set the draft hood on the flue collar at the top of the tank. Connect the vent pipe with a steady rise of 1/4 inch per foot on any horizontal run, so hot exhaust flows up and out instead of spilling into the room.

Seal the joints with high temperature foil tape, not duct tape. A vent that leaks or slopes the wrong way can send carbon monoxide back into the house, so this step deserves the same care as the gas line.

Light the pilot following the instructions on the tank, then hold a match or a strip of tissue near the draft hood. The flame or the tissue should pull inward toward the vent. If it blows outward, the vent is not drafting, so turn the gas off and call a pro.

Power vent and direct vent tanks use a fan and plastic pipe instead of a metal flue, so follow the manual for those models. The venting in this section covers the common atmospheric vent tank found in most homes.

Fill it, check for leaks, then turn it on

  1. Close the drain valve and open the cold water supply valve. Open the highest hot water faucet in the house. Let it run until the water flows steady with no sputtering, which means the tank is full and the air is out.
  2. Close the faucet and check every new joint with a dry hand or a paper towel. Tighten any joint that weeps, and recheck it after ten minutes under pressure.
  3. For a gas tank, light the pilot and set the thermostat to 120 degrees F. For an electric tank, switch the breaker on and set both thermostats to 120 degrees F.
  4. Wait about an hour, then run the hot water at a faucet and check the temperature with a cooking thermometer. The water should read near 120 degrees F at the tap.
  5. Lift the relief valve lever for a second and let it snap shut. Water should discharge and stop, which proves the valve opens and reseals.

Set the temperature to 120 degrees F and leave it there. The Consumer Product Safety Commission urges every household to set water heaters to 120 degrees F. Water at 140 degrees F burns skin in about six seconds, while water at 120 degrees F takes about five minutes.

A tank takes about an hour to heat a full load of cold water, longer for a big tank or a cold basement. If the water is still cold after two hours, check the troubleshooting table below before you take anything apart. Stay near the tank for the first hour after you install a water heater, and check every joint twice while the water heats.

The first day with the new tank

Symptom Likely cause What to do
No hot water, electric Breaker tripped or element burned out Check the breaker, then check the elements with a meter
No hot water, gas Pilot out or gas valve off Relight the pilot following the tank instructions
Pilot will not stay lit Worn thermocouple Replace the thermocouple
Water at a fitting Loose joint Tighten the joint and recheck it after ten minutes
Rumbling or popping Sediment in the tank Flush the tank to clear the sediment
Rotten egg smell Spent anode rod Replace the rod and flush the tank with peroxide

Sediment builds up fastest in hard water areas, so read our guide to how often to drain a water heater and put the flush on the calendar.

If the new unit is a tankless model that throws an error code, our guide to how to reset a tankless water heater covers the common codes.

Mistakes that cost people the most

  1. The most expensive mistake when you install a water heater is turning on an electric tank before it is full. Dry elements burn out in seconds, so fill the tank and purge the air first, every time.
  2. Reusing the old relief valve is the second. A valve that has sat for a decade may stick shut, and a stuck valve turns a tank into a pressure vessel with no escape.
  3. Skipping the expansion tank is the third. On a closed water system, heated water has nowhere to expand, so pressure spikes wear out the tank and the relief valve drips.
  4. Venting a gas tank with a flat or downhill run is the fourth. Exhaust must rise, so any horizontal vent needs a rise of 1/4 inch per foot.
  5. Skipping the permit is the fifth. An unpermitted install can void insurance and stall a home sale, and the inspector is the person who catches a bad vent before it hurts anyone.

Our guide to how a water heater works shows the parts inside the tank, so the mistakes above make more sense once you see what each part does.

If the old tank died of old age, our guide on when to replace a water heater helps you spot the next one before it floods the basement.

Related guides

Frequently Asked Questions

How long does the swap take?

A pro crew finishes a like for like tank swap in 2 to 4 hours. Plan a full morning, 4 to 6 hours, for your first one. Keep the day free in case a fitting fights back or the old tank is full of sediment.

Do I need a permit for a water heater swap?

Yes, in most cities, and always when gas is involved. Permit fees run $25 to $300 in most places, and the inspection checks the vent, the expansion tank and the relief valve.

How much does a do it yourself install cost?

About $850 to $1,300 in parts for a 50 gallon gas tank, based on Home Depot prices from November 2026. A pro charges $1,200 to $2,550 installed for the same job, so the saving is the $300 to $800 of labor.

Do I need a plumber for this job?

Not always. A like for like swap is a job many homeowners finish themselves, but gas line changes, new circuits, vent moves and permit rules often need a licensed pro. When in doubt, get a quote and compare it with the parts bill above.

What size water heater do I need?

A family of four usually needs a 40 to 50 gallon tank, and a family of six needs 65 to 75 gallons. Size by the first hour rating on the yellow label, which says how much hot water the tank can deliver in its busiest hour.

Can I install a water heater myself?

Yes, if the swap is like for like and you are comfortable with basic plumbing. To install a water heater safely, let a licensed pro handle any gas line change or any new 240 volt circuit, and keep the permit and inspection in the plan.

Sources: US Consumer Product Safety Commission Publication 5098 on tap water scalds. US Department of Energy water heating guidance. SupplyHouse water heater installation guide, July 2025.

Home Depot electric water heater installation guide, May 2025. EngineerFix water heater installation guide. Roof and Yard water heater replacement cost guide, November 2026.

Angi, HomeGuide and Fixr water heater cost guides. Every figure above comes from a source named in this article, and all were checked in November 2026.

The main sources for this article are the CPSC tap water scalds guide and the SupplyHouse installation guide.

The other sources are the Home Depot electric water heater guide and the Roof and Yard replacement cost guide.

Safety note: gas and 240 volt electrical work can cause fire, shock or carbon monoxide poisoning. If anything in this guide makes you uneasy, do not install a water heater on your own. A licensed plumber finishes this job in a morning, and the quote costs less than a flooded basement.

If you smell gas, leave the house at once and call the gas company from outside. Never change a gas line yourself, and never use a flame to find a leak.

Leave a Comment