Skip to content

Guide

How to Build a Lean-To on a Shed or House

You can set a lean-to shed beside the wall or hang a roof from it. The second route changes the permit, the footings and the flashing.

In short

The simple way to add a lean-to is a freestanding lean-to shed set close to the wall, with no connection to it. Tying a roof to a shed or house wall needs a ledger, posts or a low wall, flashing and a check of the wall, and the 200 sq ft permit exemption in the 2021 IRC covers detached structures only.

You can add a lean-to to a shed, a garage or a house in two ways. The simple one is a freestanding lean-to shed set close to the wall, with no connection to the building. The harder one is an attached lean-to: a ledger on the existing wall, rafters running out to a beam on posts or to a low wall, and flashing where the roof meets the siding.

This guide shows how to build a lean-to on a shed or house both ways, and where each one turns into paperwork. It covers what the model code says about permits and footings once a roof touches another building, what building department handouts say about ledgers, and the rafter size the shed designer checks for the depth you choose. The step-by-step build of the freestanding version lives in our lean-to shed guide.

Two ways to add a lean-to

A lean-to has one sloping roof and a high side. On a shed or house, the high side is the existing wall. What separates the two routes is whether the new roof touches that wall.

Freestanding: a lean-to shed set close to the wall

A freestanding lean-to is a complete small shed with its own floor, walls and roof, placed a few inches from the existing wall. Its tall wall faces the old building and carries the high end of the rafters. Nothing is fixed to the old wall, so the old wall carries no new load and no ledger or wall flashing is needed. Leave a gap wide enough to get a hand in and clear leaves and water, and shed the roof away from the wall, not into it.

This is the route the designer draws. Its 10x8 lean-to plan is a 10 ft wide, 8 ft deep shed with a front wall of 97-1/8 inches and a back wall of 74 inches at 3/12, and it comes with a cut list.

The designer's 10x8 lean-to: a freestanding shed with its own tall wall, which you set beside the existing wall.

Attached: a roof that hangs from the wall

An attached lean-to uses the existing wall as one support. A horizontal board called a ledger is fastened to the wall framing, the rafters sit on it, and the far ends rest on a beam carried by posts, or on a low wall you frame. Water that runs down the old wall meets your roof, so the joint between the two needs flashing.

Attached is the way to get a roof with no gap and the most floor under cover. It is also the way that puts new load on a wall built for something else, and it drags in the permit and footing rules for a connected structure.

Which route fits

Freestanding Attached
Loads the old wall No Yes
Ledger and wall flashing Not needed Needed
Own floor and four walls Yes Ledger side is the old wall
Permit picture Detached rules, if it stays detached Connected structure
Designer plan 10x8 and other lean-to plans Rafter check only

If you are not sure, start with the freestanding one. It costs a little more lumber and it keeps the question of the old wall off the table.

What the designer does and does not cover

The designer draws freestanding lean-to sheds from 4 to 16 ft wide and 4 to 24 ft deep, with a roof pitch of 2/12, 3/12 or 4/12 (that is its own limit). It does not design ledgers, posts, beams, footings or flashing, and it gives no local code. It gives one thing that carries over to an attached roof: the rafter size and the span check for the depth you choose.

Permits when a roof touches another building

A lean-to changes the permit picture the moment it is tied to a building. Read this section with the shed permit guide open, and remember that the 2021 International Residential Code is a model code: your city or county adopts its own edition, with its own amendments.

The 200 sq ft exemption is for detached structures

The 2021 IRC, R105.2, lists “one-story detached accessory structures” up to 200 square feet of floor area as exempt from a building permit. The word that matters is detached. A roof fixed to a house is not detached, so the exemption does not cover it as written. Whether a roof fixed to a shed counts as one connected structure or as a shed with an add-on is for your building department to say. The same section says an exemption does not authorize work that breaks the code or other local law.

Local thresholds are often lower than the model. If you are on a freestanding lean-to, the same call applies: ask what size and setback limits your jurisdiction sets.

Frost footings and the ice barrier also say “detached”

Two more exceptions in the 2021 IRC are written for detached buildings.

  • Frost protection. R403.1.4.1 asks that permanent supports be protected from frost, for example by going below the frost line in Table R301.2. It exempts free-standing accessory structures of 600 sq ft or less, of light-frame construction, with an eave height of 10 ft or less. A post that carries a roof tied to a house is not free-standing, so do not assume the exemption reaches it.
  • Ice barrier. R905.1.2 asks for an ice barrier from the eave to at least 24 inches inside the exterior wall line where Table R301.2 records ice forming along eaves. Its exception is for detached accessory structures with no conditioned floor area. An attached lean-to does not clearly fit that exception.

What to ask the building department

