Running Power to a Detached Garage, Shed or Barn
Updated 2026-08-16 · 8 min read
Jump to a section▾
Powering a detached garage, shed, barn or shop is a bigger job than powering another room, because the NEC treats a separate structure differently. Three requirements come with it that don't apply inside the same building:
- A disconnecting means at the separate structure
- A grounding electrode system at that structure
- A four-wire feeder, with neutral and ground kept separate
Plus a physical problem: getting the conductors there, and the voltage drop that comes with distance.
What a detached building adds
| Requirement | Detail |
|---|---|
| Feeder conductors | Four-wire: two hots, neutral, equipment ground |
| Grounding electrode | The building needs its own — typically ground rods |
| Neutral-ground bond | Separated at the detached panel; bonded only at the service |
| Disconnecting means | Required at or in the separate building |
| Burial depth | Depends on wiring method and whether it is under a driveway |
| Voltage drop | Often decides conductor size before ampacity does |
| GFCI | Required for receptacles in the building |
The three-wire feeder with a bonded neutral, once permitted for outbuildings, is no longer allowed for new work. If an existing detached building has one, that is a known upgrade item.
Requirement 1: A disconnect at the building
The code requires a means of disconnecting all ungrounded conductors supplying a separate building or structure, located at the building — either where the feeder enters, or at a readily accessible location nearby.
Why: someone working in that building, or responding to an emergency there, must be able to kill its power without walking back to the main house.
How it's usually satisfied: a subpanel with a main breaker at the detached structure. That's why detached-building subpanels typically use a main breaker rather than main lugs — see main breaker vs main lug.
The disconnect must also be readily accessible and have proper working clearance — see electrical panel working clearance requirements.
Requirement 2: A grounding electrode system
The detached structure needs its own connection to earth — a grounding electrode system — bonded to the equipment grounding conductor arriving from the main building.
Ground rods are the usual electrode. Where rods are used, the code generally requires two rods spaced apart, unless a single rod is demonstrated by measurement to meet the resistance threshold. Other electrodes — a concrete-encased electrode in the slab, a metal underground water pipe — may be available and, where present, generally must be used.
Important: this electrode system does not replace the equipment grounding conductor. Earth is not a fault-current path. The grounding conductor from the main building is what clears faults; the electrodes serve a different purpose. Both are required.
Requirements vary with soil conditions and local amendments — this is one to confirm with your inspector.
Requirement 3: A four-wire feeder
Two ungrounded conductors, a neutral, and an equipment grounding conductor. Neutral and ground stay separate the entire way, and at the detached building's panel the neutral bar is isolated and grounds land on a separate bonded bar.
The historical wrinkle: older code editions permitted a three-wire feeder to a detached structure, with the neutral bonded there, under limited conditions — essentially treating the outbuilding like a second service. That allowance was removed. New work requires the separate equipment grounding conductor.
If you have an existing three-wire feeder to an outbuilding, it may have been compliant when installed. It's worth discussing with an electrician, particularly if you're adding load or if there's any metallic path (a water line, a fence, a phone or data cable) between the buildings — those create parallel neutral paths, which is exactly the problem the change was made to eliminate.
Full explanation of why the separation matters: subpanel grounding and neutral separation.
How do you run power to a detached building?
Underground is the usual choice — protected from weather, out of the way, no clearance issues.
- Burial depth depends on the wiring method: direct-burial cable, PVC conduit, and rigid metal conduit all have different minimum cover requirements, with reductions available for certain circuits and locations. The NEC's burial table governs. Work from the table for your specific method rather than a remembered number — this is one where "I think it's about two feet" produces a failed inspection at best.
- Conduit vs direct burial. Conduit costs more and is far easier to live with — you can pull new or larger conductors later without digging. On a run you might upgrade someday (and garage feeders usually get upgraded), conduit is worth it. Size it generously.
- Warning tape above the run is required in some circumstances and is good practice regardless.
- Call before you dig. Locate existing utilities before trenching. In the US that's the 811 service, and it's free.
- Expansion fittings may be required where PVC conduit emerges from the ground, depending on the temperature range.
Overhead is sometimes simpler where trenching is impractical.
- Clearance requirements apply — above grade, above driveways, from windows, doors, decks and roofs. They're specific and non-negotiable.
- Support and attachment requirements apply at both ends.
- More exposed to weather and physical damage over time.
How does distance affect wire size to an outbuilding?
On a long run, voltage drop usually determines conductor size rather than ampacity.
Ampacity keeps the conductors from overheating. Voltage drop is about whether the equipment at the far end gets usable voltage. Excessive drop makes motors run hot and start badly, dims lighting, and reduces the output of heating equipment.
The NEC treats voltage drop as a recommendation rather than a hard requirement for most feeders, but it's a genuine design consideration and the remedy is upsizing the conductors — which is cheap at install time and expensive later.
Tell your electrician the run length. It changes the answer, often by more than one conductor size.
What size feeder does a detached garage need?
Same method as any subpanel — see how to size a subpanel:
- Calculated load for everything the building will supply
- Feeder breaker at or above that
- Conductors from the NEC ampacity tables for the specific installation, then checked against voltage drop
And check the whole-house calculation first. A detached-building feeder adds load to the same service. Use the home electrical load calculator.
Size generously. Detached buildings acquire loads — an EV charger, a heater, a compressor, a freezer. Trenching twice is far worse than trenching once with bigger conduit.
If EV charging is in the plan, it's a continuous load at 125% — see the Level 2 charger breaker size calculator and detached garage EV charger.
Inside the building
- GFCI protection for receptacles — garages, and outdoor and damp locations, require it, and the scope has expanded over recent code cycles. Confirm against your adopted edition. See GFCI outlet requirements by room.
- Damp and wet location devices and covers where applicable — an unheated outbuilding often isn't a dry location.
- Lighting on its own circuit, so a tripped tool circuit doesn't leave you in the dark.
- Layout and load planning — see adding a subpanel to a garage or workshop.
- Label the panel at install time. See how to label an electrical panel.
Does a detached building feeder need a permit?
Permitted and inspected work in essentially every jurisdiction, and it typically involves multiple inspection points — a trench inspection before backfilling being the one people forget. Backfill before the inspector sees the trench and you may be digging it out again.
There may also be zoning or setback considerations for the structure itself, and utility notification requirements in some cases.
See panel upgrade permits and inspection and electrical work homeowners can legally do. This is licensed-electrician work in nearly all cases.
The bottom line
A separate structure needs three things a same-building subpanel doesn't: a disconnecting means at the building, its own grounding electrode system bonded to the incoming equipment grounding conductor, and a four-wire feeder with neutral and ground kept separate — three-wire feeders are legacy only. Get burial depth from the NEC table for your specific wiring method, size conduit and conductors generously because voltage drop and future loads both push the same direction, and don't backfill the trench before the inspector has seen it.
Start with the home electrical load calculator.
Code reference
The requirements behind this guide, for looking up in your adopted edition:
- NEC 250.32 — buildings or structures supplied by a feeder, including the separate grounding electrode requirement
- NEC 225.31 — disconnecting means for the separate building
Code editions and local amendments vary by jurisdiction. Confirm the adopted edition with your AHJ before relying on any specific article.
Frequently asked questions
Ask AI about this
Open an AI assistant with a question grounded in this page.
