How to Build a Lean-To on a Shed (Ledger, Pitch and Flashing)
A lean-to can be added to a shed with a ledger board on the shed wall, posts holding the outer edge, and a single-slope roof that falls away from the shed. The catch is that a shed wall is often too light to carry a roof, and the roof slope has to match the roofing you choose (2:12 minimum for asphalt shingles, 1/4:12 for standing-seam metal). This guide covers wall checks, ledger versus freestanding framing, a pitch and rise table, flashing, and permits.
Can You Build a Lean-To Onto a Shed? What to Check First
Best Ledger Screw Pick | |
![]() |
FastenMaster LedgerLok 3-5/8 in. Structural Screws (12 pack) A code-evaluated structural screw made for fastening a ledger through sheathing into wall studs, with the washer head built in.
|
As an Amazon Associate we earn from qualifying purchases. | |
Yes, but the shed has to earn the addition. Before you buy lumber, walk around the wall you plan to build against and check three things: the wall framing, the ground, and the rules.
- Wall framing: Pull a piece of trim or siding at the planned ledger line and find the studs (spacing is commonly 16 or 24 inches on center). Probe the bottom plate and lowest studs with a screwdriver. If it sinks in, fix the rot before anything else.
- Wall strength: Look at what the wall is made of. A 2×4 stud wall with thin siding and no sheathing is a weak place to hang a roof edge, and a metal or resin shed is usually not a place to attach one at all.
- Ground and drainage: The lean-to roof should shed water away from the shed, and the posts need footings that suit your frost depth. Ask your building department for the local frost depth.
Permits and setbacks. The model International Residential Code exempts one-story detached accessory structures of 200 square feet or less from a building permit, but that is only a baseline. Towns amend it, some set lower size limits, and a roof attached to an existing shed may be treated differently from a separate building. Setbacks from the property line usually apply either way. Check local code before you build.
If you want a freestanding version instead of attaching to an existing building, see our guide to a DIY lean-to shed with costs and roof pitch. For the base structure itself, our wood shed build guide covers the walls you will be attaching to.
Ledger Board or Freestanding Frame? Choosing How to Attach
Most lean-to guides assume you bolt a ledger to the wall and stop there. The better question is how much of the roof load you want the shed wall to carry.
| Method | How it works | Best when | Watch out for |
|---|---|---|---|
| Ledger plus posts | Ledger on the shed wall holds the high edge of the rafters; posts and a beam hold the low edge | Shed wall is sound 2×4 or 2×6 framing with real sheathing | Ledger must hit studs; water can get behind it if flashing is poor |
| Freestanding frame | Posts and beams on both sides of the rafters; the roof only sits close to the shed wall | Shed wall is thin, old, metal or resin, or the shed may be moved later | More posts, footings and lumber; a gap needs flashing or a cap |
With a ledger, the high edge of every rafter bears on the shed wall, so the wall takes a share of the roof weight along its full length and also has to resist wind lift. That is why a ledger only makes sense on a wall built like a real wall. On a light or aging shed, the freestanding option costs a few more posts and keeps the shed out of the structural picture. If you are unsure, ask your building department or a local carpenter to look at the wall.
When you do use a ledger, fasten it into the studs, not just through siding and sheathing. Builders commonly use 1/2 in. lag screws or structural ledger screws such as LedgerLok in a 3-5/8 in. length for a 2x ledger through 1/2 in. sheathing; some builders describe using two screws per stud. Follow the fastener maker’s spacing table or your local code, and use pressure-treated lumber where the ledger will stay damp. Our note on using pressure-treated wood for framing covers the lumber side of that choice.
What Roof Pitch Does a Lean-To Need?
The pitch decides which roofing you can use, and the minimum depends on the material. These are the minimum slopes listed in the 2021 IRC for common roof coverings.
| Roofing material | Minimum slope | IRC section |
|---|---|---|
| Asphalt shingles | 2:12 (double underlayment from 2:12 up to 4:12) | R905.2.2 |
| Metal roof shingles | 3:12 | R905.4.2 |
| Metal panels, lapped, no sealant | 3:12 | R905.10.2 |
| Metal panels, lapped, with sealant | 1/2:12 | R905.10.2 |
| Metal panels, standing seam | 1/4:12 | R905.10.2 |
| Mineral-surfaced roll roofing | 1:12 | R905.5.2 |
Most shed-sized lean-tos are covered with exposed-fastener metal panels or asphalt shingles, so a 3:12 slope is a safe target for either. Roofing makers can also set a higher minimum than the code, so check the installation sheet for your panel or shingle. Our post on putting metal roofing on plywood covers the deck under a metal roof.

