Detached Garage Electrical Code: Essential Rules for Safe Wiring in 2025
Planning the electrical system for a detached garage is one of those projects that feels straightforward until you're standing in the trench aisle of a home improvement store, staring at three different gauges of wire and wondering why the inspector cares so much about a single ground rod. The truth is that detached garage electrical code exists for good reason: a separate structure introduces variables that a house's attached wiring never has to deal with, from voltage drop over long runs to the fact that a garage sits on its own footing and therefore its own grounding system. Get it right, and you'll have a workshop, EV charging station, or man cave that's safe and fully permitted. Get it wrong, and you're looking at failed inspections, voided insurance claims, or worse.
This guide walks through the practical realities of wiring a detached garage to code, focusing on the National Electrical Code (NEC), which most U.S. jurisdictions adopt with local amendments. We'll cover feeder sizing, subpanel requirements, grounding and bonding rules, receptacle and lighting placement, GFCI protection, and the permitting process. Whether you're running a single 20-amp circuit for a couple of outlets or a 100-amp feeder for a full shop, understanding these rules before you pick up a shovel will save you time, money, and a lot of frustration.
Feeder Sizing and Subpanel Basics
The single most common question about detached garage wiring is how much power the structure actually needs. The NEC does not mandate a minimum amperage for a detached garage feeder, but it does require that any garage with electrical power have at least one 120-volt, 20-amp branch circuit for receptacles. In practice, almost nobody stops there. A detached garage with a subpanel gives you the flexibility to run lighting, outlets, a garage door opener, a compressor, a welder, or an EV charger without daisy-chaining everything onto one overloaded circuit.
Feeder size depends on two things: the load calculation for everything you plan to run, and voltage drop over the distance from the main panel to the subpanel. A 60-amp feeder is often the practical minimum for a working garage, while 100 amps has become the modern standard for anything with a welder, air compressor, or future EV charger. Aluminum SER or copper THHN in conduit are the usual choices, and the wire must be rated for the installation method, whether that's buried in PVC conduit, run overhead, or fished through an attic.
Calculating Load for a Detached Garage
The NEC allows a simplified approach for detached garages using Table 220.12, which assigns a general lighting load of 1 volt-ampere per square foot for garages, plus the nameplate ratings of any fixed appliances. In practice, most electricians take a more conservative route: add up the largest motor load, the lighting, and any continuous loads, then apply demand factors. A 24-by-24-foot garage with LED lighting, a 240-volt welder, and a 3-horsepower compressor will comfortably fit on a 60-amp feeder, but adding a 48-amp EV charger pushes you into 100-amp territory.
It's also worth thinking about future capacity. Running a 100-amp feeder costs marginally more than a 60-amp feeder in materials but saves an enormous amount of labor if you later decide to add a mini-split, a kiln, or a second EV charger. Oversizing the feeder and subpanel now is one of the few places in electrical work where spending more upfront genuinely pays off, because upgrading later means re-trenching and re-pulling wire.
Subpanel Installation Requirements
A subpanel in a detached garage must be fed by a feeder that includes an equipment grounding conductor, and the neutral bar in that panel must be isolated from the enclosure and from the grounding bar. This is a critical difference from a main service panel, where neutral and ground are bonded together. In a subpanel, bonding neutral to ground creates a parallel return path for current and is a code violation under NEC 250.24(A)(5).
The subpanel also needs a main disconnect if it's in a separate structure, per NEC 225.31 and 225.33. That can be a main breaker in the subpanel itself, a disconnect switch ahead of it, or a breaker in the main panel marked as the disconnect for the garage. Most people simply buy a main-breaker panel and use that as the disconnect. Labeling matters too: the feeder breaker in the main panel should be clearly marked as feeding the detached garage so anyone working on the system later knows what they're dealing with.
Grounding, Bonding, and the Ground Rod Rule
Grounding a detached garage is where a lot of DIY installations go sideways. The NEC treats a detached structure with a feeder as a separate building, which means it typically needs its own grounding electrode system. That usually means one or two ground rods driven at the garage, bonded to the subpanel's grounding bar with a properly sized grounding electrode conductor. The equipment grounding conductor run with the feeder does not replace the ground rod, and the ground rod does not replace the equipment grounding conductor. You need both.
There is one notable exception: if the detached garage is fed by a single branch circuit only, meaning no subpanel, the NEC permits the equipment grounding conductor to serve as the grounding path without a separate ground rod, provided the circuit meets certain conditions. Once you install a subpanel, however, the ground rod requirement kicks in. This is one of the most frequently misunderstood rules in residential electrical work, and inspectors check for it constantly.
Ground Rod and Electrode Conductor Sizing
Ground rods must be at least 8 feet long and driven to a depth of at least 8 feet unless bedrock prevents it, in which case they can be driven at an angle or buried in a trench. The grounding electrode conductor connecting the rod to the panel is sized per NEC Table 250.66 based on the largest ungrounded feeder conductor. For a typical 100-amp feeder using 2 AWG copper, that's an 8 AWG copper conductor, though many electricians use 6 AWG for a little headroom.
The connection to the ground rod must use an approved clamp, typically bronze or copper, and the conductor must be mechanically protected where it's exposed. A common installation runs the grounding electrode conductor through the wall in Schedule 80 PVC or EMT to protect it from damage, then down to the rod. If you drive a second rod, the two must be bonded together with a conductor sized per code, and the rods must be at least 6 feet apart to be effective.
Neutral and Ground Separation in the Subpanel
Inside the subpanel, the neutral conductors terminate on the isolated neutral bar, and all equipment grounding conductors terminate on the grounding bar that's bonded to the enclosure. If the panel you bought only has one bar, you'll need to buy an accessory ground bar kit and install it, keeping the neutral bar isolated on its plastic standoffs. Do not install the green bonding screw that comes with many panels; that screw is only for main service panels.
This separation matters because it prevents neutral current from traveling on the equipment grounding system, which could energize metal enclosures and create a shock hazard. It also keeps fault current on the intended path back to the source so that breakers trip properly. If you're ever unsure whether a panel is set up correctly, a quick continuity test between the neutral bar and the enclosure will tell you: in a subpanel, there should be no continuity.
Receptacles, Lighting, and GFCI Protection
Garages are considered damp, high-risk locations by the NEC, which is why they carry stricter requirements for receptacles and GFCI protection than most other rooms in a house. Every 125-volt, single-phase, 15- and 20-amp receptacle in a garage must have GFCI protection, whether it's in an attached or detached garage. That includes outlets on the ceiling if you have one up there for a garage door opener. The rule is straightforward and non-negotiable.
Receptacle placement is largely a design choice, but code requires at least one 20-amp branch circuit for garage receptacles, and that circuit cannot serve anything outside the garage except for a readily accessible outlet for snow removal equipment or similar. Lighting must be provided, and while the code doesn't specify a minimum number of luminaires, good practice is to provide enough light to work safely, which usually means more than the single bare bulb many older garages have.
GFCI Requirements and Exceptions
GFCI protection can be provided at the breaker, at a receptacle, or through a combination of both, but it must protect every receptacle in the garage. The exception that allows a dedicated single receptacle for a freezer or refrigerator to skip GFCI protection in some jurisdictions is not universally adopted and generally does not apply to garages anyway. Assume that every 120-volt outlet in a garage needs GFCI, and you'll be on solid ground.
For 240-volt outlets, such as those for welders, EV chargers, or large compressors, GFCI requirements depend on the specific equipment and the code cycle your jurisdiction follows. The 2020 and 2023 NEC expanded GFCI requirements to include many 250-volt receptacles in garages, though there are exceptions for specific appliances. If you're installing a 240-volt circuit, check with your local AHJ (authority having jurisdiction) because this is an area where local amendments vary significantly.
Lighting and Switch Placement
NEC 210.70(A)(2) requires at least one wall-switch-controlled lighting outlet in a garage, and that switch must be at the usual point of entry. For detached garages, many homeowners add a second switch at a side door or a three-way setup so they can turn lights on from multiple entry points. LED shop lights have made it cheap and easy to get excellent illumination without loading up the circuit, and most garages can be well-lit on a single 15-amp circuit with modern fixtures.
If you're running a subpanel, put the garage lighting on its own circuit separate from the receptacles. That way, if a tool trips a breaker in the middle of a project, you're not suddenly plunged into darkness. It's a small design decision that pays off every time you're working after sunset. Exterior lighting on the garage is also worth considering, both for security and for the practical benefit of lighting a driveway or walkway.
Wiring Methods, Burial Depth, and Inspection
How you get power from the house to the garage matters as much as what you do once it arrives. Direct burial cable, PVC conduit with individual conductors, and overhead runs are all legitimate methods, each with its own code requirements and practical trade-offs. Burial depth, conduit type, and physical protection are the details that inspectors focus on, and they're the details that are hardest to fix after the fact.
Permits and inspections are not optional in most jurisdictions, and skipping them is a fast way to create problems when you sell the house or file an insurance claim. The inspection process for a detached garage typically involves a rough-in inspection before drywall or backfill, and a final inspection once everything is terminated and labeled. Knowing what the inspector will look for ahead of time makes the process smooth rather than adversarial.
Burial Depth and Conduit Choices
NEC Table 300.5 specifies minimum cover requirements for buried conductors. Direct burial cable typically requires 24 inches of cover, while conductors in rigid metal conduit or intermediate metal conduit can be as shallow as 6 inches under certain conditions. PVC conduit usually requires 18 inches, and the rules change depending on whether the location is under a driveway, a lawn, or a building. Running conduit the entire distance is more expensive than direct burial cable, but it makes future upgrades dramatically easier.
If you use PVC conduit, use Schedule 40 for the buried portion and switch to Schedule 80 where it emerges from the ground, since UV exposure and physical damage are real concerns above grade. Pulling individual THHN or XHHW conductors through conduit also gives you the option to upsize later by pulling new wire, provided the conduit is large enough. A 1.5-inch or 2-inch conduit is a common choice for a 100-amp feeder, leaving room for future circuits.
Permits, Inspections, and Labeling
Pull an electrical permit before you start, and expect the inspector to check feeder size, breaker rating, grounding electrode system, GFCI protection, and panel labeling. The rough-in inspection happens before you backfill the trench or close up walls, so don't skip ahead. Keep your trench open until the inspector has seen the conduit and depth, and leave the subpanel accessible with covers off for the rough inspection if that's what your jurisdiction requires.
Labeling is a small detail that inspectors notice. Every breaker in the subpanel should be identified, the feeder disconnect should be marked, and any 240-volt receptacles should be labeled with their voltage and amperage. A neatly labeled panel signals that the work was done thoughtfully, and it makes future troubleshooting much easier for you or anyone who works on the system later.
Wiring a detached garage to code is ultimately about respecting the fact that you're building a small, separate electrical system with its own grounding, its own protection, and its own set of risks. The rules exist because garages combine moisture, metal tools, concrete floors, and often a fair amount of amateur enthusiasm, which is a combination that has burned down more than a few outbuildings. Take the time to size the feeder correctly, install the ground rod, keep neutral and ground separate in the subpanel, and protect every receptacle with GFCI. When you're ready to start, call your local building department, confirm the code cycle your jurisdiction follows, and pull the permit. Then invite a licensed electrician to review your plan before you dig, because a second set of eyes on the feeder calculation and grounding scheme is the cheapest insurance you'll ever buy for a project that's meant to last decades.