Home / Guides

INSTALLATION, CODES & SAFETY

Where a water heater can go: garages, attics, closets, relocation

A water heater can go almost anywhere, but every location brings its own requirements. The location also decides much of what the installation costs.

Where a water heater can go in a house Cross-section of a two-story house with a basement and an attached garage, with six numbered water heater locations. 1, basement or utility room: usually easiest. 2, garage: ignition source at least 18 inches above the floor unless the heater is FVIR, a vehicle barrier, and freeze risk. 3, attic: a drained pan, an access opening of at least 20 by 30 inches, a floored passageway and a light. 4, closet: never a storage closet, and a gas heater needs combustion air openings or direct venting. 5, bedroom or bathroom: gas heaters only if direct vent or in a sealed closet that takes outdoor air. 6, outside wall: a tankless heater listed for outdoor use, whose freeze protection needs power. grade garage bedroom bath hall basement attic 1 2 3 4 5 6 1 Basement or utility room Usually easiest: space, a floor drain, an existing vent 2 Garage Burner 18 in. up unless FVIR, a vehicle barrier, freeze risk 3 Attic Drained pan, 20 × 30 in. opening, floored path, light 4 Closet Never a storage closet; gas needs air openings or direct vent 5 Bedroom or bathroom Gas only as direct vent or in a sealed closet using outdoor air 6 Outside wall Tankless listed for outdoors; freeze protection needs power
Six places a water heater can go. The rules shown are from the International Residential Code (IRC) and fuel gas code; your city may amend them. Orange means the location is allowed with conditions; red means gas heaters are allowed only in limited forms.

THE SHORT VERSION

  • Basements and utility rooms are the easy case. Every other spot adds requirements, and each requirement adds cost.
  • Garage: under the IRC, the burner or other ignition source must be at least 18 inches above the floor unless the heater is listed FVIR, and the heater needs protection from cars.
  • Attic: a drained pan, an access opening of at least 20 × 30 inches, a floored path, a light and an outlet. A.O. Smith calls attics and upper floors “not advisable” because a leak lands on the rooms below.
  • Closets, bedrooms and bathrooms: fuel-fired heaters are banned from storage closets, and in bedrooms and bathrooms they must be direct vent or sealed off with outdoor combustion air. Heat pump models need 450–1,000 cubic feet of air, depending on whose numbers you use, or louvers.
  • Moving a heater adds water lines and often gas, venting, wiring and a drain; This Old House prices those pieces from $200 to $2,300 each, on top of a normal installation.

Every location has its own rules

Most US homes fall under the International Residential Code (IRC); California builds on the Uniform Plumbing Code (UPC). Section numbers below are from the 2021 and 2024 IRC, and your permit office decides which edition applies. The full list of installation rules is in water heater code requirements.

Where a water heater can go, and what each spot requires
LocationAllowed?Main requirementsPublished add-on cost
Basement or utility roomYesWorking space, combustion air for gas, a pan where a leak would cause damageUsually none; the baseline
GarageYesIgnition source 18 in. above the floor unless FVIR; vehicle protection; freeze protection in cold climates$100–$300 for freeze protection
AtticYes, with accessDrained pan; opening, floored passageway, light and outlet; service space$200–$1,000 extra
Closet off a hall or utility areaYes, not a storage closetGas: combustion air openings or a direct-vent heater. All: access and working space$200–$800 for ventilation
Bedroom or bathroomElectric yes; gas limitedGas must be direct vent, or in a sealed, self-closing closet taking air from outdoorsNo published figure
OutdoorsUnits listed for outdoor useOutdoor-rated tankless or protected equipment; freeze protectionNo published figure

Rules: 2021 and 2024 IRC (M1305, M1307, M2005, P2801, G2406–G2408). Cost column: This Old House, “How much does water heater installation cost?” (updated June 17, 2026), national estimates on top of the base installation. Home Depot publishes $1,600–$2,400 installed for a standard tank.

Garages: 18 inches up and out of the car’s way

