A 40,000 BTU per hour gas water heater needs 2,000 cubic feet of room around it before the code stops worrying about where its combustion air comes from. No closet is that big. That single fact drives almost everything about putting a water heater in a closet or a small utility space: the tank fits fine, but the air it breathes and the room a technician needs to service it are what the inspector actually measures. Get the clearances and the combustion air right and the install passes. Miss them and you get a red tag, or worse, a heater that backdrafts flue gas into the house.
Three closets, three sets of rules
The same closet is legal for one heater and illegal for another. What changes is the fuel and the venting, because that decides whether the appliance has to breathe room air. Start by matching your situation to one of these before you measure anything.
Gas atmospheric heater in a closet
A standard natural-draft gas unit pulls combustion air from the room and vents up a Type B or single-wall flue by natural draft. In a closet it is a confined space, so it needs two combustion air openings sized to its input, plus front service clearance and the vent clearances off the plate. It cannot open into a bedroom, bathroom, or the closet inside one.
Direct-vent gas heater in a closet
A sealed-combustion or direct-vent unit takes all its air from outdoors through a sealed pipe and vents through a sealed pipe. It never touches room air, so the confined-space combustion-air math goes away and it is allowed next to or inside a sleeping or bathing space. You still owe it service clearance and the manufacturer's vent-termination clearances.
Electric heater in a closet
No burner, no flue, no combustion air at all. An electric tank needs only service access, the clearance to combustibles on its plate (usually zero), a drain pan where required, and an NEC disconnect. This is why interior closets, alcoves, and under-stair nooks almost always end up with electric units.
Gas plus a bedroom or bath means sealed combustion only
A standard gas water heater that draws combustion air from the room may not be installed in a bedroom, a bathroom, or a closet or storage space that opens into one, under the IFGC and IRC. The hazard is carbon monoxide: a heater that spills or backdrafts while someone sleeps or bathes is a killer, and a sleeping person cannot react. The only gas units allowed in or opening into those spaces are direct-vent or sealed-combustion heaters that take every bit of their air from outdoors through a sealed pipe. If the space is a bedroom or bath, the answer is electric or direct-vent, full stop.

