This post contains affiliate links. As an Amazon Associate, we earn from qualifying purchases, at no extra cost to you.
We wanted to spend a January evening in the shed with actual lights on and a small space heater going, and we were done fumbling with a headlamp every time we needed the pliers. That got us pricing out the real cost to run electric to shed setups like ours, and the numbers online were, as always, all over the place.
Here is the short version we wish someone had told us up front. For a small shed sitting 40 to 100 feet from the house, doing the trenching yourself (with a permit and a licensed inspection) runs about $400 to $1,500. Hiring a licensed electrician for the same setup runs $1,000 to $3,800, with $2,500 being the number that kept coming up as the average across 2026 cost guides. Longer runs, bigger amperage, and rocky soil push it higher fast.
Now the longer version, because the range above hides a lot. If you are still figuring out what you want the shed to actually do, that answer changes what you need to run out there, which changes the number more than any other single thing.
The Short Answer, Top to Bottom
What most homeowners actually spend

The 2026 numbers from Angi, HomeGuide, and a pile of contractor forums basically all land in the same ballpark. Underground service runs $10 to $25 per linear foot when a pro handles the whole job, or $500 to $3,800 for a typical 50 to 150 foot run. Small runs with a modest 20-amp circuit and a shallow trench sit at the low end; a full 60-amp subpanel with a deeper trench, a longer run, and a permit fee lands mid-to-high.
DIY is where the savings live, and they are real: $400 to $1,500 covers materials for a small setup (wire, conduit, a subpanel or a single circuit, boxes, and the outdoor outlet). What you are paying an electrician for is the panel work at the house, the permit pull, and the labor to trench and pull cable. If any part of that gives you pause, hire it out for that part and DIY the rest.
What Actually Drives the Price
Distance, amps, and how ugly your dig gets

Distance is the thing that moves the price the most, by a mile. The farther the shed sits from the main panel, the more wire, more conduit, and more trench you are buying, and voltage drop starts nagging. Once a shed is past about 110 feet with a 60-amp load, you have to bump the feeder wire up a size to keep the voltage drop under 3 percent, which adds real dollars. For 100 feet expect the underground portion alone to run $1,000 to $2,500 through a pro, or $200 to $600 in materials if you dig it yourself.
Amperage is the next lever you’re pulling on. A single 20-amp circuit runs a couple of lights, a few outlets, and maybe a fan. That is the cheapest wiring you can do and often enough for a garden shed. Step up to a 30-amp subpanel and you can add a space heater or a bench grinder. A 60-amp subpanel is what you want if you plan to heat and cool the shed year-round or run bigger power tools; it is also what most of the online cost guides quote as their baseline.
Then the trench itself. Sandy soil is a Saturday. Clay is a weekend. Rock or roots become a rental (a walk-behind trencher runs $75 to $150 a day at Home Depot). Permit fees vary wildly by town, from $50 in some rural counties to $500 or more in stricter suburbs, with $150 to $300 being the number we saw most often.
Do It Yourself or Hire an Electrician
Where DIY makes sense (and where it stops)

The trenching, the conduit run, the outlet boxes inside the shed, and the mounting of a subpanel are all reasonable weekend DIY if you are handy and willing to read the code. The part we would not DIY unless we already have the skill: opening the main panel to land a new breaker. That is where mistakes get expensive, code-flagged, or worse. Most electricians will happily do the panel connection and inspection for a few hundred dollars if you present them with a finished, permit-approved trench and a labeled subpanel on the shed end.
Before the electrician shows up, we would deal with the shed floor too, especially if there is any moisture issue. Damp floors and electrical work are not a fun combination, and it is much easier to sort the floor before conduit and outlets are in the way.
One safety habit we would not skip: keep a non-contact voltage tester in your pocket the whole project. A Klein NCVT-3P tester like this one is a reputable 12 to 1000 volt AC noncontact tester, but silence from it does not prove a conductor is safe to touch. Klein itself tells you to verify the tester on a known live circuit before and after every use, and warns that voltage can be present without any indication. Treat it as a first check, not a last word, and leave actual contact with conductors to a qualified electrician using appropriate testing.
Above-Ground, Buried, or Overhead
The three ways power actually gets out there

