Shed Wiring Diagram: How to Run Power to a Shed or Outbuilding

Running electrical power to a shed, workshop, or outbuilding is a popular DIY project that dramatically increases the usefulness of the space. Whether you need lights, outlets, or power tools, this guide covers everything from planning to final connections: NEC requirements, underground cable installation, circuit planning, and complete wiring diagrams.

Planning Your Shed Electrical

Determine Your Power Needs

Before digging trenches or buying materials, list what you will power in the shed:

Basic shed (lights and a few outlets):

Workshop shed (power tools):

Heated/cooled shed:

Single Circuit vs Subpanel

Single circuit (simplest option):

Subpanel (recommended for workshops):

NEC Requirements for Outbuilding Wiring

Underground Feeder Cable (NEC 300.5)

Cable from the house to the shed must be buried underground (or run overhead on a pole):

Wiring Method Minimum Burial Depth
UF-B cable (direct burial) 24 inches
Conduit with THWN wire 18 inches (rigid metal) or 18 inches (PVC)
Under driveway 24 inches minimum (all methods)

GFCI Protection

All 120V outlets in a detached shed/outbuilding must be GFCI-protected (NEC 210.8).

Grounding

A detached building with a subpanel requires its own grounding electrode (ground rod). The subpanel must have separate neutral and ground bus bars (not bonded).

If running a single circuit (no subpanel), a ground rod may not be required if the circuit has an equipment ground conductor -- but check local code.

Disconnecting Means

If the shed has a subpanel, it must have a disconnecting means (main breaker or disconnect switch) at the shed.

Underground Cable Installation

Option 1: UF-B Cable (Direct Burial)

UF-B (Underground Feeder) cable is rated for direct burial without conduit:

  1. Dig a trench 24 inches deep (plus a few inches for the cable bed)
  2. Lay 2-3 inches of sand in the bottom of the trench for the cable bed
  3. Lay the UF-B cable in the trench -- do not pull or stretch it
  4. Lay detectable warning tape 12 inches above the cable
  5. Backfill with sand, then native soil
  6. At each end (house and shed), transition to conduit using an LB fitting
  7. Run conduit up the wall to the panel or junction box

UF-B limitations: It cannot be run inside walls or in conduit for long distances (it is designed for direct burial only). At each building, transition to NM (Romex) or THHN in conduit.

Option 2: Conduit with THWN Wire (Recommended)

Running PVC conduit with individual THWN wires is more versatile and allows future upgrades:

  1. Dig a trench 18 inches deep (for Schedule 40 PVC)
  2. Lay Schedule 40 PVC conduit in the trench with proper fittings (elbows, couplings)
  3. Glue all joints with PVC cement
  4. At each end, use a 90-degree sweep to bring the conduit up the wall
  5. Pull THWN wires through the conduit
  6. Backfill the trench

Advantages of conduit:

Conduit Sizing

Feeder Size Minimum Conduit
12 AWG (20A single circuit) 3/4 inch PVC
10 AWG (30A) 3/4 inch PVC
6 AWG (60A subpanel) 1 inch PVC
3 AWG (100A subpanel) 1-1/4 inch PVC

Wiring Diagram: Single 20A Circuit to Shed

Materials

Connections

At the house panel:

  1. Install a 20A GFCI breaker (or standard breaker + GFCI first outlet in shed)
  2. Connect black wire to the breaker
  3. Connect white wire to the neutral bus
  4. Connect ground to the ground bus

At the shed:

  1. Bring the cable into the shed through conduit and an LB fitting
  2. Connect to the first outlet (GFCI if not using a GFCI breaker)
  3. Daisy-chain additional outlets in parallel
  4. Wire lights to a switch from the same circuit

Wiring Diagram: 60A Subpanel to Shed

Materials

Connections

At the house panel:

  1. Install a 60A double-pole breaker
  2. Connect black and red wires to the breaker terminals
  3. Connect white wire to the neutral bus
  4. Connect green/bare wire to the ground bus

