Call Now 714-782-3420
24-Hour Plumbing Service Always On Time Nights & Weekends
Schedule Online
water heater

How to Install a Water Heater: Step-by-Step Guide

By Jerry Morrow September 18, 2026
Table of Contents

Installing a water heater means shutting off utilities, draining the old unit, positioning and securing the new one, connecting water lines, and reconnecting gas or electrical power and venting. Most areas require a permit, and connecting gas lines, electrical wiring, and venting should be done by a licensed plumber.

Replacing a water heater looks straightforward from the outside: old tank out, new tank in. In practice, it involves gas or high-voltage electrical connections, venting that has to meet specific clearances, and, in most areas, a permit and inspection before the job is considered done. Understanding the full process helps you have an informed conversation with a plumber, know what to expect on installation day, and recognize which parts of this job carry real safety and code requirements. This guide walks through what’s involved from start to finish.

Is Installing a Water Heater a DIY Job?

Parts of a water heater installation, like positioning the unit and connecting water lines, are within reach for an experienced homeowner. The gas or electrical connection, venting, and code compliance are a different matter, and in most areas these portions of the job legally require a licensed professional and a permit.

Manufacturers generally recommend professional installation to keep the warranty valid, and most local building departments require a permit and inspection for a water heater replacement, not just a new installation. Skipping that step doesn’t just risk a fine; it can also complicate a future home sale, since permitted work is something buyers and inspectors look for.

What’s Legally Required (Permits and Code)

Most jurisdictions in the United States require a plumbing or mechanical permit before installing or replacing a water heater, and an inspector verifies the work meets current code before signing off. Requirements vary by state and city, so check with your local building department for the specific rules in your area.

California is a useful example of how detailed these requirements can get. California Health and Safety Code Section 19211 requires every residential water heater to be braced, anchored, or strapped to resist movement in an earthquake, and the California Plumbing Code (Section 507.2) specifies two seismic straps, one in the upper third of the tank and one in the lower third, at least 4 inches above the controls. Most California jurisdictions require a permit covering the gas or electrical connection, venting, and this strapping, and sellers of a home are required to certify in writing that the strapping requirement has been met.

When to Hire a Licensed Plumber Instead

Hire a licensed plumber for the gas line connection, any electrical wiring or circuit work, the venting system, and pulling the required permit. These are the areas where a mistake creates the most serious risk, from a gas leak to a house fire, and where code compliance actually gets verified by an inspector.

Before You Start: What You’ll Need

Before installation day, you’ll need the right tools, a water heater sized correctly for your household, and a suitable location that meets clearance and venting requirements. Getting these right ahead of time avoids delays or a mismatched unit once the old one is already disconnected.

Tools and Materials

A typical installation involves pipe wrenches, a tubing cutter, Teflon tape or pipe joint compound, a garden hose for draining, and, for gas units, a way to test connections for leaks. The specific fittings and connectors needed depend on whether you’re matching the old plumbing configuration or making changes to it.

Choosing the Right Size Water Heater

The right tank size depends on your household’s peak hot water demand, generally estimated by the number of people and how much hot water is used at once, such as running a shower and a dishwasher at the same time. An undersized unit runs out of hot water during heavy use, while an oversized one wastes energy keeping more water hot than you need.

Choosing the Right Location

The location needs to meet the manufacturer’s clearance requirements, provide access for the venting system on gas units, and allow room for a drain pan if one is required by local code. Locations like a garage, closet, basement, or attic each come with their own code considerations, such as elevation requirements for gas units in a garage.

Step 1: Turn Off Utilities

The first step in any water heater installation is cutting off the utilities feeding the old unit, water, and either gas or electricity, before disconnecting anything. Skipping this step risks flooding, electric shock, or exposure to gas.

Shut Off the Water Supply

Close the cold water shutoff valve at the top of the tank, or the home’s main water supply if there’s no dedicated valve. Confirm the water is off by opening a nearby hot water tap and checking that flow stops.

