What the P0171 Code Means
P0171 stands for “System Too Lean (Bank 1).” Gasoline engines run best near 14.7 parts air to 1 part fuel. The upstream oxygen sensor reports whether the exhaust is lean (too much air) or rich (too much fuel), and the computer adds or removes fuel to correct it. Those corrections are called fuel trims.
When the computer has to add a lot of extra fuel for too long and still can’t bring the mixture back into range, it sets P0171. In plain terms: more air is getting in than the computer measured, or less fuel is getting in than it commanded.
“Bank 1” is the side of the engine with cylinder 1. On a four-cylinder, that’s the whole engine. On a V6 or V8, the same problem on the other side sets P0174. If you have both P0171 and P0174, look for something shared by both sides, such as a big vacuum leak, a dirty MAF sensor or low fuel pressure.
Common Causes of P0171
| Cause | Likelihood | Typical repair cost |
|---|---|---|
| Vacuum leak (cracked hose, PCV valve or hose, intake boot) | Most common | $180 – $450 |
| Dirty mass airflow (MAF) sensor | Very common | $100 – $200 to clean; $240 – $450 to replace |
| Leaking intake manifold gasket | Common on some engines | $300 – $800 |
| Upstream oxygen / air-fuel sensor | Occasional | $260 – $560 |
| Exhaust leak ahead of the upstream sensor | Occasional | $100 – $600 |
| Clogged fuel filter or bad fuel pressure regulator | Occasional | $175 – $400 |
| Leaking or clogged fuel injector | Less common | $770 – $950 |
| Weak fuel pump | Less common | $900 – $1,700 |
Cost figures combine FIXD’s and RepairPal’s shop estimates. Most P0171 codes turn out to be an air-side problem (vacuum leak or MAF) rather than a fuel-side problem, which is good news for your wallet.
Symptoms of P0171
- Check engine light on
- Rough or unstable idle, sometimes with a hissing sound from the engine bay
- Hesitation or stumbling when you accelerate
- Hard starting or stalling
- Lower fuel economy
- Misfire codes on some cars, because lean cylinders can misfire
Some cars show no symptoms beyond the light, especially when the lean condition only happens at idle.
Is It Safe to Drive With P0171?
Usually yes for a short time, but don’t let it ride. A lean-running engine burns hotter. Over time that can lead to misfires, damaged spark plugs, and a damaged catalytic converter. Fix it within days to a couple of weeks.
Stop driving and get it towed if the engine stalls in traffic, hesitates badly when merging, or the check engine light starts flashing. A flashing light means an active misfire.
How to Diagnose P0171
An OBD2 scanner with live data makes P0171 much easier to track down, because the fuel trim numbers tell you where to look.
- Read all codes. Note any P0174, MAF, O2 sensor or misfire codes stored alongside P0171.
- Check fuel trims at idle and at 2,500 rpm. Long-term fuel trim well above +10% means the computer is adding a lot of fuel. If trims are high at idle but improve at higher rpm, suspect a vacuum leak. If they are high everywhere, suspect the MAF sensor or fuel delivery.
- Look and listen for vacuum leaks. Inspect hoses, the PCV valve and hose, and the rubber intake boot between the air filter box and throttle body. Cracks often hide on the underside.
- Smoke test. A smoke machine pushes visible vapor into the intake and shows exactly where it escapes. Shops usually charge $100 to $200.
- Clean or test the MAF sensor. Compare its reading at idle to spec, or simply clean it with MAF-specific spray and re-check trims.
- Check fuel pressure with a gauge if the air side checks out.
How to Fix P0171
Start with the cheapest, most likely fixes:
- Check the air intake. Make sure the air filter box is closed and the intake boot is tight and uncracked.
- Clean the MAF sensor with dedicated MAF cleaner. Never touch the sensor wires, and never use carburetor or brake cleaner.
- Replace cracked vacuum hoses or a failed PCV valve. These parts are often inexpensive.
- Repair intake manifold or throttle body gasket leaks found by a smoke test.
- Fix any exhaust leak ahead of the upstream O2 sensor.
- Replace the MAF sensor if cleaning didn’t help and readings are out of spec.
- Test and repair fuel delivery: fuel filter, pressure regulator, injectors, then the fuel pump.
- Clear the code and drive. Fuel trims should drop back toward zero within a few drive cycles.
Cost to Fix P0171 by Cause
Most drivers pay about $300 to fix P0171, because the usual culprit is a vacuum leak. The full range runs from about $100 for a MAF cleaning at a shop to $1,700 if the fuel pump is weak.
| Repair | DIY parts | Shop total |
|---|---|---|
| MAF sensor cleaning | $10 – $20 | $100 – $200 |
| Vacuum hose or PCV valve | $15 – $100 | $180 – $450 |
| Fuel filter | $20 – $100 | $175 – $250 |
| MAF sensor replacement | $60 – $300 | $240 – $450 |
| Fuel pressure regulator | $50 – $195 | $265 – $400 |
| Intake manifold gasket | $20 – $100 | $300 – $800 |
| Upstream O2 / air-fuel sensor | $80 – $400 | $260 – $560 |
| Fuel injector | $100 – $500 | $770 – $950 |
| Fuel pump | $150 – $1,100 | $900 – $1,700 |
A diagnosis with a smoke test usually adds $100 to $200 at a shop, though many shops credit it toward the repair. Luxury and European engines, which often use complex PCV systems built into the valve cover, tend to cost more.
DIY vs. Taking It to a Shop
Difficulty: 2 out of 5 for the first checks, 3 to 4 for gasket or fuel system work.
P0171 is one of the better codes to start on yourself, because the two most common fixes are cheap and simple. Cleaning a MAF sensor takes about 15 minutes: unplug the sensor, remove its two screws, spray the element with MAF cleaner, let it dry completely, and reinstall it. A can of cleaner costs far less than a shop visit.
A visual vacuum-leak hunt costs nothing. With the engine idling, listen for a hiss around the intake manifold, throttle body and PCV hose, and squeeze rubber hoses gently to find soft or cracked spots. Replace any hose that feels brittle.
Where DIY gets harder: small leaks you can’t hear, intake manifold gaskets, and fuel pressure testing. That’s when a shop’s smoke machine and fuel pressure gauge earn their fee. If you’ve cleaned the MAF and checked the obvious hoses and the code returns within a few days, book a smoke test before buying parts.
Vehicles That Commonly Get P0171
FIXD reports P0171 frequently on Ford vehicles (Expedition, F-150, Mustang), Chevrolet (Impala, Malibu, Silverado 1500), Toyota (Camry, RAV4, Sienna) and Nissan (Altima, Maxima, Sentra). As with most codes, that largely reflects how many of these vehicles are on the road at high mileage. Rubber and plastic intake parts harden with heat and age, so vacuum leaks become more likely once a vehicle passes about 100,000 miles, whatever the brand.
Why P0171 Shouldn’t Be Ignored
A small lean condition won’t strand you tomorrow, but it adds up. Lean combustion runs hotter, which is hard on spark plugs, valves and the catalytic converter. Over months, an ignored P0171 can turn a $200 hose repair into a misfire code (see our P0300 guide) or a failed converter and a P0420 code. Fuel economy also suffers the whole time, so waiting doesn’t really save money.
It also matters for inspection. Any stored check engine code means an automatic failure in emissions-testing states, so if your registration is coming up, fix it now rather than after a failed test.
Related Codes
- P0174 — System too lean, bank 2 (the other side of a V6 or V8)
- P0172 / P0175 — System too rich, bank 1 / bank 2 (the opposite problem)
- P0101–P0103 — Mass airflow sensor range or circuit problems
- P0300–P0306 — Misfires, which a lean condition can cause
- P0420 — Catalyst efficiency, which a long-term lean condition can eventually trigger
Frequently Asked Questions
What does code P0171 mean?
P0171 means “System Too Lean (Bank 1).” The engine computer is adding extra fuel to correct a lean air-fuel mixture and has reached its limit. Something is letting in unmeasured air or not delivering enough fuel.
What is the most common cause of P0171?
A vacuum leak is the most common cause, followed by a dirty mass airflow sensor. Cracked hoses, a failed PCV valve and a loose intake boot are frequent culprits and are usually inexpensive to fix.
How much does it cost to fix P0171?
Most drivers pay $180 to $450 for a vacuum leak repair, about $300 typical. Cleaning a MAF sensor at a shop is $100 to $200, while fuel system repairs like a fuel pump can reach $1,700.
Can I drive with a P0171 code?
Yes, for a short time if the car runs normally. A lean engine runs hotter and can damage spark plugs and the catalytic converter over time, so fix it within days to a couple of weeks. Stop driving if the check engine light flashes or the car stalls.
Can a dirty air filter cause P0171?
Not usually. A dirty air filter restricts air, which tends to make the mixture richer, not leaner. But a poorly seated air filter box or intake boot after a filter change can cause a lean code.
What is the difference between P0171 and P0174?
P0171 is a lean condition on bank 1 and P0174 is the same problem on bank 2. Having both at once points to a shared cause such as a large vacuum leak, a dirty MAF sensor or low fuel pressure.






