
IRC R328 Energy Storage Systems: Home Battery Rules
IRC Section R328 governs home battery systems, like a solar backup battery. Each unit is capped at 20 kWh, and the total in an indoor utility space is capped at 40 kWh. Batteries must be listed to UL 9540, kept out of bedrooms, and spaced about 3 feet apart.
Home batteries showed up on Arizona roofs and garage walls faster than the building code could keep pace. The 2021 IRC caught up with Section R328, the first version of the residential code to set specific rules for a stationary battery like a Tesla Powerwall or an Enphase system. It controls how big the battery can be, where it can go, and how it has to be tested.
What R328 requires
R328 starts with a listing. A home energy storage system (ESS) has to be listed and labeled to UL 9540, the safety standard for the whole battery unit. From there the code caps the size. A single ESS unit can be no larger than 20 kWh, and the total inside an indoor spot like a utility closet, basement, or storage room is capped at 40 kWh. An attached or detached garage, or a detached accessory structure, doubles that ceiling to 80 kWh. The units also have to sit at least 3 feet apart, unless the maker's UL 9540A fire test shows a shorter distance is safe.
Where a battery can and cannot go
Location is the heart of R328, because a battery fire is hard to put out. The code keeps batteries out of the spaces where people sleep. Here is the core limit:
ESS shall not be installed in sleeping rooms, or closets or spaces opening directly into sleeping rooms
Allowed spots are the ones you would expect: an attached or detached garage, a dedicated utility closet, a basement, a storage or utility room, or outside on an exterior wall or a ground mount. Outdoor units have to keep clearance from doors and windows so a fire cannot vent straight into the house.
What it means for an Arizona custom home
For example, a Fountain Hills home adding rooftop solar often pairs it with two Powerwalls at 13.5 kWh each, mounted on the garage wall. That is two units of 27 kWh total, so it clears the 20 kWh per-unit cap and fits the garage. The pair either keeps the 3 foot spacing or mounts closer, which the Powerwall's UL 9540A fire test allows. Arizona homeowners add batteries for two reasons: backup power when summer heat strains the grid or a monsoon storm drops a line, and savings on time-of-use electric rates. The garage wall is their common home because R328 pushes the battery out of the bedrooms and hallways.
Which edition applies to your build
This is one section where the edition really matters. R328 is new in the 2021 IRC. It did not exist in the 2018 IRC. If your city still enforces the 2018 code, your battery is governed instead by the electrical provisions, the maker's instructions, and the fire standard NFPA 855, which cover much of the same ground. Because Arizona cities adopt different editions, check what your AHJ enforces on the Arizona building code editions by city page before you plan the install.
How this connects to the rest of your build
A storage battery is the back half of a solar project, so R328 works with the rooftop solar rules of R324 and the same city solar permits, such as the Scottsdale solar PV permit or the Maricopa County solar PV permit. Since the garage is the usual location, it also overlaps the garage rules of R309. If an HOA and its CC&Rs are in the picture, see whether an HOA can stop you from putting solar on your house. The full section is R328 of the 2021 IRC.
Keep exploring
More in this module
Neighbouring rules that govern the same work.
Related questions

Begin Your Build
Relax while we manage every detail, throughout the entire process. Tell us about your vision, and we'll be in touch to schedule a consultation.
