Accessory structure setbacks are the zoning rules for buildings that serve the main house rather than being the house itself: sheds, detached garages, workshops, greenhouses, pergolas and pool houses. They are usually more relaxed than the house setbacks, but they come with extra conditions on size, height, location and distance from other buildings that catch people out.
Quick answer: Accessory structures often get smaller side and rear setbacks than the house, sometimes as little as a few feet, but are usually restricted to the rear or side yard, capped in height and footprint, and required to keep a set distance from the house. Larger accessory buildings, such as big garages, may have to meet the full house setbacks.
What counts as an accessory structure?
Zoning codes define an accessory structure as one that is subordinate to, and on the same lot as, the main building. Common examples:
- Sheds and storage buildings
- Detached garages and carports
- Workshops, studios and home offices
- Greenhouses and pool houses
- Pergolas, gazebos and covered patios not attached to the house
Accessory dwelling units (ADUs) are a special case. Because people live in them, most states and cities give ADUs their own rules rather than treating them as ordinary sheds. Our pillar guide on setback requirements covers the setbacks for main buildings.
How accessory structure setbacks usually work
| Rule | Typical approach (varies locally) |
|---|---|
| Location | Rear yard, sometimes side yard; rarely the front yard |
| Side and rear setback | Reduced, often a few feet, for small structures |
| Height | Capped, often lower than the house; sometimes tied to the setback |
| Footprint | Capped by area or as a share of the rear yard |
| Separation from house | A minimum distance, partly for fire safety |
| Larger structures | May have to meet full house setbacks above a size or height |
Size matters: the sliding scale
Many codes use a sliding scale: the bigger or taller the accessory building, the further it must sit from the lines. A small storage shed might be allowed close to the rear line, while a two-car garage with a loft must meet the same setbacks as the house. Height is often measured to the midpoint of the roof or the ridge, depending on the code. Our guide on how setbacks are measured covers where to measure from.
Permits vs setbacks: two separate questions
Whether a shed needs a building permit and where it may go are separate questions. Under the International Residential Code, one-storey detached accessory buildings up to 200 square feet are generally exempt from a building permit, and many places adopt a similar or smaller threshold. But a permit-exempt shed still has to meet zoning setbacks, easement restrictions and HOA rules. Our guide on how big a shed you can build without a permit explains the thresholds.
Pergolas, gazebos and pool houses
Open structures are treated inconsistently. Some codes count any roofed or slatted structure as an accessory building with full accessory setbacks; others give open pergolas more freedom because they don’t enclose space. Pool houses and cabanas are usually treated like other accessory buildings, but if they include a bathroom or sleeping space, some cities start applying ADU rules. A gazebo attached to a deck may count as part of the deck, and the deck in turn may count as part of the house. When the category is unclear, ask the planning office how they classify your structure before you design it.
Height limits and how they interact with setbacks
Many codes link height and setback. A low shed might be allowed 3 feet from the line, while every additional foot of height pushes it further back. Others cap accessory buildings at a fixed height, such as one storey or a set number of feet, and don’t allow living space above. Height is usually measured from the average grade beside the building to the midpoint of a pitched roof or to the top of a flat roof. A garage with a steep roof can exceed a height limit even though its walls are short, so check the roof design as well as the footprint.
Easements and other limits
Rear and side lot lines in subdivisions often carry utility or drainage easements. A shed can meet a 5-foot rear setback and still sit on a 10-foot utility easement, which most easements prohibit. Check your plat before you pick the spot. Fire separation rules can also limit how close a building can be to the line or to the house.
Corner and through lots
On a corner lot, the code decides which side is the rear yard, which matters when sheds are allowed only there. On a through lot that fronts two parallel streets, there may be no rear yard at all in the usual sense. Our guide to corner lot setbacks explains how codes assign the yards.
Showing an accessory structure on your site plan
- The footprint and height of the accessory building.
- Distances to the side and rear lines, and to any easement edge.
- The distance to the house and any other buildings.
- Which yard it sits in, especially on corner lots.
- Lot coverage, if your code limits it.
A shed or outbuilding site plan drawn this way gives the reviewer every distance they need.
Frequently asked questions
How close to the property line can I put a shed?
It depends on your zoning, but many codes allow small sheds a few feet from side and rear lines. Larger or taller sheds usually need more distance.
Do accessory structure setbacks apply if no permit is needed?
Yes. Permit exemptions relate to building codes; setbacks are zoning rules and still apply.
How far must a shed be from the house?
Many codes set a minimum separation for fire safety. Check your code, as distances vary.
Is a pergola an accessory structure?
Usually, if it is freestanding. Some codes treat open pergolas more leniently than roofed structures; a pergola attached to the house may count as part of it.