Gasoline vapor is heavier than air and collects near the floor. The IRC requires any appliance with an ignition source in a garage to be raised so the ignition source is at least 18 inches above the floor (2021 M1307.3 and G2408.2; 2024 P2801.6). Rooms that open into the garage and aren’t living space count as garage. Heaters listed as flammable vapor ignition resistant (FVIR) are exempt, and California’s plumbing code (507.13) has the same exception. Many inspectors still expect a stand, so ask before you skip it.

  • Vehicle protection: the IRC bars appliances where a vehicle could damage them unless they’re behind approved barriers (M1307.3.1). The fuel gas chapter puts unprotected gas appliances in private garages at least 6 feet up (G2408.3). In practice that means a bollard or wheel stop; A.O. Smith’s heat pump manual shows a vehicle stop too.
  • Electric heaters: the IRC speaks of an “ignition source,” but California’s code (507.13) lists “heating elements, switches” as well, so some jurisdictions raise electric tanks too.
  • A sealed room off the garage: a heater in an enclosed space entered only from outside the garage may sit on the floor if its combustion air comes from outdoors (G2408.2.1).
  • Cold: an unheated garage can freeze pipes and a relief valve line. A.O. Smith says heaters in unconditioned spaces may need insulated water, condensate and drain piping, and This Old House puts garage freeze protection at $100–$300.
  • Heat pump models in garages run their compressor only when the air is between 37°F and 120°F, A.O. Smith says; outside that range the backup elements take over and efficiency drops.

Attics: allowed, but only with access and a drained pan

The code allows attic water heaters, but it wants a person to be able to reach, service and remove the heater safely, and it wants a leak caught before it soaks the ceiling below.

What an attic water heater needs Cross-section of an attic with a water heater. An access opening at least 20 by 30 inches in the ceiling leads to a floored passageway at least 24 inches wide and no more than 20 feet long. A light with a switch sits at the opening. The heater stands in a pan with a drain line running outdoors, has a level 30 by 30 inch service space in front, and a receptacle nearby. Below the attic floor is a finished room that a leak would damage. finished room below Light switch at opening Service space 30 × 30 in., level Outlet nearby Opening 20 × 30 in. or bigger than the heater Floored path 24 in. wide, 20 ft or less, 30 in. high Pan under the tank, piped to a drain or outdoors Pan drain limits damage; a leak shutoff adds a layer
What the IRC asks of an attic install. IRC M1305.1.2 sets the access rules; P2801.5 (2024) requires a pan where a leak would cause damage. California’s code asks for a 22 × 30-inch opening (508.4).
  • Opening: at least 20 × 30 inches and large enough to remove the heater (IRC M1305.1.2). California: 22 × 30 inches.
  • Passageway: at least 30 inches high and 22 inches wide, no more than 20 feet long, with solid flooring at least 24 inches wide. If the path is at least 6 feet high, it may run up to 50 feet.
  • Service space: a level 30 × 30-inch area wherever access is required.
  • Light and power: a light controlled by a switch at the opening and a receptacle near the heater (M1305.1.2.1).
  • Pan: required where a leak would cause damage, which in an attic is almost always (2024 IRC P2801.5). Galvanized steel or aluminum at least 0.0236 inch thick, or plastic at least 0.036 inch.

Manufacturers are less enthusiastic than the code. A.O. Smith’s gas manual says it is “not advisable” to install a water heater in an attic or upper floor; where unavoidable, use a metal pan at least 2 inches larger than the heater, piped to a drain. It adds that a pan doesn’t guarantee against damage and suggests a leak detector or automatic shutoff. Its heat pump manual says to avoid attics. Weight matters too: A.O. Smith lists a filled 40-gallon heat pump model at 470 pounds and an 80-gallon at 921, so ask whether the framing needs reinforcement. This Old House puts the extra cost of an attic install at $200–$1,000.

Closets, bedrooms and bathrooms: the combustion air rules

A gas burner starved of room air can make carbon monoxide, so codes restrict where fuel-fired heaters go. The 2021 IRC (M2005.2) says fuel-fired water heaters shall not be installed in a room used as a storage closet, and a heater in a bedroom or bathroom must be in a sealed enclosure so combustion air doesn’t come from the living space. Direct-vent heaters, which take all their air from outdoors through a sealed pipe, don’t need the enclosure.