Call before you buy lumber and ask these five things.

  1. Is a roof fixed to this shed or house wall a permit item at my size?
  2. Which footing and frost depth applies to the posts?
  3. Does my jurisdiction have a handout for attached covers or lean-to roofs?
  4. Is the existing wall adequate, or do I need an engineer’s letter?
  5. What snow load and wind provisions apply, and is the ice barrier required?

The freestanding route in short

For most backyards this is the better route. The build is a small shed, so use the lean-to shed guide for the base, walls, rafters and roofing, and the gravel base guide if you set it on a pad. Three points are specific to building beside an existing wall.

Gap, water and access

Leave a gap between the two walls. A few inches lets you sweep out leaves and check the old siding, and it means the old wall stays a wall. Shed the lean-to roof away from the old wall, so the high side sits against it and the low side drains to the open. Plan a door on the side you can reach with a mower or a wheelbarrow, not on the side against the wall.

Wood near the ground

A shed base close to soil calls for treated lumber. The 2021 IRC, R317.1, asks for naturally durable or preservative-treated wood where exterior wall framing and siding sit less than 6 inches above the ground, and R317.3.1 asks for hot-dip galvanized, stainless, silicon bronze or copper fasteners in treated wood. The designer lists the floor frame in treated lumber for this reason.

Roofing at low pitch

A lean-to roof is flat compared with a gable, and pitch limits the roofing. Under the 2021 IRC, R905.2.2, asphalt shingles go on slopes of 2:12 or more, and from 2:12 up to 4:12 the underlayment is doubled (R905.1.1). Overlapped metal panels need at least 3:12 unless the laps are sealed (R905.10.2). The roof pitch guide and the metal roof guide cover both.

The attached route step by step

Below is the order of work. None of it is a plan you can build from. It is the sequence that the handouts in the next section put numbers on, and each number changes by city.

1. Check the wall that will carry the roof

Start with the wall, not the lumber. A ledger hangs a roof from the framing of the old building, so the framing has to be able to take it. As general practice, shed walls are framed with 2x4 studs sized for their own light roof, not for a second one.

The AWC deck guide DCA 6 is a deck guide, not a roof guide, but it states the principle. It says the house band joist “shall be capable of supporting the new deck”, and that if this cannot be verified, a non-ledger design or a full plan submission is required (AWC, DCA 6). The lean-to version of that sentence is the same: if you cannot show the wall can carry the roof, either stand the roof on its own posts or ask an engineer.

Some walls cannot take a ledger at all. DCA 6 prohibits ledger attachment to exterior veneers such as brick, masonry and stone, to hollow masonry, and to cantilevered floor overhangs. The siding also has to come off where the ledger goes.

2. Set the ledger

The ledger is a horizontal board fixed to the studs of the existing wall at the height where the high end of your roof sits. The handouts treat it as the replacement for one of the beams. Escondido’s guideline says the main beam on the attached side “may be replaced with a ledger the same size as the rafters” (City of Escondido, Guideline 8B, 2014), and La Habra’s says the same (City of La Habra). The fasteners are where they part, and that is the next section.

Two general rules apply whatever the schedule says. Use fasteners made for the wood, as the 2021 IRC, R317.3.1, does for treated lumber. And do not fix the ledger to the fascia or the roof rafters of the old building unless the local handout shows how: Escondido says attaching new rafters to the existing dwelling’s rafters “is not recommended”.

3. Run the rafters to a beam on posts or a low wall

With the ledger up, rafters run from it to a beam on the far side. The beam sits on posts with footings, or on a short framed wall on its own base. Which one you frame is a design choice, and the beam and post sizes are what the handouts tabulate by span.

Rafters are spanned by their horizontal run. The 2021 IRC, R802.4.1, measures rafter spans “along the horizontal projection of the rafter”. Our shed rafters guide explains cutting, notches and tails.

4. Roof, flashing and drainage

Sheathe the roof, add the underlayment, and finish the roof with shingles or metal following the maker’s instructions. The joint at the old wall is flashing, covered below. Water leaving the low edge should go away from the old foundation and away from the neighbor.

What building department handouts say

Many cities and counties publish handouts for patio covers, a category that includes attached roofs on posts. We read four California ones and one national deck guide. They agree on the idea and disagree on the numbers, which is the point.

Source Ledger fastening Footing
Escondido, 2014 Lag screws at 48 in for up to a 10 ft rafter span; 32 in up to 20 ft Minimum 12 in into undisturbed soil
La Habra 3/8 in x 5 in lag screws with washers at 16 in Not read
Los Angeles County, 2026 Framing connectors shown, no lag schedule read 12 in x 12 in pad at each post
Rancho Cucamonga, 2024 Ledger detail on drawing, no schedule read 12 in at 4 ft post spacing to 18 in at 12 ft, 12 ft rafter span