In the trench:

  1. Run 1-inch PVC conduit from house to shed (18 inches deep)
  2. Pull four 6 AWG THWN wires: black, red, white, green

At the shed subpanel:

  1. Connect black and red wires to the main lugs (or main breaker)
  2. Connect white wire to the NEUTRAL bus bar
  3. Connect green wire to the GROUND bus bar
  4. Do NOT bond neutral and ground -- they must be on separate bus bars
  5. Drive an 8-foot ground rod outside the shed
  6. Run a #6 bare copper wire from the ground rod to the subpanel ground bar

Branch circuits in the shed:

Overhead Power to a Shed

If trenching is not practical, you can run power overhead:

Common Shed Wiring Mistakes

  1. Not deep enough trench: 24 inches for UF-B, 18 inches for conduit. Measure carefully.
  2. Using indoor cable underground: NM (Romex) is NOT rated for direct burial. Use UF-B or THWN in conduit.
  3. Bonded neutral/ground in subpanel: The subpanel must keep neutral and ground separate.
  4. No ground rod: A detached building with a subpanel needs its own grounding electrode.
  5. Undersized feeder: Plan for future loads, not just current needs. Run a larger feeder now -- it is much cheaper than re-digging later.
  6. No GFCI: All shed outlets need GFCI protection.
  7. No permit: Most jurisdictions require a permit for running power to an outbuilding. Get it inspected.

Creating Shed Wiring Diagrams

Plan your shed electrical system with CircuitDiagramMaker. Draw the complete layout from the house panel through the underground run to the shed subpanel and branch circuits. Label wire gauges, burial depths, and GFCI locations. Export as a PDF for your permit application or for reference during installation.

Try the AI circuit generator -- describe "shed subpanel wiring with underground conduit from main panel" and get a complete diagram.

Wire Color Reference for Shed Circuits

Before you connect anything, confirm every conductor color matches its role. Mixing this up is one of the fastest ways to create a dangerous shed circuit.

Color Conductor Role
Black Hot (ungrounded) Primary hot conductor on a 120V circuit
Red Hot (ungrounded) Second hot leg on a 240V circuit, or a switched leg
White or gray Neutral (grounded conductor) Carries return current; never used as a hot except when re-identified with tape
Green or bare copper Equipment ground Connects to the ground bus and ground rod; carries no current under normal conditions

These colors follow US NEC convention. If you are wiring to BS 7671 (UK/EU) instead, the scheme is different: brown is line, blue is neutral, and green/yellow stripe is earth. Do not mix NEC-colored and BS 7671-colored cable in the same run -- the colors mean different things in each system, and a blue conductor is neutral under NEC but line under BS 7671.

Testing the Circuit Before Energizing

Do not flip the breaker the first time until you have verified the installation with a meter. This catches wiring mistakes before they become a fire, a shock hazard, or a tripped breaker that hides a real fault.

  1. Disconnect the circuit at the house panel before touching any connections, and verify with a non-contact voltage tester that the wires are dead.
  2. Check continuity on the feeder conductors with a multimeter set to continuity or resistance mode, one wire at a time, to confirm there are no breaks or shorts introduced during the pull.
  3. Check for shorts between conductors: with the circuit still disconnected, measure resistance between hot and neutral, hot and ground, and neutral and ground. Each pair should read as an open circuit (no continuity). Continuity where there should be none means a nicked wire or a wiring mistake at a box.
  4. Verify polarity at each outlet once the circuit is wired but still off, using continuity checks back to the panel to confirm black lands on hot, white on neutral, and ground on the ground bus.
  5. Energize the circuit and test each outlet with a plug-in outlet tester or a voltage tester. A correctly wired outlet reads approximately 120V between hot and neutral, 120V between hot and ground, and 0V between neutral and ground.
  6. Trip-test the GFCI using its built-in test button and confirm the outlet (or downstream outlets on the same GFCI) loses power, then resets cleanly.

Troubleshooting Shed Circuit Problems