The fuel gas chapter (G2406.2) spells out the bedroom and bathroom options for a gas heater:

  • A direct-vent heater installed per its listing, or
  • A space that opens only into the bedroom or bathroom, used for nothing else, with a solid, weather-stripped, self-closing door and combustion air taken directly from outdoors.
  • California’s code (504.1) is similar: direct vent, or a closet with a listed gasketed, self-closing door assembly and outdoor combustion air.

How much air a gas heater needs

The IRC’s standard method needs 50 cubic feet of room per 1,000 Btu/h of all the fuel-burning appliances in the space (G2407.5.1). Worked example (hypothetical): a 40,000 Btu/h gas tank needs 40 × 50 = 2,000 cubic feet, a room about 16 × 16 feet with an 8-foot ceiling. A 3 × 3-foot closet with an 8-foot ceiling holds 72. So a closet heater needs two permanent openings to the adjoining space, one starting within 12 inches of the top and one within 12 inches of the bottom, each with at least 1 square inch per 1,000 Btu/h and never less than 100 square inches (G2407.5.3.1), or air ducted from outdoors, or a direct-vent heater. This Old House prices closet ventilation upgrades at $200–$800.

Electric heaters burn nothing, so the combustion air and bedroom rules don’t apply to them. They still need the working space and access rules below, a pan where a leak would cause damage, and the electrical disconnect covered in code requirements.

Clearances and room to work

  • Working space: a level space at least 30 × 30 inches in front of the control side, and the heater must be reachable for service and replacement without removing permanent construction (IRC M1305.1). Building a wall that boxes a heater in can fail inspection.
  • Clearance to combustibles: set by the heater’s label. A.O. Smith’s Signature 100 gas tank lists 0 inches at the sides and rear, 4 inches in front and 6 inches from a single-wall vent pipe.
  • Heat pump models: A.O. Smith requires 6 inches in front and 12 inches above, and recommends 3 feet in front for service. Rheem’s general installation article suggests 18–24 inches at the sides and at least 12 inches from walls.
  • Access through a bedroom: the IRC allows access to an attic or crawlspace heater through a bedroom or bathroom closet (M2005.2.1).

When two sources differ, the manual for the exact model wins: the IRC requires water heaters to be installed per the manufacturer’s instructions (M2005.1).

Heat pump water heaters need a room’s worth of air

A heat pump water heater pulls heat out of the surrounding air, so the room is part of the machine. It cools and dries the space, and it needs enough air volume and warmth to work efficiently.

How much air a heat pump water heater needs Bar chart of free air volume around the heater that different sources call for: Rheem's 120-volt plug-in, 1,200 cubic feet before louvers are needed; DOE and the ENERGY STAR product page, 1,000; Rheem's 240-volt ProTerra, 700; an ENERGY STAR article's minimum, 450. A dashed line marks a 10 by 10 foot room with an 8 foot ceiling, 800 cubic feet. Below, three ways to supply air: an open room, a closet with a louvered door, and a closet with ducts. Free air the heater needs, cubic feet Rheem 120 V plug-in 1,200 DOE, ENERGY STAR page 1,000 Rheem 240 V ProTerra 700 ENERGY STAR article 450 ← a 10 × 10 ft room, 8 ft ceiling = 800 04008001,200 Rheem figures are the room size above which no louvers are needed. The model’s manual is the one that counts. Three ways to give it air Open room Big enough: no extra work Louvered door Smaller room: louvers swap air with the house ceiling Ducted Tight closet: ducts move air in or out Red: warm room air in. Blue: cool exhaust out.
How much air is enough depends on whom you ask. Published air-volume figures range from 450 to 1,200 cubic feet. A 10 × 10-foot room with an 8-foot ceiling holds 800. Smaller spaces can work with louvers or ducts if the manual allows.
Heat pump water heater space requirements from four sources
SourceAir volumeTemperatureSmaller spaces
ENERGY STAR product page1,000 cubic feetInterior space that stays 40–90°FNot addressed
A.O. Smith hybrid manual (100379656)450 cubic feet unvented, e.g. 7¾ × 7¼ ft with an 8-ft ceilingHeat pump runs at 37–120°F; elements outside that84–449 cubic feet with a fully louvered door, two wall grilles (near ceiling and floor) or ducting
Rheem installation article450–700 cubic feetBest at 40–120°F year-roundAvoid small closets
Rheem ProTerra 120 V plug-in spec sheetMore than 1,200 cubic feet needs no added ventilationNot stated on the sheet400–1,200: full louvered door or two louvers; under 400: louvered door plus an outlet duct