Shut Off Gas or Electricity

For a gas unit, turn the gas supply valve to the closed position. For an electric unit, switch off the breaker at the main electrical panel, and confirm there’s no power reaching the unit with a voltage tester before disconnecting any wiring.

Step 2: Drain and Remove the Old Water Heater

Draining the old water heater means connecting a hose to its drain valve and letting the tank empty before disconnecting the water and gas or electrical lines. Let the water cool first, since a full tank holds a large volume of very hot water that can cause burns.

Once drained, the water lines can typically be disconnected using the same tools used for other household plumbing. The gas line connection should be disconnected by, or under the direct guidance of, a licensed plumber, since improperly handling a gas fitting can create a leak that isn’t obvious right away.

Step 3: Prepare the Installation Area

Preparing the installation area means confirming the space meets clearance and venting requirements and has a drain pan in place if your local code requires one. This step matters because a location that worked for the old unit doesn’t automatically meet current code for a new one.

Check Venting and Clearance Requirements

Gas units need adequate combustion air clearance and a venting path that meets current code, which can differ from what was acceptable when the old unit was installed years earlier. A licensed plumber can confirm whether your existing venting still meets code or needs to be updated as part of the installation.

Install or Inspect the Drain Pan

A drain pan underneath the tank catches minor leaks before they reach the floor and is required by code in many locations, particularly for units installed above living space. If the old unit had a pan, check that it’s still in good condition and properly connected to a drain line before reinstalling.

Step 4: Position and Secure the New Water Heater

Positioning the new water heater means setting it in place, leveling it, and securing it according to local code before making any connections. A tank that isn’t properly secured is both a safety hazard and, in many areas, a code violation.

Seismic Strapping (California Requirement)

California requires two seismic straps on tank water heaters, positioned in the upper and lower thirds of the tank, with the lower strap kept clear of the gas valve or thermostat controls. This requirement applies to replacements as well as new installations, and it’s one of the items a permit inspection specifically checks.

Step 5: Connect the Water Lines

Connecting the water lines means attaching the cold water inlet and hot water outlet to the tank, generally using flexible connectors or sweated copper fittings matching the existing plumbing. This step is water-only and doesn’t involve gas or electrical work.

Installing the Expansion Tank

An expansion tank gives heated water, which expands as it warms, somewhere to go without building excess pressure in a closed plumbing system. Many jurisdictions require one on a closed system, and it’s typically installed on the cold water inlet line near the water heater.

Connecting Hot and Cold Water Lines

Match the cold inlet and hot outlet to the correct connections on the new tank, since reversing them will cause the system to malfunction. Use new connectors rather than reusing old, worn ones, and avoid overtightening fittings, which can crack a connection rather than seal it.

Step 6: Connect the Gas Line or Electrical Wiring

Connecting the gas line or electrical wiring is the step in this project that should be handled by a licensed professional, since both involve real safety risk if done incorrectly. This is also the portion of the job a permit inspection specifically verifies.

Gas Water Heater Connections

A gas connection includes attaching the gas supply line to the unit’s gas control valve and testing the connection for leaks before the unit is put into service. A licensed plumber uses proper testing methods to confirm there’s no leak, something that isn’t reliably done by sight or smell alone.

Electric Water Heater Connections

An electric water heater typically runs on a dedicated 240-volt circuit, and the wiring connection at the unit needs to match the manufacturer’s specifications exactly. Incorrect wiring here creates a fire and shock risk, which is why this connection is licensed electrical work in most areas.

Step 7: Install the Venting System (Gas Units)

Installing the venting system means routing exhaust from the unit safely outside the home, using vent materials and a slope that meet current code. Venting mistakes are a leading cause of carbon monoxide problems with gas water heaters, which is why this step is code-regulated and inspected.

Step 8: Fill the Tank and Bleed the Lines