Buried is what most of us end up doing, and it’s for real reasons: you don’t see it, storms don’t care about it, and it’s what the code wants for anything permanent. It is also the most work. If digging is a real problem (finished patio in the way, mature tree roots, ledge), an above-ground run in rigid conduit along a fence line is legal in most jurisdictions if the conduit is rated for outdoor use and protected from physical damage.
Overhead runs are the third option. Cheap, quick, and increasingly discouraged by local inspectors because a low overhead line becomes a tripping hazard the moment someone parks a truck under it. If you go this route, expect the inspector to want the wire at least 10 feet above walking areas and 18 above driveways. Family Handyman has a solid walk-through of the three routing options with photos of each that we referred back to more than once.
The Wire, the Breaker, and the Trench
What code wants (and what we would actually put in the ground)

Cable selection for a shed feeder is not a one-size recommendation, and we are not going to pretend otherwise. UF-B is the usual direct-burial choice, but the gauge, the breaker, and whether you need conduit all depend on your calculated load, the permitted ampacity at your terminations, voltage drop over your specific run, the burial method, and what your local inspector reads into the code. Southwire, the dominant UF-B manufacturer, limits UF-B ampacity to the 60 degree Celsius conductor column, which is stricter than people realize. Get a licensed electrician or your inspector to size the circuit before you buy the spool. A StockWire 125-foot roll of 6/3 UF-B copper cable like this one is the kind of cable a qualified design for a modest shed subpanel can end up specifying, but only after that math, not before it.
Trench depth is the piece people fight about most. The NEC baseline for direct-buried UF-B without any protection is 24 inches. Wrap the wire in schedule 40 PVC conduit and you can go 18 inches. Add GFCI protection on the circuit and you can go as shallow as 12 inches for direct burial. Under a driveway, add 6 more inches to whatever number applies. This Old House has a clear step-by-step on running underground power to a shed that walks the trench depths and conduit choices out visually if the numbers feel abstract.
Digging that trench without a rented trencher is very possible in soft soil. A VNIMTI trenching shovel with a four-inch V-blade and a 56-inch fiberglass handle like this one is built for cutting the narrow channel a buried cable actually needs, with the exact width and depth of your trench depending on the install and on locating any utilities already in the ground.
Permits: Yes, You (Almost Always) Need One
Running power to a permanent detached structure is a permitted job in nearly every US jurisdiction. Not because your town wants your money, but because an unpermitted electrical run to an outbuilding can void your homeowner insurance if something ever burns, and it turns into a nightmare disclosure item when you sell. Permit fees, again, land around $50 to $500 depending on where you live, plus the inspection itself which is often free or bundled into the permit.
Some counties waive the permit for a single 20-amp circuit off an existing exterior GFCI outlet (the “power to shed from outside socket” path some searchers are looking for), but do not assume that until you have called your building department. And even where it is technically allowed, we would still pull a permit for a subpanel installation. The inspector’s second set of eyes is cheap peace of mind on the connection at the main panel.
What We Would Put in a Shed-Wiring Cart
The pieces we would not skimp on

Beyond the wire, the trenching shovel, and the voltage tester we already covered, one more thing is worth buying right the first time. Any outdoor outlet on the shed’s exterior wall needs a weatherproof in-use cover, which is what the code language “in-use” is asking for and also just common sense (sideways rain finds every uncovered plug we have ever owned). A TayMac ML450W expandable in-use cover like this one is a NEMA 3R expandable outlet cover with favorable weather-sealing feedback, but check that it is right for your specific box, device, orientation and gasket, and whether your local inspector is requiring an extra-duty cover on that outlet, before you install it.
The rest of it (breakers, conduit fittings, wire nuts, the actual subpanel) is stuff the parts counter at Home Depot or Lowes can walk you through in ten minutes as long as you show up with your amp math and your run length written on a scrap of paper. Bring the numbers, not the guesswork; they will help. And if the shed is going to hold something with a battery tender, like the snowblower we store in ours, mention that too so the parts guy can nudge you toward the right outlet placement.
The whole thing feels bigger before you start than it is once you are in it. A quiet Saturday of digging, a few hours pulling wire on Sunday, an inspector’s visit on Tuesday, and the shed goes from a dark box you avoid after 5 pm to a place you actually want to be. Once the power is in, everything else is more fun to plan, and if you want ideas for where to take it next, we keep a running gallery of shed makeover moves worth stealing.
What is the shed getting wired to hold, and how far from the house are you working with? Tell us in the comments; the number of comments that end with “we ended up spending less than we thought” is why we keep writing these.
Before you even price the trench, make sure the shed is in the right spot: our walkthrough on best shed placement covers the 15 checks (setbacks, drainage, sun, and the small things) that decide whether running power out there is worth it in the first place.
