A 50-gallon tank leaking onto the basement floor turns into a $1,200 bill by the weekend, give or take a few hundred. That number surprises people because the heater itself is often under $600. The rest is labor, a permit, and whatever the inspector decides your old install is missing. This is the cost to replace the thing, not the cost to run it, and the two get mixed up constantly. Replacement is a one-time project cost. What follows is where every dollar of it goes.

Replace it, don't run it: two different costs
People searching for replacement cost often land on running cost by accident, and the numbers are not comparable. Running cost is the monthly energy to heat water, a few hundred dollars a year that a heat pump or tankless can cut. Replacement cost is the project: buy the unit, install it, pass inspection. A heat pump might save you $300 a year to run and still cost $3,000 to install. That payback math matters, but it is a separate decision from what it takes to stop the leak this week. Everything below is the install bill.
Cost to replace (this article)
- A one-time project cost, paid once
- Unit plus labor plus permit plus code upgrades
- Ranges $600 DIY tank to $4,500 tankless
- Driven by fuel type, venting, and inspector requirements
Cost to run (a different question)
- A recurring monthly energy bill
- Set by fuel price and unit efficiency
- Heat pump and tankless lower it; gas is cheap to run
- Feeds payback math, not the install decision
| Unit, electric tank | $400 to $700 for a 40 to 50 gal |
| Unit, gas tank | $500 to $900 for a 40 to 50 gal |
| Unit, tankless gas | $1,000 to $1,500 |
| Unit, heat pump | $1,400 to $2,000 |
| Labor, tank swap | $400 to $700 like-for-like |
| Labor, tankless | $1,000 to $1,800 (gas line, venting) |
| Permit | $50 to $150, jurisdiction flat fee |
| Code upgrades | $150 to $400 (expansion tank, pan, strap, vent) |
The four line items on every bill
Whatever the total, it breaks into the same four parts, and knowing them is how you read a quote and spot padding. Total equals unit plus labor plus permit plus code upgrades. Miss any one and the estimate is either wrong or hiding something.
The unit is the easy part. A 40 or 50 gallon tank is a commodity from Rheem, A.O. Smith, Bradford White, or State, and the shelf price barely moves by region because they all ship from the same plants. Labor is where the money and the variation live: draining and hauling the old unit, setting the new one, and reconnecting water, gas or power, and vent. A straight tank swap is a couple of hours; a tankless conversion is most of a day. The permit is a flat fee your city charges to inspect the work, and skipping it to save $100 is how a future home sale turns into a problem. Code upgrades are the sleeper. Codes have tightened over the decades, so a heater installed in 2005 often lacks an expansion tank, a proper drip pan, or a current vent connector, and the inspector will require them now.
| Type | Unit | Labor | Typical installed total | Why it lands there |
|---|---|---|---|---|
| Electric tank | $400-700 | $400-600 | $900-1,500 | Simplest swap, no gas or vent work |
| Gas tank | $500-900 | $450-700 | $1,100-1,800 | Adds a gas connection and B-vent |
| Tankless gas | $1,000-1,500 | $1,000-1,800 | $2,500-4,500 | Upsized gas line, new stainless vent |
| Heat pump | $1,400-2,000 | $600-900 | $2,500-4,000 | Pricey unit, needs space and a drain |
The factors that swing the total most
Three things move the number more than anything else, and none of them is the brand on the box.
First is a fuel-type change. Swapping gas for gas is cheap. Going from gas to electric means running a new 240V, 30-amp circuit and a breaker, sometimes across a finished basement, and that can add $300 to $800 in electrical alone. Going the other way, electric to gas, means running a gas line and adding a vent, which is worse. Match the fuel and you skip all of it.
Second is tankless venting and gas. A tankless gas unit fires at 150,000 to 199,000 BTU versus a tank's 40,000, so the existing half-inch gas line usually cannot feed it and gets upsized to three-quarter inch. It also cannot share the old atmospheric B-vent; it needs dedicated stainless steel or PVC venting, often out a new sidewall penetration. That is the single biggest reason a tankless conversion costs more than double a tank swap, and it is almost all labor and materials, not the unit.
Third is code items. This is the line homeowners never see coming. If your house has a pressure-reducing valve or a check valve at the meter, you are on a closed system and the inspector will require a thermal expansion tank, about $40 to $60 in parts plus install. A heater over a finished space needs a drip pan and a drain line. Earthquake regions require seismic straps. A corroded or undersized vent connector gets replaced. Any one is minor. Stacked up on a permitted job, they are the difference between the low and high end of the estimate.
Estimate your own replacement
Pick the type you are replacing with, set the size for a tank, choose DIY or pro, and slide the region factor. The tool builds the total the same way a real quote does: unit plus labor plus permit plus a code-upgrade range. The region factor from 0.8 to 1.4 mainly scales labor and code items, because that is what varies by market. Size only matters for tanks; tankless is rated by flow, not gallons, so the slider drops out.
Water heater replacement cost estimator
Total = unit + labor + permit + code upgrades. Region factor scales labor and code items. A budgeting aid, not a formal quote. Get a local bid before you buy.
Unit
$595-805
Heater off the shelf, +/-15%
Labor
$500
Zero if you DIY
Code upgrades
$150-400
Expansion tank, pan, strap, vent
Permit
$100
Flat jurisdiction fee
Estimated total
$1,345 - $1,805
unit + labor + $100 permit + code upgrades
—
Which path fits your situation
The cheapest option and the right option are not always the same. Match the scenario, not just the sticker.
Electric tank, DIY, like-for-like
If you already have an electric tank and you are handy with water lines and a 240V circuit, doing it yourself lands the whole job around $600 to $800. No gas, no vent, no gas-connection liability. This is the one swap where DIY is genuinely reasonable and the labor saving is real.
Gas or electric tank, pro installed
A licensed plumber, permit pulled, old unit hauled away, code items added as the inspector requires. Expect $1,100 to $1,800. It is the default because it is fast, warrantied, and passes inspection cleanly. The variable is the code-upgrade line, so ask the installer what they expect the inspector to add.
Tankless or heat pump conversion
You are paying $2,500 to $4,500 up front to cut running cost or gain endless hot water. Tankless needs gas-line and venting work; a heat pump needs space and a drain. Worth it if you plan to stay, and often eligible for utility rebates or a federal tax credit that trims the net cost. Not the move if you just need to stop a leak cheaply.