Sources: ENERGY STAR “Heat pump water heaters”; A.O. Smith hybrid electric heat pump use and care guide (May 2024); Rheem “Heat pump water heater installation: complete Rheem guide” and ProTerra plug-in spec sheet. Follow the manual for the model you buy.

Worked example (hypothetical): a 6 × 5-foot laundry closet with an 8-foot ceiling holds 240 cubic feet. That is under A.O. Smith’s 450 but inside its 84–449 range, so that model could go there with a fully louvered door or two grilles. Heat pump models also make condensate, so plan for a floor drain or a condensate pump (Rheem).

Outdoors and on exterior walls

Gas appliances installed outdoors must be listed for outdoor installation or protected from the weather (IRC G2406.3). In practice that means outdoor-model tankless units, which free up indoor space and need no indoor vent. Rinnai says its outdoor models protect themselves from freezing down to −4°F out of the wind, and its indoor models to −22°F, but only while they have gas and 120-volt power. In a winter power outage you may need to drain the unit. Vent terminations on outside walls have their own clearances from windows, doors and grade; see water heater venting and tankless water heaters.

Moving a water heater: what drives the cost

A move can add hot and cold lines, a gas line or circuit, a new vent route, a drain for the pan or condensate, and patching. No public dataset prices relocation as one job, so price its pieces.

Published cost ranges for the pieces of a relocation
ItemRangeSource
Relocating water lines or adding shutoffs$200–$600This Old House
New gas line$1,500–$2,300This Old House, quoted for an electric-to-gas conversion
Venting: basic gas / power vent / direct vent$300–$500 / $300–$600 plus $300–$500 electrical / $500–$1,000This Old House
New chimney liner$500–$700This Old House
Attic location$200–$1,000 extraThis Old House
Closet ventilation$200–$800This Old House
Permits and inspections$50–$200This Old House
Standard tank, installed in place$1,600–$2,400Home Depot, includes equipment, labor, permit and removal

Sources: This Old House, “How much does water heater installation cost?” (updated June 17, 2026), national estimates; Home Depot water heater installation cost guide (checked 2026-09-28). Ranges are not quotes; local labor rates, distances and wall or ceiling repairs change them.

Worked example (hypothetical): moving a gas tank from a hall closet to the garage, using the low ends of these ranges: a standard installation ($1,600) plus new water lines ($200), basic gas venting ($300) and a permit ($50) comes to about $2,150 before any gas-line work, stand, bollard or drywall repair. The gas extension is often the swing item. Ask each installer to price it separately.

Ways to keep a move cheaper:

  • Move it a short distance along existing lines, or to the other side of the same wall.
  • Change the heater type if the move is about venting: an electric or heat pump model needs no vent, and a direct-vent or power-vent gas model can exit through a side wall. See switching from gas to electric.
  • If the goal is faster hot water at a far bathroom, a recirculation pump may cost less than moving the heater.
  • Do it at replacement time, when the old heater is coming out anyway and the permit covers the work.

What to ask before you pick a spot

Location questions for every quote

  • Does this spot meet the code here, and which edition does the permit office use?
  • Garage: will the heater be FVIR, on an 18-inch stand, or both? What protects it from the car?
  • Attic: is there a drained pan, a floored path, a light and an outlet? Does the framing need reinforcement?
  • Closet: where does combustion air come from, and are the openings sized for every appliance in the space?
  • Heat pump: how many cubic feet does the room have, and what does the manual require? Where does the condensate go?
  • Relocation: what is each piece (water, gas, vent, power, drain, patching) priced at, and is the permit included?

Compare those answers line by line across bids; see how to compare quotes and what makes one installation cost more. The permit and inspection process is in water heater permits and inspections.