The compliance check before you set the tank
Run this list against the closet and the heater's rating plate. Every item is something an inspector can and will measure, and every one of them has sunk an otherwise clean install. Read the plate first, because several of these numbers come off it and legally override the generic code values.
- Front working clearance: at least 24 inches of clear space in front of the access panels so a tech can pull the burner or an element. Measure the diagonal so the heater plus draft hood fits with the door closed.
- Clearance to combustibles: use the numbers on the rating plate, not a rule of thumb. A listed heater often lists zero to the sides and back, with a stated clearance for the single-wall vent connector, commonly 6 inches to wood.
- Confined-space test: input BTU/hr divided by 1,000, times 50, is the cubic feet the room needs to be unconfined. Any closet fails this, so a gas unit needs engineered combustion air.
- Two combustion air openings for a gas unit: one within 12 inches of the ceiling, one within 12 inches of the floor, each sized to the method you are using (interior room or outdoor).
- Free area, not gross size: size the openings by actual open area. Derate louvers (assume 25 percent for wood, 75 percent for metal) and subtract screen blockage.
- Vent and draft hood clearance: the flue and draft hood keep their listed clearance to the closet walls and ceiling, and the vent connector rises with proper pitch to the chimney or B-vent.
- Drain pan and pan drain where the code or the location requires one, routed to an approved point, plus the T&P discharge run down to within a few inches of the floor.
- Electrical disconnect for an electric unit: a means of disconnect within sight or a lockable breaker, per the NEC, and no extension-cord nonsense.
How the combustion-air numbers actually work
This is where most closet installs go wrong, so it is worth slowing down. A gas water heater burns fuel, and burning fuel needs oxygen and a way for the products of combustion to leave. In a big open basement the house leaks enough air to feed the flame and let the flue draft. Seal that heater into a closet and you have cut it off, so the code makes you bring air in on purpose. The method depends on where the air comes from.
The default and easiest method is two openings into an adjacent interior room that itself has enough volume. Each opening is 1 square inch of free area per 1,000 BTU/hr of the appliance input, with a 100-square-inch minimum. For a 40,000 BTU/hr heater, that is 40 square inches per opening, one high and one low. If there is a second gas appliance in the closet, like a furnace, you add their inputs together. Pulling air directly from outdoors lets you use smaller openings because outdoor air is denser and steadier: 1 square inch per 4,000 BTU/hr for two vertical ducts, or 1 square inch per 2,000 BTU/hr for two horizontal ducts. There is also a single-opening outdoor method at 1 square inch per 3,000 BTU/hr, but it needs clearance around the appliance and a full-size opening, so it is less common in a tight closet.
The violations that get red-tagged
These are the failures inspectors actually write up on closet installs, and what each one risks if it slips through. None of them are exotic. Most trace back to someone treating the closet like a piece of furniture footprint instead of a combustion appliance enclosure.
No combustion air openings on a confined gas unit
The most common and most dangerous. With no fresh air, the burner starves and the flue cannot draft, so combustion products, including carbon monoxide, spill back into the closet and the house. The heater may run sooty, the draft hood may show scorch marks, and a CO alarm will eventually go off, if there is one. This is a hard fail and a real poisoning risk.
Openings sized by gross louver, not free area
Someone cut a nice-looking louver and did not derate it, so a grille that looks like 40 square inches passes only 10. The heater is chronically short of air. It backdrafts on cold days when the chimney is cold, or when a bath fan or dryer depressurizes the house. Intermittent CO spillage is the hazard, and it is hard to diagnose because it only happens under the wrong conditions.
Gas atmospheric unit opening into a bedroom or bath
A flat code violation regardless of how well the air is sized. If that heater ever spills while someone sleeps or showers, the exposure is direct. The fix is not more louvers; it is switching to a direct-vent or sealed unit, or moving the heater. Inspectors know to look for this, and it fails on sight.
Front clearance blocked by the door or a washer
No red-flag safety hazard the day it is installed, but it makes service dangerous and encourages skipped maintenance. When the anode or an element needs to come out and there is no room to pull it, the next owner ignores it, the tank rots, and eventually it lets go. Some jurisdictions cite it under the accessibility and working-space requirements.
Combustible clearance ignored on the vent connector
Single-wall vent pipe run too close to wood framing or a shelf. The connector runs hot enough to pyrolyze wood over years and char it to a low ignition point. This is a slow-motion fire risk and a classic cause of attic and closet fires traced back to a water heater flue.
Clearance and air requirements by fuel and type
Line the three common closet heaters up side by side and the pattern is clear: combustion air is the dividing line, and sealed combustion is what buys a gas unit its way into tight or sensitive spaces. Front service clearance and plate-listed combustible clearance apply to all of them.
| Requirement | Gas atmospheric | Gas direct-vent / sealed | Electric |
|---|---|---|---|
| Combustion air openings | Two openings, sized to input (1 in² per 1,000 BTU/hr interior, less for outdoor) | None. All air comes from outdoors through a sealed pipe | None. No combustion at all |
| Allowed in bedroom or bath closet | No, prohibited by IFGC/IRC | Yes, sealed combustion is exempt | Yes, no combustion restriction |
| Front service clearance | ~24 in, plus room to pull the burner | ~24 in, plus room to pull the burner | ~24 in, plus room to pull elements and anode |
| Clearance to combustibles | Per rating plate; vent connector often 6 in to wood | Per rating plate; sealed vent runs cooler | Per rating plate, usually zero |
| Confined-space (50 cu ft/1,000 BTU) applies | Yes, any closet fails it and needs air | No, sealed unit is not drawing room air | No, does not apply |
| Venting in the closet | Natural-draft flue up a chimney or B-vent, clearances off the plate | Sealed concentric or two-pipe vent to outdoors | None |
The takeaway that saves the most grief: if the closet is interior, tight, or anywhere near a bedroom or bath, spec electric or a direct-vent gas unit from the start. Trying to make a cheap atmospheric heater legal in a hostile closet with louvers and ducts costs more than the price gap to a sealed unit and still leaves you with an appliance that can backdraft.

