What Is the Code Distance for a Generator From a House?
Quick Answer
For a portable generator, the safest rule is to operate it outdoors at least 20 feet from the house, especially from doors, windows, and vents, with the exhaust pointing away. The CDC carbon monoxide guidance supports this 20-foot safety distance. Permanently installed standby generators follow different clearance rules based on NFPA standards, the manufacturer’s installation manual, and local code requirements.
Generator Distance at a Glance
- Portable generator: Keep it at least 20 feet from the home whenever possible.
- Openings: Keep exhaust well away from windows, doors, vents, and fresh-air intakes.
- Standby generator: Follow the listed installation clearances for that exact model.
- Combustible surfaces: NFPA 37 requirements and listed exceptions can affect allowable spacing.
- Local code: Your building or fire department can require additional setbacks.
Before You Choose a Location
- Check the generator manual, local permit rules, nearby openings, exhaust direction, and required service clearance.
If you’re trying to figure out how far a generator should sit from your house, the confusing part is that there isn’t one distance covering every generator type.
I treat portable and permanently installed standby generators separately. That simple distinction prevents a lot of unsafe placement decisions.
How Far Should a Portable Generator Be From a House?

A portable generator should normally be operated outdoors at least 20 feet from the house, with its exhaust directed away from the building.
This is the distance I use as my starting point because carbon monoxide can travel into a home through openings you may not immediately notice.
- Windows: Keep the generator away from both open and closed windows.
- Exterior doors: Don’t position the exhaust toward entrances.
- Dryer vents: Treat them as potential paths into the building.
- Soffit vents: Exhaust can move upward toward roof ventilation.
- Fresh-air intakes: These deserve extra attention because they intentionally pull outside air indoors.
The U.S. Consumer Product Safety Commission also recommends keeping portable generators at least 20 feet from the home and pointing the exhaust away.
I wouldn’t reduce that distance simply because the generator is sitting outdoors. A porch, attached carport, garage doorway, or partially enclosed area can still allow exhaust to collect near the house.
Is the 20-Foot Rule Actually an Electrical Code Requirement?
The 20-foot portable-generator recommendation is primarily a carbon monoxide safety rule, not a universal NEC setback that applies to every generator installation.
The National Electrical Code focuses heavily on safe electrical installation, grounding, wiring, transfer equipment, and related electrical hazards.
Generator location can also involve fire codes, mechanical requirements, manufacturer listings, and local building rules.
| Situation | Typical Distance to Consider | Main Reason |
|---|---|---|
| Portable generator | 20 feet or more from the home | Carbon monoxide safety |
| Stationary generator near wall openings | Often based around a 5-foot NFPA 37 framework, subject to exceptions | Fire and exhaust protection |
| Listed standby generator beside a wall | May be less than 5 feet where specifically permitted | Tested enclosure and manufacturer listing |
| Property line or neighboring structure | Varies locally | Zoning, fire, noise, and building rules |
Generator clearance is the minimum open space required around a generator to manage exhaust, heat, fire exposure, ventilation, maintenance, and safe operation.
That definition matters because clearance from a wall isn’t necessarily the same as clearance from a window or air intake.
How Close Can a Standby Generator Be to a House?
A permanently installed standby generator can sometimes be placed closer to a house than a portable generator, but only when its listing, installation instructions, and applicable codes permit it.
NFPA 37 covers stationary combustion engines and addresses generator location as part of fire-risk control.
A widely used NFPA 37 framework calls for outdoor engines to remain 5 feet from wall openings and combustible structures unless an allowed exception applies.
- The nearby building surface may have an appropriate fire-resistance rating.
- The generator enclosure may have undergone fire testing that supports a smaller clearance.
- The authority having jurisdiction may need to accept the installation method.
- The manufacturer’s installation instructions may impose their own minimum distances.
This is why I never recommend choosing a standby-generator pad location from a generic internet diagram alone.
The correct installation drawing for the exact model should come first.
Does That Mean 18 Inches From a House Is Always Legal?
No. An 18-inch clearance shown for some tested standby-generator installations does not create a universal 18-inch rule.
That smaller spacing may apply only to particular listed units, wall conditions, directions around the enclosure, and installation configurations.
You could still need substantially more clearance from windows, doors, vegetation, vents, property lines, or service access areas.
The safest approach is to treat the manufacturer’s minimum clearance as one requirement, not the only requirement.
What Should You Measure the Generator Distance From?
Measure from the generator or enclosure to the specific hazard or restriction named by the applicable rule.
Don’t assume every measurement starts at the same point.
- House wall: Check fire-clearance requirements.
- Window or door: Check exhaust and opening clearance.
- Air intake: Prevent exhaust from entering the ventilation system.
- Shrubs: Maintain airflow and combustible-material clearance.
- Fence: Allow ventilation and maintenance access.
- Property line: Check zoning and local setback requirements.
- Neighboring house: Consider its windows, doors, and air intakes too.
One mistake I see is measuring only from the siding while ignoring a nearby basement window or dryer vent.
The closer opening can be the more important measurement.
Can You Put a Generator in a Garage, Carport, or Covered Porch?

