Installing a new hot water system is a major home project that provides your home with comfortable, reliable hot water. While this job is complex, a homeowner with the right skills and tools can often handle the job. This detailed guide shows you exactly how to install a water heater with safety and code in mind.
You can install a new hot water heater by first draining and disconnecting the old unit, preparing the plumbing and electrical or gas lines, setting the new unit in place, and carefully connecting all lines before filling and testing the tank. Always check local building codes and secure the proper permits before starting any installation for a water heater.
What is a Water Heater?

A water heater is a home appliance that heats and stores water for everyday use. It is a vital part of your home’s plumbing for water heater system. The most common types are tank-style, which store and constantly heat a large volume of water. Tankless units heat water on demand without a storage tank.
The job of a water heater is simple: take cold water from your main supply and heat it to a set temperature. This warm water is then sent out to your faucets, showers, and appliances. Understanding this basic function is the first step before you install a new hot water heater.
Before You Begin: Safety and Preparation
Safety comes first when working with water, gas, and electricity. One mistake can flood your home, cause gas leaks, or create electrical hazards.
Check Local Codes: Call your city’s building department before starting. Most areas require permits for water heater installation. Codes exist to keep you safe, and inspectors will check your work. Skipping permits can void your home insurance and make selling harder later.
Turn Off Utilities: Shut off the water supply at the main valve. For gas units, close the gas valve completely. Turn off power at the breaker box for electric models. These steps prevent accidents while you work.
Drain the Old Unit: Connect a garden hose to the drain valve at the tank bottom. Run the hose outside or to a floor drain. Open the valve and let all water drain out. This takes 30-60 minutes for most tanks. A full water heater weighs 300-500 pounds, so draining is essential.
Measure Your Space: Measure height, width, and clearance around your old unit. Your new water heater must fit in the same spot. Building codes require 6 inches of clearance on all sides for ventilation and service access.
Check Venting Requirements: Gas water heaters need proper venting to prevent carbon monoxide buildup. Type B venting (double-wall metal) is standard for most installations. The vent pipe must slope upward 1/4 inch per foot to ensure proper draft.
Verify Gas Line Size: A 1/2-inch gas line works for most residential water heaters. If you’re upgrading to a larger unit, you might need a bigger line. Undersized gas lines reduce efficiency and create safety risks.
Essential Tools and Materials You’ll Need
Having the right tools makes installation faster and safer. Here’s what you’ll need:
Basic Tools:
- Pipe wrench (two of them)
- Adjustable wrench
- Screwdriver set
- Level
- Tape measure
- Tubing cutter
- Hacksaw
- Bucket and towels
- Safety glasses and gloves
Plumbing Supplies:
- Flexible water lines (two braided stainless steel hoses)
- Pipe thread sealant or Teflon tape
- Pressure relief valve
- Discharge pipe for relief valve
- Sediment trap for gas line
- Pipe fittings as needed
- Expansion tank (required in many areas)
For Gas Units:
- Gas flex connector
- Gas valve
- Black iron pipe fittings
- Venting materials (if replacing)
For Electric Units:
- Wire nuts
- Electrical tape
- Cable clamps
- Appropriate gauge wire
Most hardware stores sell water heater installation kits with common supplies. These kits cost $50-$100 and include water lines, fittings, and sealant. They save time and ensure you have compatible parts.
Step-by-Step Guide: How to Install a Water Heater
Follow these steps carefully for a safe, code-compliant installation.
Step 1: Remove the Old Water Heater
Start by disconnecting all utilities. For gas units, use two wrenches to disconnect the gas line at the union fitting. Cap the gas line immediately to prevent leaks. For electric units, remove the access panel and disconnect wires, taking photos for reference.
Disconnect the water lines at the top of the tank. Place buckets underneath to catch remaining water. If you have copper pipes, cut them 6 inches from the tank using a tubing cutter. This gives you a clean pipe to work with later.
Remove the old unit carefully. Get help lifting it since even drained tanks weigh 150-200 pounds. Wheel it out on a dolly if possible. Many retailers offer free disposal when you buy a new unit.
Step 2: Position the New Water Heater
Place your new water heater in the same location. Use a level to ensure it sits perfectly flat. An unlevel unit causes sediment buildup in one area and reduces lifespan.
For earthquake-prone areas, install seismic straps. These metal bands wrap around the tank and bolt to wall studs. Most building codes require two straps, one at the top third and one at the bottom third of the tank.
Leave adequate clearance on all sides. Gas units need 6 inches from combustible walls. Electric units need less space but should still be accessible for future maintenance.
Step 3: Install the Temperature and Pressure Relief Valve
The T&P valve is your main safety device. It opens automatically if pressure or temperature gets too high, preventing tank explosions. Never skip this step or use an old valve.
Wrap the valve threads with 3-4 turns of Teflon tape. Thread it into the opening on the tank side, usually near the top. Tighten with a wrench but don’t overtighten, which can crack the fitting.
Attach the discharge pipe to the valve outlet. This pipe must be the same diameter as the valve (usually 3/4 inch). Run it down to within 6 inches of the floor, ending in a visible location. Never cap or plug this pipe.
Step 4: Connect the Water Lines
Install an expansion tank if required by code. These small tanks absorb pressure increases as water heats up. They prevent premature valve failures and extend tank life. Mount the expansion tank to a nearby wall or the cold water pipe using a bracket.
Connect the cold water line to the blue-marked inlet at the tank top. Connect the hot water line to the red-marked outlet. Use flexible braided stainless steel connectors for the easiest installation. These flex lines compensate for slight misalignment and resist corrosion better than copper.
Hand-tighten the connections first, then use a wrench to tighten one full turn. Over-tightening can damage the washers inside the flex lines. Apply pipe dope or Teflon tape to threaded connections for a leak-free seal.
Install shut-off valves on both hot and cold lines if they’re not already present. This lets you service the water heater without draining your entire house.
Step 5: Connect the Gas Line (Gas Units Only)
Install a sediment trap in the gas line before the water heater. This simple fitting catches debris that could damage the gas valve. It consists of a tee fitting with a short nipple extending down. Most codes require this on all gas appliances.
Use a gas flex connector to attach the gas line to the heater. These flexible stainless steel lines make installation easier and provide some movement during earthquakes. Never use old or kinked flex connectors, as they can leak.
Apply gas-rated pipe dope to all threaded connections. Never use Teflon tape on gas fittings, as small pieces can break off and clog the gas valve. Tighten connections firmly but don’t strip the threads.
Test for gas leaks before proceeding. Mix dish soap with water and brush it on all connections. Open the gas valve slowly. Look for bubbles, which indicate leaks. Even small leaks are dangerous and must be fixed immediately.
Step 6: Connect the Venting (Gas Units Only)
Proper venting removes dangerous exhaust gases from your home. The vent pipe must slope upward from the water heater to the main vent stack. Use a level to check that you have at least 1/4 inch of rise per foot of horizontal run.
Secure all vent pipe joints with sheet metal screws. Gaps or loose connections let carbon monoxide enter your home. Type B vent pipe has a male and female end that fit together, with the male end pointing up toward the main vent.
Install a draft hood at the top of the water heater. This fitting sits loosely on the flue collar without fasteners. The gap around it lets combustion air flow properly and prevents backdrafting.
Step 7: Wire the Power (Electric Units Only)
Turn off power at the breaker before working with electrical connections. Remove the access panel on the water heater side or top. You’ll see three wire terminals inside.
Connect the ground wire (bare copper or green) to the ground screw. Connect the hot wires (usually black and red) to the two brass terminals. Electric water heaters don’t have a neutral wire, so cap the white wire if present.
Use proper wire nuts sized for your wire gauge. Wrap electrical tape around each connection for extra protection. Most residential water heaters need 10-gauge wire on a 30-amp breaker, but check your unit’s label.
Replace the access panel before restoring power. This cover prevents accidental contact with live wires during operation.
Step 8: Fill and Test the System
Close the drain valve at the tank bottom. Open the cold water supply valve slowly. Let the tank fill completely, which takes about 15-20 minutes. Open a hot water faucet somewhere in your house to bleed air from the lines.
Watch for leaks around all connections while the tank fills. Tighten any fittings that drip. Check again after 30 minutes, as some leaks appear only under full pressure.
For gas units, light the pilot following the instructions on the tank label. Most modern units have electronic ignition and start automatically when you turn the gas valve to “on.” Set the temperature dial to 120 degrees, which prevents scalding and saves energy.
For electric units, restore power at the breaker. The heating elements begin working immediately. Most electric water heaters take 2-3 hours to reach full temperature.
Step 9: Final Checks and Adjustments
Let the water heater run for an hour, then check all connections again. Feel around pipe joints for moisture. Look underneath the tank for any water pooling.
Test the temperature at a faucet after the unit has been running for several hours. Hold a thermometer under hot water for one minute. If it reads above 120 degrees, adjust the thermostat down. Higher temperatures waste energy and increase scalding risk.
For gas units, check the burner flame. It should be mostly blue with slight yellow tips. A large yellow flame indicates incomplete combustion and needs professional adjustment.
Schedule a final inspection with your local building department. The inspector checks that your work meets code requirements and is safe. This inspection protects you and future homeowners.
You can read about: How to Install Tankless Water Heater
How Much Does It Cost to Install a Water Heater?
A new hot water heater installation costs between $1,200 and $3,500 for most homes. This includes the unit and professional labor. Your actual cost depends on several factors.
Tank Type and Size:
- 40-gallon electric: $800-$1,500 installed
- 50-gallon electric: $900-$1,700 installed
- 40-gallon gas: $1,000-$2,000 installed
- 50-gallon gas: $1,200-$2,200 installed
- Tankless units: $2,500-$4,500 installed
Installation Variables:
- Permit fees: $50-$200
- Venting changes: $300-$800
- Electrical upgrades: $200-$1,000
- Plumbing modifications: $150-$500
- Expansion tank: $150-$300
- Removal and disposal: $50-$100
DIY installation saves $500-$1,500 in labor costs. You’ll spend $100-$200 on tools and supplies if you don’t own them already. However, mistakes can cost more than professional installation when you factor in water damage or code violations.
Energy-efficient models cost more upfront but save money over time. A high-efficiency gas water heater costs $200-$400 more but reduces utility bills by $30-$50 annually. The payback period is typically 5-7 years.
Consider the total cost of ownership when shopping. A cheap water heater that fails in 6 years costs more than a quality unit lasting 12 years. Look for units with 6-12 year warranties and glass-lined tanks.
Common Installation Mistakes to Avoid
Even experienced DIYers make mistakes during water heater installation. Avoid these common errors to ensure safe, reliable operation.
Wrong Size Unit: Installing a water heater that’s too small leaves you with cold showers. Too large wastes energy heating unused water. Calculate your needs based on household size. A family of four typically needs a 50-gallon tank.
Improper Venting: Undersized or poorly sloped venting causes carbon monoxide to enter your home. Always follow the manufacturer’s venting requirements exactly. Use the correct vent pipe type and maintain proper clearances from combustibles.
No Expansion Tank: Modern plumbing codes require expansion tanks in closed systems. Without one, pressure builds up as water heats and expands. This stress damages valves, fixtures, and the water heater itself.
Incorrect Gas Line Size: Using a 1/2-inch line when your unit needs 3/4-inch starves the burner of gas. The result is incomplete combustion, wasted energy, and potential carbon monoxide production.
Overtightening Fittings: Cranking down on plastic fittings or flex lines cracks them. Hand-tight plus one turn with a wrench is usually sufficient. Let the washers do their job instead of relying on brute force.
Skipping the Sediment Trap: This simple gas line fitting catches rust and debris before it reaches the gas valve. Without it, particles clog the valve orifice, reducing efficiency and lifespan.
Wrong Temperature Setting: Setting the thermostat above 120 degrees wastes energy and creates scalding risks. Small children can suffer serious burns from water hotter than 120 degrees in just seconds.
No Earthquake Straps: If you live in a seismic zone, straps are required by code. An unsecured water heater can tip during an earthquake, breaking gas and water lines. This creates fire and flood risks.
Reusing Old Flex Lines: Never reuse flex lines, whether gas or water. The internal washers compress during initial installation and won’t seal properly when reinstalled. New flex lines cost $10-$20 and prevent leaks.
Ignoring Clearances: Gas water heaters need space for combustion air. Cramming them into tight closets or surrounding them with storage reduces efficiency and creates fire hazards.
When to Hire a Professional
Some water heater installations are beyond DIY skill levels. Hire a licensed plumber when you encounter these situations.
Gas Line Modifications: Running new gas lines or increasing line size requires professional expertise. Mistakes create explosion and carbon monoxide risks. Most jurisdictions require licensed plumbers for gas work.
Electrical Panel Upgrades: If your electric water heater needs a new circuit or your panel is full, hire an electrician. Working inside electrical panels requires proper training and tools.
Complex Venting Changes: Converting from natural draft to power venting, or rerouting vent pipes through walls, needs professional design. Improper venting kills people through carbon monoxide poisoning.
Tankless Installations: These units require precise gas and water flow calculations. Many also need electrical upgrades for the control board. The installation is more complex than tank-style water heaters.
Commercial Settings: Businesses have different code requirements than homes. Commercial water heaters are larger, more complex, and require licensed professionals in most areas.
Structural Concerns: If your new water heater won’t fit through doorways, or you need to modify framing, hire professionals. They have the tools and experience to handle building modifications safely.
No DIY Experience: If you’ve never worked with plumbing, gas, or electricity, pay for professional installation. The risks of mistakes outweigh the money you’ll save. One flood or gas leak costs more than hiring a plumber.
Professional installation typically includes warranty protection. Many manufacturers require professional installation to honor their warranty. This protection is valuable for a major appliance.
Find Local Water Heater Professionals
If the scope of the project feels too large or complex, don’t risk your home’s safety. For reliable, professional service, contact our experts at Derks Plumbing. We are fully licensed, insured, and focused on code-compliant, high-quality service. We specialize in all aspects of Water Heater Installation in Eagle Rock and surrounding areas.
Conclusion
Learning how to install a water heater saves money and builds valuable home maintenance skills. The process takes most DIYers 4-6 hours and requires basic plumbing and electrical knowledge.Success depends on proper preparation, the right tools, and following each step carefully. Don’t skip safety checks or try to save money on quality parts. A water heater installed correctly provides reliable hot water for a decade or more.Know your limits and call professionals for complex situations. Gas work, electrical upgrades, and code compliance issues require licensed expertise.
The money you save isn’t worth the safety risks of poor installation.With your new water heater running, enjoy lower energy bills and consistent hot water. Regular maintenance extends its life and prevents expensive repairs down the road.
FAQs
What is the lifespan of a water heater?
A traditional tank-style water heater typically lasts between 8 and 12 years. Tankless units can last up to 20 years with proper maintenance.
Do I need an expansion tank for my installation for water heater?
Yes, most modern plumbing codes require a thermal expansion tank, especially in closed water systems. This tank absorbs the pressure created when water heats up, protecting your entire plumbing for water heater system from damage.
How often should I drain my hot water system?
It is recommended to drain a standard tank water heater once a year. This removes sediment buildup at the bottom of the tank, which helps the unit run more efficiently and extends its life.
Can I install a gas water heater myself?
Installing a gas unit is highly complex due to the venting requirements and the risks associated with gas lines. While possible, it is strongly recommended that you hire a professional for a safe and code-compliant hot water installation.
Do I need a permit to replace my water heater?
Most cities require permits for water heater replacement. Permits ensure work meets safety codes and protects your home value. Expect to pay $50-$200 for the permit. Skipping permits can cause problems when selling your home.