The two lag schedules differ by a factor of three at the same kind of ledger. Escondido says 48 inches apart for spans up to 10 ft, and La Habra says 16 inches. Both are guides for their own city, with their own snow, wind and soil, and both say so: La Habra calls its bulletin “general guidelines” that are “subject to plan review”. So treat all of it as an example. If your building department has no handout, ask which detail it accepts.

Footings differ too

The footing figures range from a 12 in pad to 18 in squares, and they follow post spacing and rafter span, not a fixed size. They come from California, where the frost depth is shallow and the loads are light. In a cold state the frost line is a separate question, and the 2021 IRC ties frost protection to Table R301.2, which your jurisdiction fills in. Call 811 before you dig.

Patio cover is not a storage roof

Two of these handouts limit the category. Rancho Cucamonga says patio covers “shall be used for recreational, outdoor living purposes and not as carports, garages, storage rooms or habitable rooms”, and Escondido says a patio cover is not to be used as a carport, garage, storage or habitable room. A lean-to you plan to fill with firewood or a mower may fall outside that handout, and your building department decides which set of rules you are under.

Flashing where the roof meets the wall

An attached lean-to roof meets the old wall along its high edge and along its side. Both need flashing, and the freestanding route needs neither.

Sidewall and the model code

The 2021 IRC, R903.2.1, asks for flashing “at wall and roof intersections”. R905.2.8.3 says base flashing against a vertical sidewall is continuous or step flashing, at least 4 inches high and 4 inches wide, and where there is siding, the vertical leg is continuous under the siding. Metal flashing is at least 0.019 inch thick (No. 26 galvanized).

The U.S. Department of Energy’s Building America Solution Center gives the same dimensions and adds detail. It says to extend step flashing at least 4 inches up the wall and at least 4 inches along the roof deck, to end the siding at least one inch above the roof, and to use continuous flashing rather than pieces of step flashing on metal roofs (Building America Solution Center, PNNL).

Headwall, where the high edge meets the wall

The top of a lean-to roof meets the wall as a headwall. Atlas Roofing, a shingle maker, describes a roll flashing “installed along headwalls” and roof-to-wall flashing nailed to the wall (Atlas Roofing, Flashing Best Practices). The model code sends the headwall detail to the roofing maker’s instructions (R905.2.8.4), so your roofing product’s sheet sets it.

If the siding is in the way, it comes off where the flashing goes, and the flashing tucks under the house wrap and siding above, as the DCA 6 guide asks of a ledger: “House siding or the exterior finish system must be removed prior to installation of the ledger board.”

Rafter size and span for the depth you choose

Pick the depth of your lean-to first: how far the roof projects from the wall. Then check the rafters. The designer’s lean-to check sizes rafters as a single-slope roof at 16 inches on center, SPF No. 2 lumber and a 6 inch overhang, and the span it tests is the depth minus 3-1/2 inches.

Here is the designer’s result for a 10 ft wide lean-to at 2/12, at the two snow loads most readers ask about.

Depth 30 psf snow 50 psf snow
6 ft 2x6, span 5 ft 8-1/2 in 2x6, span 5 ft 8-1/2 in
8 ft 2x6, span 7 ft 8-1/2 in 2x6, span 7 ft 8-1/2 in
10 ft 2x6, span 9 ft 8-1/2 in 2x6, at the limit
12 ft 2x6, at the limit 2x8, 5% spare
14 ft 2x8, 10% spare 2x10, 10% spare

At 30 psf a 2x6 is allowed 11 ft 8-7/8 inches. At 50 psf it is allowed 9 ft 8-13/16 inches, so a 10 ft depth is at the limit and a 12 ft depth needs a 2x8, which is allowed 12 ft 4 inches. The designer’s rafter size rises with depth and snow load, and at 16 ft deep it picks a 2x10 at 30 psf and a 2x12 at 50 psf, though at the default front wall it also flags the low wall as too short at that depth. It never picks a 2x4 (that is its own rule).

111-5/16" along the edge, plumb cut to plumb cut108" horizontal run6" tailseat 3-1/2", heel 7/8"3/12 plumb cuts (14.0°)
Rafter detail on the designer's 10x8 lean-to: the rafters run across the depth from the tall wall to the low wall.

Pitch changes little, wall height changes more

At 3/12 and 4/12 the designer picks the same rafter sizes for the same depth and snow load. The allowed span at 30 psf is 11 ft 11-1/8 inches at 4/12 against 11 ft 8-7/8 inches at 2/12 and 3/12, because the model code allows L/180 deflection only on slopes above 3:12 and L/240 on others (2021 IRC, Table R301.7). What limits a deep lean-to is the low wall. At the default 97-1/8 inch front wall, the designer refuses a 3/12 roof at 12 ft depth and a 4/12 roof at 10 ft depth, because the low wall would get too short. In an attached lean-to the low end is your beam, so set its height first.