Never operate a portable generator inside a home, attached garage, basement, shed, or similar enclosed space.
Opening the garage door doesn’t turn the garage into a safe generator location.
The U.S. Consumer Product Safety Commission warns that dangerous carbon monoxide can build up even when doors or windows are open.
A covered porch or carport can also place the generator too close to the building and trap exhaust where you don’t want it.
What About Rain?
Don’t solve the rain problem by moving a portable generator into a garage or against the house.
Instead, follow the generator manufacturer’s wet-weather instructions and use only a running cover specifically designed for operating generators when appropriate.
- Keep airflow around the engine.
- Keep the exhaust path completely open.
- Never wrap a running generator in a tarp.
- Keep electrical connections protected from water.
- Follow the cover and generator manufacturers’ compatibility instructions.
How Do I Choose a Safe Generator Location?
Start with exhaust safety, then work through code, airflow, wiring, fuel, noise, and service access.
I use the following order because it catches the biggest placement problems early.
- Identify the generator type. Determine whether it’s portable or permanently installed.
- Locate every building opening. Mark windows, doors, vents, and air intakes.
- Plan the exhaust direction. Point exhaust away from occupied buildings.
- Read the installation manual. Use the clearance drawing for the exact model.
- Check local requirements. Ask the local building, electrical, or fire authority about permits and setbacks.
- Plan electrical connection. Never backfeed a house through an ordinary receptacle.
- Leave maintenance space. You’ll need access for oil changes, filters, batteries, and repairs.
For permanent home backup systems, I also want the installer to verify fuel-line sizing and transfer-switch requirements before the pad is finalized.
Moving the generator later is much harder than adjusting the plan first.
Portable vs. Standby Generator Distance
The biggest difference is that portable generators rely on generous separation to manage carbon monoxide, while standby units are engineered and listed for permanent installation under specific conditions.
| Feature | Portable Generator | Standby Generator |
|---|---|---|
| Typical safety approach | 20 feet from home | Listed installation clearance |
| Permanent wiring | Usually no | Yes |
| Automatic transfer | Usually no | Common |
| Location determined by | CO safety plus owner manual | Listing, manufacturer, NFPA, and local code |
Does Local Generator Code Override the Manufacturer’s Instructions?
Your installation has to satisfy all applicable requirements, including the generator listing, manufacturer instructions, and rules enforced by the local authority.
A clearance that works in one city may not receive approval somewhere else.
As of 2026, the National Electrical Code remains a major electrical-safety standard, while NFPA 37 addresses stationary combustion engines.
Local jurisdictions can adopt specific editions and add their own requirements.
That’s why I’d confirm the final location before pouring a concrete pad or trenching a gas line.
Generator Placement Mistakes I Would Avoid

Most bad generator locations fail because someone focuses on convenience instead of exhaust, airflow, or code clearance.
- Too close to a window: Exhaust may enter the living space.
- Inside a garage: An open garage door doesn’t provide reliable protection from CO.
- Under a porch: The structure can restrict exhaust movement and ventilation.
- Exhaust toward the house: Distance alone won’t fix a poor exhaust direction.
- Against shrubs: Vegetation can restrict cooling airflow and create a combustible exposure.
- No service clearance: Maintenance becomes difficult even when the location technically fits.
- Ignoring neighbors: Generator exhaust should not be aimed toward another home’s openings.
I also recommend carbon monoxide alarms whenever you’re operating fuel-burning equipment near a residence.
The CDC recommends battery-powered or battery-backup CO detectors when a portable generator is in use.
Useful Gear for Safer Portable Generator Placement
If you’re setting up a portable generator for an outage, these are two accessories I’d consider before trying to move the generator closer to the house.
🏆 Best for Open-Frame Generators
GenTent Universal Clamp Kit
★★★★☆ 4.7/5 Editorial Fit
Designed as a running cover for compatible open-frame portable generators while maintaining ventilation and exhaust access. I prefer a purpose-built weather solution over moving a running generator into a garage during rain.
🌧️ Best for Enclosed Inverters
GenTent Inverter Generator Kit
★★★★☆ 4.6/5 Editorial Fit
This version is designed for compatible fully enclosed inverter-style generators rather than exposed open frames. I’d still keep the generator outdoors at the proper distance and follow both manufacturers’ instructions.
Frequently Asked Questions
How far does a portable generator need to be from a house?
A portable generator should be used outdoors at least 20 feet from the home whenever possible. Keep its exhaust pointed away from the building and away from windows, doors, vents, and air intakes.
Can a generator be 5 feet from a house?
A permanently installed standby generator may have installation requirements involving a 5-foot clearance framework or an approved exception. A portable generator should not use that figure as its normal operating distance; federal safety agencies recommend about 20 feet from the home.
Can a standby generator be 18 inches from a house?
Some listed standby-generator models can be installed close to certain walls when their tested installation instructions specifically permit it. That doesn’t mean every generator can be 18 inches away. Windows, doors, combustible materials, airflow, service space, and local rules can require greater clearance.
How far should a generator be from a window?
For a portable generator, keep it at least 20 feet from windows, doors, and vents and direct the exhaust away. Stationary-generator window clearance depends on the applicable code, generator listing, installation manual, and local authority.
Can I run a generator in my garage with the door open?
No. A portable generator should not be operated inside an attached garage, even with the garage door open. Carbon monoxide can accumulate or enter the home. Move the generator outdoors and maintain the recommended separation instead.
Final Takeaway
If you’re asking, “What is the code distance for a generator from a house?” first identify whether you’re dealing with a portable generator or a permanently installed standby unit.
For portable generators, I would use the clear 20-foot safety rule and point the exhaust away from the house. For standby equipment, follow the exact model’s installation instructions, NFPA requirements that apply locally, and your authority having jurisdiction.
Before installing anything permanently, confirm the proposed location with a qualified electrician or generator installer and your local permitting office. A few minutes of verification can prevent an expensive relocation later.

Hi, I’m Michael Turner. I own a generator workshop in the United States and founded HomeGeneratorBlog to share practical, hands-on guidance about generator installation, maintenance, troubleshooting, safety, and backup power solutions. My goal is to help homeowners make smarter, more confident decisions through clear and reliable information