Filling the tank means opening the cold water supply and letting the tank fill completely before restoring gas or power. Open a hot water tap elsewhere in the house and let it run until water flows steadily, which purges trapped air from the system.

Step 9: Restore Power or Gas and Test

Restoring power or gas is the step where the installation is actually turned on and checked for proper operation. This should happen only after all connections are confirmed complete and, for gas units, tested for leaks.

Checking for Leaks

A licensed plumber checks gas connections for leaks using an approved method as a standard part of the installation, not an optional add-on. Water connections should also be checked by running the system and inspecting each joint for drips once the tank is full and pressurized.

Setting the Thermostat

Set the thermostat to the manufacturer’s recommended temperature, generally around 120°F, which balances a comfortable hot water supply against scalding risk and unnecessary energy use. Allow time for the tank to reach full temperature before judging whether it’s working correctly.

Step 10: Final Safety Checks

Final safety checks confirm there are no leaks, the venting is drawing properly on gas units, the unit is securely strapped or supported, and the area around the water heater is clear. This is also the point where a permit inspection, if required, takes place before the installation is considered complete.

How Long Does Water Heater Installation Take?

A straightforward tank replacement typically takes 2 to 6 hours, while a more involved job, such as switching from a tank to a tankless system or requiring venting or electrical upgrades, can take significantly longer. The time required depends heavily on whether the new unit is a like-for-like replacement or involves changes to the existing setup.

How Much Does Professional Installation Cost?

A professional tank water heater installation typically costs $600 to $2,500 including the unit and labor, while a tankless water heater installation generally runs $1,400 to $3,900 due to the added labor and any venting or electrical changes required. Permit fees are usually separate and often run $50 to $400 depending on the jurisdiction.

These figures typically cover the unit, standard installation labor, and basic fittings. They usually don’t include electrical panel upgrades, extensive venting changes, or code-required updates like an expansion tank if your existing system doesn’t already have one, which would be quoted separately once the installer sees your specific setup.

Common Mistakes to Avoid When Installing a Water Heater

The most common installation mistakes are skipping the permit, using the wrong venting for the unit type, omitting a required expansion tank, and undersizing or oversizing the tank for the household’s actual hot water use. Each of these can cause problems ranging from code violations to ongoing performance issues.

Overtightened water line connections are another frequent issue, since forcing a fitting too far can crack it rather than create a better seal. Reversing the hot and cold water connections is a simpler mistake but one that makes the whole system perform incorrectly until it’s caught and corrected.

Frequently Asked Questions

Do I need a permit to install a water heater in California?

Yes, most California jurisdictions require a plumbing or mechanical permit for both new water heater installations and replacements, covering the gas or electrical connection, venting, and seismic strapping. Contact your local building department to confirm the specific permit process and fees in your city or county.

Can I install a tankless water heater myself?

Tankless units typically require higher gas line capacity or a dedicated electrical circuit than a standard tank, along with specific venting, which puts most of the installation into licensed-professional territory. Manufacturers also generally require professional installation to keep the warranty valid, so a self-installed tankless unit may not be covered if something goes wrong.

What happens if a water heater is installed incorrectly?

An incorrectly installed water heater can lead to gas leaks, carbon monoxide exposure, electrical hazards, water damage from leaks, or a unit that fails an inspection at the time of a home sale. Some of these risks aren’t obvious immediately, which is part of why permitted, inspected installation exists as a safety check.

Get Professional Water Heater Installation

If you’re replacing a water heater, Anaheim Plumbing can handle the gas or electrical connection, venting, and permit so the job meets current code from the start.

Jerry Morrow

Jerry Morrow started Anaheim Plumbing back in 2006, bringing with him years of hands-on experience from the trade. His goal was straightforward: give homeowners a plumber they could actually trust, with upfront pricing, clear communication, and work done right the first time. These days, Jerry oversees the team's projects across Anaheim and the surrounding areas, from routine repairs and drain cleaning to full water heater installs and repiping jobs.