Frequently asked
How much clearance does a water heater need in front for service?
Plan on at least 24 inches of clear working space in front of the access panels. That is not a single hard number written in one code line the way combustion air is, but it comes out of two requirements working together. First, the manufacturer's installation manual lists a service clearance, and the listing on the rating plate is what the inspector enforces. Second, you physically need room to pull the burner assembly on a gas unit or to unscrew and swap a heating element on an electric unit, and both of those need roughly two feet of straight pull. A closet door that opens to a full 24-inch clear span in front of the heater satisfies almost every install. If the door is narrower than the heater or blocked by a washer, you are going to fight every future repair, and some inspectors will call it. Depth matters too: the heater plus its draft hood and vent connector has to sit inside the closet with the door able to close, so measure the diagonal, not just the floor footprint.
What is the 50 cubic feet per 1,000 BTU rule?
It is the test for whether a room counts as a confined space under NFPA 54 and the IFGC. Take the input rating of the gas appliance in BTU per hour, divide by 1,000, and multiply by 50. That is the minimum room volume in cubic feet for the space to be considered unconfined, meaning it has enough air on its own to feed combustion and draft. A 40,000 BTU/hr water heater needs 40 times 50, or 2,000 cubic feet. A room 8 feet tall would have to be 250 square feet of floor to clear that, which no closet does. So a water heater closet is almost always a confined space, and a confined space needs engineered combustion air brought in through openings. The rule assumes an average tight house; older leaky houses used to get away with less, but modern energy codes made houses tight enough that you cannot count on infiltration anymore.
How do I size the combustion air openings for a gas water heater in a closet?
The standard method is two openings, one high and one low, each sized at 1 square inch of free area per 1,000 BTU per hour of total input, when the openings communicate with an adjacent room or space of adequate volume inside the building. For a 40,000 BTU/hr heater that is 40 square inches of free area per opening. The low opening starts within 12 inches of the floor and the high opening within 12 inches of the ceiling, so the cool combustion air comes in low and any spilled flue gas or heat rises out the top. If the openings draw from outdoors instead of an interior room, the sizing changes: direct outdoor air through two openings is 1 square inch per 4,000 BTU/hr each (vertical ducts) or per 2,000 BTU/hr each (horizontal ducts), because outdoor air is denser and more reliable. Free area is the actual open hole, not the louver's outside dimension, so a louvered grille has to be upsized to hit the number.
Can a gas water heater go in a bedroom or bathroom closet?
Not an ordinary atmospheric-vent gas water heater, no. The IFGC and IRC prohibit installing a fuel-burning appliance that draws combustion air from the room in a sleeping room, a bathroom, a toilet room, or a storage closet that opens into any of those. The reason is carbon monoxide: a sleeping person cannot react to a heater that backdrafts and spills flue gas. There are exceptions, and they all come down to sealed combustion. A direct-vent water heater, which pulls all its combustion air from outdoors through a sealed pipe and vents through a sealed pipe, is allowed because it never touches room air. A unit installed in a dedicated enclosure with a solid weatherstripped self-closing door and all combustion air ducted directly from outdoors also qualifies. Electric water heaters have no combustion at all, so they are not covered by this restriction and can go in a bedroom or bathroom closet freely, subject only to clearance and access rules.
Do louvered doors count as combustion air openings?
They can, but you have to derate them. A combustion air opening is sized by free area, the actual open cross-section that air passes through. A wood louvered door blocks a lot of its own gross area with the slats, so it passes roughly 20 to 25 percent of the panel's overall size as free area. A metal louver does better, around 60 to 75 percent. If you do not know the free area, the code lets you assume 25 percent for wood and 75 percent for metal. So a wood louvered section that needs to deliver 40 square inches of free area has to measure about 160 square inches of gross louver. A common mistake is cutting a small decorative louver into a closet door and calling it combustion air; measure the free area and do the math. And you still need two openings, one high and one low, not a single louver band in the middle of the door.
What clearance to combustibles does a water heater need?
It is listed on the rating plate, and that number governs. Most atmospheric gas water heaters are listed for zero clearance to combustible walls on the sides and back and require only the clearance to combustibles shown for the top and the vent connector, often 6 inches from a single-wall vent pipe to wood framing. Because the appliance is listed and tested, that plate value legally overrides the general 6-inch rule you would otherwise apply to an unlisted appliance. The floor is the other consideration: a gas water heater installed in a garage or on a combustible floor may need a listed base or an 18-inch flammable-vapor elevation, though that elevation rule is about ignition of gasoline vapors in a garage, not closet clearance. Electric water heaters run cool on the outside and typically list zero clearance all around, which is why they tuck into tight closets without an air or combustible-clearance problem. When in doubt, read the plate, not a forum post.
Does an electric water heater need combustion air or clearance like a gas one?
No combustion air, because there is no flame and no flue. An electric water heater has no burner, no draft hood, and no vent, so the entire body of confined-space combustion-air code does not apply to it. That is the single biggest reason people put electric heaters in interior closets, alcoves, and even under-stair spaces where a gas unit would be illegal. What an electric unit still needs is service access and any clearance to combustibles printed on its rating plate, which is usually zero or a small number, plus enough room to remove the elements and the anode. You also still need to handle the drain and any required pan and pan drain under it, and a disconnect within sight of the heater or a locking breaker per the NEC. So the closet gets much simpler with electric, but it does not become rule-free.