Frequently asked
How much does it cost to replace a water heater in 2026?
A like-for-like 40 to 50 gallon gas or electric tank, installed by a licensed plumber with a permit and old-unit haul-away, runs about $900 to $1,800 in most of the country. The unit itself is $400 to $900 of that, labor is $400 to $700, the permit is around $100, and code upgrades add $150 to $400 depending on what your inspector requires. Tankless conversions run $2,500 to $4,500 because of venting and gas work, and a heat pump water heater installed lands in the $2,500 to $4,000 range. DIY on an electric tank can drop the whole job under $700 by removing the labor line.
What is included in the total replacement cost?
Four line items. The unit is the heater itself off the shelf. Labor is the installer's time to drain, disconnect, set, and reconnect. The permit is a flat fee your jurisdiction charges, usually $50 to $150. Code upgrades are the parts the current code requires that your old install may not have had: an expansion tank, a drip pan, a seismic strap in earthquake zones, or a new B-vent connector. Add those four and you have the real number, not just the sticker price on the box.
Is it cheaper to replace a water heater with the same type?
Almost always, yes. A like-for-like swap reuses your existing gas line, vent, water connections, and electrical, so the installer is doing the fastest possible version of the job. The moment you change fuel type or technology, gas to electric, tank to tankless, or over to a heat pump, you add work: new circuits, upsized gas lines, new venting, or condensate drains. That extra work is where a routine $1,200 job turns into a $3,500 project. If the goal is just to stop the leak, matching the old unit is the cheap answer.
How much does it cost to install a tankless water heater?
A tankless gas unit installed runs roughly $2,500 to $4,500, and the unit is only $1,000 to $1,500 of that. The rest is labor. Tankless gas heaters fire at a much higher BTU rate than a tank, so the existing half-inch gas line usually has to be upsized to three-quarter inch, and they need dedicated stainless steel or PVC venting rather than the old B-vent. That plumbing and venting work is the reason a tankless conversion costs two to three times a straight tank swap, even though the operating cost afterward is lower.
Can I replace a water heater myself to save money?
On an electric tank, yes, and it is the single biggest saving available: dropping the labor line takes a $1,300 job down toward $600. It is water connections and a 240V circuit, both within reach of a careful DIYer. Gas is a different story. A gas tank or tankless means making a gas connection and sizing a vent, which most jurisdictions want permitted and many want done by a licensed installer. Even where DIY gas is legal, a bad vent connection is a carbon monoxide risk, so the labor you would save is not the place to cut corners.
What code upgrades add to the cost of a replacement?
The common ones are a thermal expansion tank if you are on a closed system with a check valve or PRV, a drip pan with a drain line when the heater sits over a finished space, a seismic strap in earthquake-prone regions, and a new B-vent connector if the old one is corroded or undersized. Some inspectors also require a drain pan alarm, a new temperature and pressure relief discharge pipe, or a shutoff within reach. None of these are expensive on their own, $20 to $150 each, but together they are why the code-upgrade line on a permit-pulled job runs $150 to $400.
Does the region I live in change the replacement cost?
Significantly. Labor is the swing factor, and a plumber's hourly rate in a high-cost metro can be double the rate in a rural area, which is why the calculator uses a region factor from 0.8 to 1.4. That factor mostly moves the labor and code lines; the unit costs about the same everywhere because it ships from the same manufacturers. Permit fees also vary by jurisdiction. A $1,200 job in a low-cost area can be a $1,700 job in an expensive metro for the exact same heater and scope.