How Much Does a 40-Gallon Water Heater Cost?

National Average Range:
$700 - $2,300

Get free estimates from water heating professionals near you

Get local cost

Updated: October 1, 2025

Written by Laura Madrigal

Reviewed by Nieves Martinez

A reliable hot water heater is essential for any modern home. For households of 3 to 4 people with typical water usage, a 40-gallon tank water heater strikes the perfect balance between capacity and efficiency. Tank-style heaters continuously maintain a reservoir of hot water, so selecting the right size is crucial to avoid paying for unused energy.

The national average cost to install a 40-gallon tank water heater ranges from $700 to $2,300. The average 40-gallon gas water heater installation cost is around $1,650 for a direct replacement of a standard-efficiency model. At the low end, the cost to install a 40-gallon electric water heater can be as little as $600 for a simple replacement in an accessible area. At the high end, you could pay $7,000 or more for a high-efficiency hybrid or a solar-powered model with complex installation requirements.

Average Cost to Replace a 40-Gallon Water Heater

Average cost to install a 40-gallon water heater
Want More Information?

This guide focuses specifically on 40-gallon models. For a complete overview of installation costs for all sizes and types of water heater, including tankless units, read our water heater installation cost guide.

Get quotes from HVAC contractors near me

Cost of a 40-Gallon Water Heater by Type

The fuel type of your water heater is the single biggest factor influencing both its upfront pricing and long-term running costs. For homeowners with a household of 3-4 people, a 40-gallon tank provides ample hot water, but the type you choose determines the final cost you pay for installing the unit.

  • Electric: These are the least expensive water heaters to purchase and install, making them a popular budget-friendly option. However, they rely on electric resistance coils to heat water, which makes them the most costly to operate over their lifespan.

  • Gas & Propane: With a moderate-to-high upfront cost, gas and propane models offer lower monthly energy bills than standard electric units. They require a dedicated gas line and proper venting to the outside, which can add to installation complexity and cost.

  • Hybrid (Heat Pump): A highly efficient type of electric heater, hybrids have a high initial cost but provide significant long-term savings. They work by capturing heat from the surrounding air, using up to 70% less energy than standard electric models, offering one of the best returns on investment.

  • Solar: Solar water heaters represent the highest upfront investment due to the cost of panels and a more complex installation. In return, they boast the highest efficiency ratings and the lowest possible operating costs by using free energy from the sun, though they do require a gas or electric backup system.

Cost of a 40-gallon water heater by fuel type: Electric, Gas/Propane, Hybrid/Heat Pump, and Solar.

Type

Installed Cost

Electric

$700 – $1,650

Gas/Propane

$700 – $2,300

Hybrid (Heat Pump)

$1,600 – $5,000

Solar

$2,000 – $7,000+

Key Cost Factors

  • Labor: Professional installation is critical for safety and performance. Labor accounts for around 20% to 50% of the total price, typically $140 to $1,150. Plumbers charge between $45 and $200 per hour, and a standard replacement takes 2 to 4 hours. Complex jobs that require new plumbing lines, venting, or relocating the unit will take longer and cost more.

  • Brand and quality: Top brands like A.O. Smith, Rheem, and Bradford White offer models at various price points. Premium models come with better insulation, more durable components, and longer warranties, increasing the unit's cost over builder-grade equivalents.

  • Venting: Gas and propane water heaters must be properly vented to the outside. If your existing venting is inadequate, or if you’re adding a new gas line, installing a direct-vent or power-vent system can add $3,400 to $10,200 to your project cost. Electric and hybrid water heaters, on the other hand, do not require venting.

  • Permits and inspections: Most municipalities require a permit for water heater installation to ensure it meets safety codes. Expect to pay $25 and $1,500 for permits and a post-installation inspection.

  • Energy efficiency (UEF): A unit's Uniform Energy Factor (UEF) measures its efficiency. Models with a higher UEF cost more upfront but reduce your utility bills. Energy Star-certified models are the most efficient and may qualify for local or federal rebates, helping to offset their higher initial price.

Additional Considerations and Costs

  • Old tank disposal: Your plumber will typically haul away and dispose of your old unit for a fee of $50 to $150.

  • Code upgrades: If your home's plumbing, electrical wiring, or gas line is not up to current code, your installer will need to make upgrades, which can add several hundred dollars to the final bill.

  • Warranty: Standard warranties last 6 to 10 years. Extended warranties can add peace of mind but will increase the initial purchase price.

  • Expansion tank: In areas with a closed-loop water system, an expansion tank is often required by code to protect your plumbing from pressure changes. Installing one adds $150 to $400 to the total cost.

Annual Operating Costs

When choosing a water heater, remember that long-term operating costs often have a greater financial impact than the upfront price. 

  • A standard electric model, while cheap to purchase, is the most expensive to run at $550 to $700 annually due to high electricity costs. 

  • Gas heaters offer a more economical alternative at $300 to $450 per year by using cheaper natural gas. 

  • For the greatest efficiency, hybrid models drastically reduce electricity consumption by pulling heat from the air, costing only $200 to $300 annually. 

  • Solar heaters are the cheapest of all, running for $100 to $200 per year by using free energy from the sun, with minor costs for a pump and backup system. 

Your actual expenses will vary based on local utility rates, climate, and household water usage.

DIY vs. Professional Installation

Installing a water heater is not a recommended DIY project. It involves complex plumbing, high-voltage electrical wiring, or natural gas connections. Mistakes can lead to gas leaks, carbon monoxide poisoning, electrical fires, major water damage, and voided manufacturer warranties. For your own safety and code compliance, always hire a licensed and insured plumber or HVAC professional.

Compare prices from the best water heater installation companies

FAQs

For a family of 4 with typical water usage (showering, laundry, dishes), a 40-gallon tank is usually sufficient. However, if you have a large soaking tub, multiple high-flow showerheads, or frequent overlapping uses, you may need to upgrade to a 50-gallon water heater.

Most tank-style water heaters have a lifespan of 10 to 15 years. Regular maintenance, such as flushing the tank annually to remove sediment, can help extend its life.

Since shower water is a mix of hot and cold, a 40-gallon tank provides more than 40 gallons of warm water. A standard shower uses about 2 gallons per minute. This means you can expect roughly 40-50 minutes of continuous showering, which could be two 20-minute showers or four 10-minute showers back-to-back.

Yes, this is a popular energy-efficient upgrade. A tankless water heater provides endless hot water on demand. However, the conversion is significantly more expensive, often costing between $1,000 and $4,000, as it may require upgrading your home's gas lines or electrical panel.