How high should the ledger sit? Rise by pitch and span
Here is the part most guides skip. The ledger has to sit higher than the outer beam by the roof’s rise, and that number gets large fast. Rise equals the horizontal run times the pitch divided by 12. This table shows the drop in inches from the ledger to the outer edge of the rafter (ignoring overhang).
| Horizontal run | 1:12 | 2:12 | 3:12 | 4:12 |
|---|---|---|---|---|
| 8 ft | 8 in | 16 in | 24 in | 32 in |
| 10 ft | 10 in | 20 in | 30 in | 40 in |
| 12 ft | 12 in | 24 in | 36 in | 48 in |
So a 10 ft deep lean-to at 3:12 drops 30 inches. If the ledger line sits 7 ft up the shed wall, the outer edge ends up 4 ft 6 in. off the ground before overhang and rafter depth, which is too low to walk under. Either keep the lean-to shallow, raise the ledger, or drop to 2:12 with a roofing type that allows it. Work these numbers out before you mark the ledger. Rafter size also depends on span, spacing and your snow load, so use your local code’s span tables or the free AWC span calculator rather than guessing.
Two more things to check: the roof must slope away from the shed wall, not toward it, and in snowy regions a low roof next to a taller wall can collect drifted snow. Ask your building department for the local ground snow load.
Step-by-Step: Building the Lean-To
- Confirm the wall: expose and mark the studs, and repair any rot on the plate and lower studs.
- Set the heights: use the rise table to find the ledger height from your chosen outer beam height and pitch.
- Place the footings and posts: dig to the local frost depth or use code-approved post bases, then set posts plumb and level.
- Cut the siding back and flash the ledger line: open the siding just enough to seat the ledger and slip flashing behind it (see the flashing section).
- Fasten the ledger: drive structural screws or lags into every stud, keeping fasteners clear of the ends and edges of the board.
- Install the beam and rafters: notch (birdsmouth) or hang the rafters at the pitch, using sloped rafter hangers at the ledger, at 16 or 24 inches on center, with hurricane ties at the beam for uplift.
- Sheath and roof: add plywood or OSB sheathing, drip edge, underlayment, then the roofing at the minimum lap and slope the manufacturer requires.
- Finish the wall side: add counter flashing, replace siding, and route water away from the shed foundation with a gutter or a graded drainage path.
Flashing the Lean-To Where It Meets the Shed Wall
Leaks almost always start at the joint between the new roof and the old wall. Where the high edge of the lean-to meets the shed wall, use continuous flashing that goes up behind the siding and over the roofing, not caulk. Guidance from builders and building-science groups is to cut the siding back and flash behind it rather than face-nailing metal over it.
- Lap the roofing underlayment up the wall at least 8 inches.
- Sidewall step flashing should be at least 4 inches high on the wall and 4 inches wide over the roof deck under the IRC.
- Add counter flashing (or a self-adhered membrane) over the top edge of the flashing so water cannot run behind it.
- Where the roof edge ends at a wall, add a kick-out diverter so water does not soak into the siding below.

Common Mistakes When Adding a Lean-To to a Shed
- Fastening the ledger into siding only. Screws must reach studs or the ledger can pull away.
- Skipping the pitch math. A deep lean-to at a steep pitch leaves the low edge too low to use.
- Using the wrong roofing for the slope. Shingles below 2:12 or exposed-fastener metal below 3:12 breaks the code minimums.
- Trusting the old wall. Rot or a thin wall changes the whole plan. See the freestanding option above.
- Sloping toward the shed. The lean-to must drain away from the shed wall.
- Skipping the permit check. Attaching a roof can change how your town classifies the shed.
Lean-To on a Shed: Common Questions
How much slope does a lean-to roof need?
It depends on the roofing. Under the IRC, asphalt shingles need at least 2:12 (with double underlayment from 2:12 up to 4:12), lapped metal panels without sealant need 3:12, and standing-seam metal needs only 1/4:12. Always check the roofing manufacturer’s own minimum too, since it can be higher than the code minimum.
Do I need a permit to add a lean-to to a shed?
Often not, but check first. The model IRC exempts one-story detached accessory structures up to 200 square feet from a permit, yet many towns set lower limits or require a permit for any roof addition, and setback rules still apply. Adding a lean-to also increases the shed’s footprint, so call your building department before you buy lumber.
Can a shed wall support a lean-to roof?
Sometimes, but do not assume it. Many sheds are framed with light 2×4 walls that were never sized to carry another roof, and the ledger loads the wall along its whole length. If the studs are rotted or the wall is thin, put posts under the outer beam, add a doubled stud where the ledger lands, or build the lean-to as a self-supporting frame beside the shed.
What screws should I use to attach the ledger board?
Use structural fasteners meant for ledgers, such as 1/2 in. lag screws or a structural ledger screw like LedgerLok, and drive them into the wall studs, not just the siding or sheathing. Follow the screw maker’s spacing table or your local code, and use hot-dipped galvanized or coated fasteners with pressure-treated lumber.
A lean-to on a shed is a manageable project once you have checked the wall, chosen the attachment method, and worked out the rise for your roofing. Get the flashing right at the shed wall and the rest is straightforward framing.
Sponsored / affiliate links. As an Amazon Associate I earn from qualifying purchases. I may earn additional commission from eligible campaigns.