Symptom Likely Cause Fix
GFCI trips immediately or repeatedly Moisture in a junction box, a nicked conductor, or a ground fault in the underground run Inspect every box for water intrusion, check the cable for damage, test insulation resistance on the feeder
No power at the shed at all Tripped or off breaker at the house panel, a loose lug, or a broken conductor in the trench Check the breaker first, then test continuity of each feeder conductor from panel to shed
Lights dim when a tool or heater starts Undersized wire gauge for the run length, causing excessive voltage drop Recalculate voltage drop for the actual distance and load, upsize the conductor if it exceeds about 3% drop
Outlet has power but the GFCI won't reset Line and load terminals reversed on the GFCI device Re-terminate with the incoming feed on LINE and any downstream outlets on LOAD
Power cuts out intermittently Loose wire nut or terminal, or corrosion in a junction box Open and inspect every splice, replace with waterproof, gel-filled connectors in exposed boxes

Conclusion

Running power to a shed transforms it from simple storage into a functional workspace. Whether you choose a single circuit for basic lighting or a full subpanel for workshop use, proper planning, code-compliant installation, and inspection ensure a safe, reliable electrical system that serves you for years.


Plan shed electrical runs with CircuitDiagramMaker -- free online wiring diagram tool with panel, conduit, and grounding symbols.

Shed Wiring Diagram — circuit diagram showing component connectionsMainOutlet 1Outlet 2SwitchLight230V AC UtilityBasic Wiring Diagram
Shed Wiring Diagram — open the interactive version of this diagram to customise and export it.
12X16 Shed Wiring Diagram — circuit diagram showing component connectionsMainOutlet 1Outlet 2SwitchLight230V AC UtilityBasic Wiring Diagram
12x16 Shed Wiring Diagram — open the interactive version of this diagram to customise and export it.
Simple Shed Wiring Diagram — circuit diagram showing component connections+-BatterySwitchR1LEDBasic Circuit
Simple Shed Wiring Diagram — open the interactive version of this diagram to customise and export it.

Frequently asked questions

Do I need a permit to run electricity to a shed?

Most jurisdictions require a permit for any circuit run from a house panel to a detached structure, even a simple 20A run. The inspector checks trench depth, cable type, GFCI protection, and grounding before you backfill. Skipping the permit can void insurance coverage if a wiring-related fire or injury happens later, so check with your local building department before digging.

Can I run shed power through an existing sprinkler or low-voltage conduit?

No. Line-voltage conductors (120V or 240V) must be installed in their own conduit or as direct-burial UF-B cable, separated from low-voltage wiring such as sprinkler valves or landscape lighting. Sharing a conduit risks insulation damage and induced voltage on the low-voltage circuit, and it does not meet NEC separation requirements.

How far can I run a 20A circuit to a shed before voltage drop becomes a problem?

With 12 AWG copper, voltage drop generally stays under 3% up to roughly 100 feet at typical shed loads, but longer runs need larger conductors. Beyond about 100-150 feet, upsizing to 10 AWG or running a subpanel with heavier feeder wire keeps voltage drop low enough that lights and motors run properly.

Is it safe to use an extension cord to power a shed instead of a permanent circuit?

Extension cords are not a code-compliant or safe long-term power source for a shed. They are not rated for burial, degrade with UV and moisture exposure, and lack the fixed overcurrent protection a permanent circuit provides. Use them only for temporary tool power, never as the shed's main supply.

What size breaker do I need for a shed subpanel?

Breaker size depends on the shed's total calculated load, not a fixed number. A basic lighting-and-outlet shed often works fine on a 20A single circuit, while a workshop with power tools typically needs a 60A subpanel, and a heated or heavily equipped shed may need 100A. Size the feeder conductor to match the breaker, such as 6 AWG copper for 60A.

Can I bond neutral and ground in a shed subpanel like I would in a main panel?

No. A detached shed subpanel fed from the house must keep neutral and ground on separate, isolated bus bars, unlike a service-entrance main panel where they are bonded. Bonding them in a subpanel creates a parallel path for neutral current over the equipment ground and grounding electrode, which is a code violation and a shock hazard.

Interactive diagrams for this guide

Related guides