How to Run Electricity to a Shed: A Complete Step-by-Step Guide
Running electricity to your shed is one of the best upgrades you can make to an outbuilding. Whether you want to power a workshop, charge tools, add lighting, or turn your shed into a home office, having a reliable electrical supply transforms how useful the space actually is.
The good news is that wiring a shed for electricity is a manageable DIY project for many homeowners — as long as you understand the process, follow local codes, and know when to call a licensed electrician. This guide walks you through everything you need to know, from planning and permits to trenching, wiring, and final connections.
—
Step 1: Plan Your Electrical Needs Before You Start
Before you buy a single piece of wire, spend time planning exactly what you need. This step prevents costly mistakes and ensures you size the circuit correctly from the start.
How Much Power Do You Actually Need?
Start by listing every electrical item you plan to use in the shed:
- Lighting (LED fixtures typically draw very little power)
- Power tools (table saws, compressors, and welders can draw 15–20 amps each)
- Outlets for charging or general use
- Heating or cooling units
- A refrigerator or freezer
If you’re running a basic workshop with a few power tools and lights, a 20-amp, 120-volt circuit may be enough. If you plan to run heavy machinery, a welder, or a mini-split HVAC unit, you’ll likely need a 240-volt subpanel fed by a larger circuit from your main panel.
It’s almost always worth installing a small subpanel in the shed rather than running multiple individual circuits from the house. A subpanel gives you flexibility to add circuits later without another round of trenching.
Check Your Main Panel Capacity
Head to your home’s main electrical panel and check how many amps it’s rated for and how many open breaker slots you have. You need at least one available double-pole breaker slot for a subpanel feed. If your panel is full, you may need to add a tandem breaker or upgrade the panel — both jobs that require a licensed electrician.
If you’re just getting started with the details of how shed electrical systems work, the Shed Wiring Basics for Beginners (Complete Guide) is an excellent companion resource that covers circuit layouts and component choices in depth.
—
Step 2: Check Local Codes and Pull a Permit
This step gets skipped more than any other — and it’s the one that causes the most headaches later.
Most jurisdictions require a permit for any electrical work that involves connecting to your home’s main panel, running wire underground, or adding a subpanel. The permit process typically involves:
1. Submitting a basic plan or description of the work
2. Paying a small fee
3. Having the work inspected before you cover any wiring
Skipping the permit can cause serious problems when you sell your home, file an insurance claim, or if an electrical fault causes a fire. It’s simply not worth the risk.
Key code considerations include:
- **Wire type and burial depth** — Most codes require Schedule 40 PVC conduit or direct-burial UF-B cable. Burial depths vary: typically 24 inches for standard wire, 18 inches in conduit, and 12 inches under concrete slabs.
- **Disconnect switch at the shed** — The NEC (National Electrical Code) requires a means of disconnecting power at the outbuilding. A small subpanel with a main breaker fulfills this requirement.
- **GFCI protection** — All receptacles in a shed must be GFCI-protected per current NEC requirements.
- **Conduit at entry and exit points** — Where wire exits the ground and enters a structure, it must be protected by conduit.
Contact your local building department or check their website before starting. Many will walk you through the requirements over the phone.
—
Step 3: Choose Your Wiring Method — Underground or Overhead
There are two ways to get power from your house to your shed: run it underground or run it overhead. Each has trade-offs.
Underground Wiring (Most Common and Recommended)
Running wire underground is cleaner, more durable, and safer than overhead lines in most situations. There are two ways to do it:
Option A: Direct-Burial Cable (UF-B)
Underground Feeder cable, labeled UF-B, is rated for direct burial without conduit. It’s slightly less expensive upfront but offers no protection if you accidentally dig into it later. Minimum burial depth is typically 24 inches.
Option B: THWN Wire in PVC Conduit
Running individual THWN conductors inside Schedule 40 or Schedule 80 PVC conduit is the preferred method. The conduit protects the wire and allows you to pull new wire through later if needed — a major advantage. Burial depth in conduit is typically 18 inches.
Trenching tips:
- Mark all underground utilities before digging (call 811 in the US — it’s free)
- Dig in a straight line when possible
- Use a trenching spade or rent a power trencher for long runs
- Install a continuous run of conduit from the main panel to the shed subpanel with no buried splices
Overhead Wiring
Overhead runs are sometimes used when trenching is impractical (crossing a driveway, rocky terrain, etc.). Requirements include:
- Minimum clearance of 10 feet above ground for service entrances
- At least 12 feet clearance over driveways
- 18 feet clearance over public roads
- Proper weatherhead and service entrance fittings at both ends
Overhead runs require the use of SER or triplex aluminum service entrance cable. They’re also more vulnerable to weather damage and falling branches, and they can look unsightly. Underground is almost always the better long-term choice.
—
Step 4: Run the Wire and Install the Subpanel
With your trench dug and conduit laid, it’s time to pull wire and make connections.
Wire Sizing
Wire gauge depends on the breaker size and the length of the run:
| Breaker Size | Wire Gauge (Copper) | Max Run (Approx.) |
|—|—|—|
| 20A | 12 AWG | ~100 ft |
| 30A | 10 AWG | ~100 ft |
| 50A | 6 AWG | ~150 ft |
| 60A | 4 AWG | ~200 ft |
For longer runs, you may need to increase wire gauge to compensate for voltage drop. A general rule of thumb is to limit voltage drop to 3% or less. There are free voltage drop calculators online that make this easy to check.
Installing the Subpanel
A small 60-amp or 100-amp subpanel is typically a great choice for a shed. It gives you room to run separate circuits for lighting, outlets, and dedicated tool circuits. Here’s the basic installation sequence:
1. Mount the subpanel inside the shed near the entry point
2. Install a separate grounding electrode system at the shed (a ground rod driven 8 feet into the earth)
3. In a subpanel, the neutral and ground buses must be kept separate — this is a critical code requirement that differs from a main panel
4. Connect incoming wires: two hots to the main breaker lugs, neutral to the neutral bus, and ground to the ground bus
5. Install individual branch circuit breakers for your lighting and outlet circuits
Wiring Outlets and Lights
Inside the shed, use standard 14 AWG wire for 15-amp lighting circuits and 12 AWG for 20-amp outlet circuits. Run wire through the wall framing and use weatherproof boxes and covers. Install GFCI outlets or a GFCI breaker to protect all receptacles.
If you’re still in the planning phase for your shed, it’s worth thinking about your electrical layout at the same time as your overall building design. Check out these storage shed plans with loft for ideas on how to plan a shed interior that works well for both storage and a functional workspace.
—
Step 5: Make the Final Connection at the Main Panel
This is the most dangerous step in the entire project — and the one where most DIYers should seriously consider hiring a licensed electrician if they aren’t confident.
Working inside a main electrical panel means working around live wires that cannot be de-energized without contacting your utility company to pull the meter. Even with the main breaker turned off, the service entrance wires at the top of the panel remain live at all times.
If you’re comfortable doing this work safely, the process is:
1. Turn off the main breaker
2. Install the new double-pole breaker in an available slot
3. Connect the two hot wires to the breaker, neutral to the neutral bus, and ground to the ground bus
4. Turn the main breaker back on and test
If there’s any doubt, hire a professional for this final connection. The rest of the project — trenching, running conduit, installing the subpanel, wiring outlets — is well within DIY range for most people. This one step is the exception.
—
Step 6: Test Everything Before Closing Up
Once all connections are made, test the circuit before covering any wire or closing up your trench.
- Use a non-contact voltage tester to verify power at each outlet
- Test GFCI outlets by pressing the test and reset buttons
- Check that all lights function correctly
- Have the work inspected by your local building inspector if a permit was required
Only after passing inspection should you backfill the trench and cover any wiring in the walls.
—
How Much Does It Cost to Run Electricity to a Shed?
Costs vary significantly based on the distance from your house, local labor rates, and how much work you do yourself. Here are rough estimates:
- **DIY (materials only):** $400–$1,200 for a typical 50–100 ft run with subpanel
- **Hiring an electrician:** $1,000–$4,000+ depending on complexity and your location
- **Permit fees:** $50–$200 in most areas
The biggest cost drivers are the length of the trench run, the wire gauge required, and whether any panel upgrades are needed. Getting quotes from two or three licensed electricians is always a smart move even if you plan to DIY, since it gives you a cost benchmark and a second opinion on your plan.
If you’re building a new shed or upgrading an older one, this is also a great time to think about the overall condition and design of the building. Browse garden shed ideas and designs for inspiration on layouts that work well when wired for full electrical service.
—
Conclusion
Running electricity to a shed is a project that pays dividends for years. A properly wired shed with good lighting, protected outlets, and enough power for your tools dramatically expands what the space can do — from a simple storage area to a fully functioning workshop, hobby room, or home office.
The key is to plan carefully, respect local codes, size your wire correctly, and take the necessary safety precautions when working near live electrical panels. Get the permit, install a subpanel, run conduit underground, and protect every outlet with GFCI protection. Do it right once, and you won’t have to do it again.
If any part of the project feels beyond your comfort level — especially the final connection at the main panel — bring in a licensed electrician for that portion. It’s a small cost for significant peace of mind.
Frequently Asked Questions
Do I need a permit to run electricity to my shed?
In most jurisdictions, yes. Any electrical work connecting to your main panel or running underground typically requires a permit and inspection. Check with your local building department before starting. Skipping permits can create problems with insurance, home sales, and safety compliance.
How deep do I need to bury electrical wire going to a shed?
Depth depends on the method. Direct-burial UF-B cable typically needs to be buried at least 24 inches deep. Wire run inside Schedule 40 PVC conduit can be buried at 18 inches. Under concrete slabs, 12 inches is generally acceptable. Always verify with your local building code.
Can I use an extension cord to power my shed instead of wiring it?
Extension cords are not a safe or code-compliant permanent solution for powering a shed. They’re not designed for continuous outdoor use, can overheat under load, create tripping hazards, and don’t provide GFCI protection. A properly wired circuit is the only safe long-term option.
What size wire do I need to run from my house to my shed?
It depends on the load and the distance. For a basic 20-amp circuit under 100 feet, 12 AWG wire is sufficient. For a 30-amp circuit, use 10 AWG. For a subpanel feed of 50–60 amps, use 6 AWG or 4 AWG copper respectively. Always calculate for voltage drop on longer runs.
Related guides
Part of our How to Build a Shed: Step-by-Step Guides hub.