Common questions

Can a water heater be in a bedroom closet?

An electric one can. A gas heater can only if it is direct vent, or if the closet is a sealed space used for nothing else, with a weather-stripped self-closing door and combustion air taken from outdoors (IRC G2406.2). Fuel-fired heaters can never go in a storage closet.

Does a water heater in a garage need to be raised 18 inches?

Under the IRC, a heater with an ignition source must have it at least 18 inches above the garage floor unless the heater is listed flammable vapor ignition resistant (FVIR). CPSC says 30- to 50-gallon gas tanks made after July 1, 2003 have flame arrestors, but many inspectors still expect a stand, and some apply the rule to electric heaters. Ask your permit office.

Can you put a water heater in the attic?

Yes, with a 20 × 30-inch access opening (22 × 30 in California), a floored passageway, a light and outlet, a service space and a drained pan. Manufacturers such as A.O. Smith advise against attics where you can avoid them because a leak damages the rooms below.

How much space does a heat pump water heater need?

ENERGY STAR says 1,000 cubic feet; A.O. Smith’s manual says 450 cubic feet, or as little as 84 with a louvered door, wall grilles or ducts; Rheem says 450–700. Follow the manual for the model you buy.

Can a water heater be installed outside?

Only equipment listed for outdoor use or protected from the weather (IRC G2406.3), which in practice means outdoor tankless models. Their freeze protection needs power and gas, so plan for winter outages.

How much does it cost to move a water heater?

No single published figure covers it. This Old House prices the pieces: $200–$600 to relocate water lines, $300–$1,000 for venting depending on type, up to $1,500–$2,300 for a new gas line, plus permits. Those come on top of a normal installation, which Home Depot puts at $1,600–$2,400 for a standard tank.

How much clearance does a water heater need?

The label sets clearance to combustibles; one A.O. Smith gas tank lists 0 inches at the sides and rear, 4 inches in front and 6 inches from the vent. Separately, the IRC wants a level 30 × 30-inch working space in front of the controls.

Sources

Sources checked October 5, 2026. Prices, codes and rebates change. Check current details with your installer and local permit office.

  1. 2021 IRC Chapter 13, General Mechanical System Requirements (M1305, M1307) ↗ · International Code Council, via UpCodes (Colorado adoption)
  2. 2021 IRC Chapter 20, Boilers and Water Heaters (M2005.2) ↗ · International Code Council, via UpCodes (Colorado adoption)
  3. 2021 IRC Chapter 24, Fuel Gas (G2406–G2408) ↗ · International Code Council, via UpCodes (Colorado adoption)
  4. 2024 IRC Chapter 28, Water Heaters (P2801.5 pans, P2801.6 garages) ↗ · International Code Council, via UpCodes (Maryland adoption)
  5. 2025 California Plumbing Code §507.13, installation in residential garages ↗ · California Building Standards Commission, via GoCodebook
  6. 2025 California Plumbing Code §504.1, location (bedrooms and bathrooms) ↗ · California Building Standards Commission, via GoCodebook
  7. 2025 California Plumbing Code §508.4, appliances in attics and under-floor spaces ↗ · California Building Standards Commission, via GoCodebook
  8. Residential gas water heater installation and use and care guide (Signature 100, 100341468) ↗ · A.O. Smith, hosted by Lowe’s
  9. Hybrid electric heat pump water heater use and care guide (100379656, May 2024) ↗ · A.O. Smith, hosted by Lowe’s
  10. Heat pump water heater installation: complete Rheem guide ↗ · Rheem
  11. Heat pump water heaters ↗ · ENERGY STAR
  12. ProTerra plug-in heat pump water heater spec sheet (installation guidelines) ↗ · Rheem
  13. New technology in gas water heaters can save lives (July 8, 2003) ↗ · U.S. Consumer Product Safety Commission
  14. Sensei tankless water heater installation and operation manual (freeze protection) ↗ · Rinnai
  15. How much does water heater installation cost? (updated June 2026) ↗ · This Old House
  16. Water heater installation cost guide (tank range used in Ember & Tank pricing data) ↗ · Home Depot