Use it as a check, not a design

The 2021 IRC gives rafter spans in its tables, and the designer’s numbers never run longer than the code tables at 30 and 50 psf. The designer does not size the ledger, the beam that takes the far ends, or the wall behind. It checks a rafter and stops there. If the numbers show 2x10 or 2x12 at your depth, the beam and posts get heavy too, and that is the time to look at a smaller depth or a second row of posts.

Lean-to for firewood or a mower

Many people asking how to add a lean-to to a shed want a roof over firewood or a mower, not an extra room.

Open, half-open or enclosed

An open lean-to has no walls, so it sheds rain, lets air move through firewood and needs no siding or door. A half-open one has a back wall, which is the old wall, and one closed side. An enclosed one is a small shed. The more you enclose, the more it looks like a building to the building department, and the less it looks like a patio cover.

Sizing for a cord

A cord of firewood is 128 cubic feet (California Department of Food and Agriculture). A pile 4 ft high, 8 ft long and 4 ft deep is that volume, so a 4 ft deep lean-to along an 8 ft wall holds one cord at that height. The firewood shed plans guide goes further.

Keep the wood off the ground

Set firewood on a raised base so the bottom row does not sit in water. Treated lumber near soil and fasteners rated for it are the same as any shed.

Where to go next

Set your depth and pitch in the shed designer and read the rafter check. For a lean-to you can build as a complete shed, take the 10x8 lean-to plan and the lean-to shed guide. For the overall build order, see how to build a shed.

Questions people ask

First ask whether the shed wall can carry a roof, because a rafter load on a light shed wall is a structural question. If it can, fix a ledger to the wall studs, run rafters out to a beam on posts, and flash the wall. If you want no risk to the wall, build a freestanding lean-to beside it.

Often yes for an attached one, and maybe for a freestanding one. The 2021 IRC exempts one-story detached accessory structures up to 200 sq ft, but a roof tied to a house or shed is not detached, and local limits are often lower. Ask your building department before you buy lumber.

Yes, two ways. A freestanding lean-to shed can stand a few inches from the wall with no connection. An attached roof hangs from a ledger on the wall and needs flashing, a wall that can carry it and usually a permit. The 2021 IRC asks for flashing at every wall and roof intersection.

You can, and the same two routes apply. A freestanding lean-to leaves the garage wall alone. An attached one puts new roof load on a garage wall that was framed for its own roof, so ask the building department or an engineer, and check whether your area treats it as an addition.

The designer's 10 ft wide lean-to at 10 ft depth uses 2x6 rafters at 16 inches on center. At 30 psf snow the span is 9 ft 8-1/2 inches against 11 ft 8-7/8 inches allowed. At 50 psf it sits at the limit of 9 ft 8-13/16 inches. Local snow load decides.

Yes. The 2021 IRC, R903.2.1, asks for flashing at wall and roof intersections, and R905.2.8.3 gives sidewall flashing at least 4 inches high and 4 inches wide with the vertical leg under the siding. A freestanding lean-to set a few inches off the wall needs no wall flashing, only a gap.

Sources

The figures in this guide that do not come from our own shed designer were checked against these 14 pages and documents. The date shows when we read each one.

  1. American Wood CouncilPrescriptive Residential Wood Deck Construction Guide (DCA 6, 2015 IRC version)Read
  2. Atlas RoofingFlashing Best PracticesRead
  3. California Department of Food and Agriculture, Division of Measurement StandardsFirewoodRead
  4. City of Escondido, Building DivisionInformation Guideline 8B, Solid Roof Patio Cover (January 2014)Read
  5. City of La Habra, Building and Safety DivisionStandard Open Patio Cover RequirementsRead
  6. City of Rancho Cucamonga, Building and SafetyPatio Covers (Revision B, 3.11.2024)Read
  7. Common Ground Alliancecall811.comRead
  8. International Code Council2021 International Residential Code, Chapter 1: Scope and AdministrationRead
  9. International Code Council2021 International Residential Code, Chapter 3: Building PlanningRead
  10. International Code Council2021 International Residential Code, Chapter 4: FoundationsRead
  11. International Code Council2021 International Residential Code, Chapter 8: Roof-Ceiling ConstructionRead
  12. International Code Council2021 International Residential Code, Chapter 9: Roof AssembliesRead
  13. Los Angeles County Public Works, Building and Safety2026 Los Angeles County Residential Code, Attached Patio CoverRead
  14. U.S. Department of Energy, Building America Solution Center (PNNL)Step and Kick-Out Flashing at Roof-Wall IntersectionsRead

Free shed designer

Get the materials list for your size

Enter width, depth, roof and openings. The designer lays out every stud and rafter, checks the spans and builds the materials list, free. The builder's plan with every cut is $29.