P0171 Code: System Too Lean (Bank 1)
P0171 means bank 1 is running too lean, so the engine is getting more air than fuel. You can drive short term, but lean running raises combustion temperature. Find the air leak before it costs you a head gasket.
Conditional — drive it, watch these
Can you drive with P0171?
Yes, but only while all of these stay true.
Keep driving only while every one of these is still true:
- No misfire codes alongside it
- No overheating
- Idle stays reasonably steady
How long can you keep driving?
2 months Estimate
Nobody can give you an exact number from behind a screen. This is a planning window, not a promise. It assumes the conditions above stay true.
Stop and park it the moment any of these happens
- Temperature gauge climbs above normal
- Misfire code appears alongside
- Loss of power
What happens if you don't fix it
| Time | What happens | What it costs you |
|---|---|---|
| 1 month | Lean running raises combustion temperature | No direct cost |
| 3–6 months | Head gasket or exhaust valve damage from sustained lean burn | $1,500 – $4,000 |
Symptoms you can actually notice
- Rough idle
- Hesitation on acceleration
- Poor fuel economy
- Occasional lean misfire
What the computer is actually complaining about
The upstream oxygen sensor reads leftover oxygen in the exhaust. Too much oxygen means too little fuel, so the computer adds fuel until the long-term trim hits its ceiling. Once trim cannot close the gap, it stores P0171 and lights the dash. A vacuum leak past the airflow sensor causes most of them.
Most likely causes, cheapest check first
| # | Cause | Odds | Cost to check |
|---|---|---|---|
| 1 | Unmetered air leak after the MAF | Likely | $6 |
| 2 | Dirty or contaminated mass air flow sensor | Likely | $10 |
| 3 | Weak fuel pump or clogged filter | Possible | $25 |
| 4 | Leaking PCV hose | Possible | Free |
| 5 | Upstream oxygen sensor reading low | Unlikely | Free |
What you need in your hands
-
OBD-II scanner with live data
Any $25 Bluetooth reader plus a free app shows short and long-term fuel trim. That one number is the whole diagnosis.
-
Mass air flow sensor cleaner Optional
$8 to $15 for a can at any parts store. Never use brake cleaner on the sensor element.
-
Propane torch or carb cleaner Optional
$6 for a can. Used unlit to spray around intake joints and watch the idle change.
Test it yourself, step by step
Do these in order. Each step tells you what to do, what to look at, what counts as fine, what counts as broken, and what you will actually see.
-
1 Plug the scanner into the trapezoid port under the dash on the driver side, above your left knee. Warm the engine and open the fuel trim screen.
- Look at
- Long-term fuel trim on bank 1 at idle, then again at 2500 rpm held steady for one minute.
- Fine if
- Long-term trim sits inside plus or minus 10 percent at both idle and higher rpm.
- Broken if
- Trim runs above plus 15 percent at idle but drops near normal at 2500 rpm. That pattern means a vacuum leak, not a weak fuel pump.
What you'll see A percentage that climbs at idle and falls when you raise the rpm. Watching it move tells you which direction to look.
-
2 Open the hood and trace the large rubber intake tube from the air box on the passenger side to the throttle body at the top of the engine.
- Look at
- Cracks, loose clamps, or a hose that pulls away when you wiggle it with the engine idling.
- Fine if
- A tube that flexes without changing the idle note and clamps that grip firmly at both ends.
- Broken if
- The idle rises or smooths out when you wiggle a joint. That proves air is entering downstream of the airflow sensor.
What you'll see A steady hiss. A joint that changes the idle when you move it is the leak.
-
3 With the engine idling, spray short bursts of carb cleaner around the intake manifold gasket where it meets the cylinder head, working from the front of the engine toward the rear.
- Look at
- Whether the idle speed jumps for a second right after a spray lands on a joint.
- Fine if
- No change in idle at any joint along the manifold flange.
- Broken if
- The idle rises when you spray a specific spot. That spot is drawing unmetered air.
What you'll see A brief stumble or a rise in rpm at one exact spot. Keep the spray moving and watch for the change.
-
4 Pull the mass air flow sensor out of the intake tube directly behind the air box. It sits on top, held by two screws, with a wire connector on the side.
- Look at
- The thin wire element inside the sensor housing for dust, oil film, or a broken filament.
- Fine if
- A clean, bright element with no visible coating and no debris stuck to it.
- Broken if
- A dull or oily film on the element, or a filament that looks broken. A dirty sensor under-reports airflow and leans the mixture out.
What you'll see A tiny wire you can barely see. Spray it from six inches and let it air dry before it goes back in.
-
5 Check fuel pressure at the test port on the fuel rail along the top of the engine. Attach a gauge and read it at idle, then pinch the return line briefly.
- Look at
- The pressure reading in PSI against the factory spec for your engine, and whether it holds after you shut the key off.
- Fine if
- Pressure sits within a few PSI of spec and holds for at least ten minutes after shutdown.
- Broken if
- Pressure reads low, or it bleeds down quickly after shutdown. That points at a weak pump or a leaking regulator.
What you'll see A needle that jumps to spec and stays there. A slow drop after shutdown means pressure is escaping somewhere.
Stop and hand it to a shop if
- The temperature gauge climbs above its normal position, which means lean running is already causing heat damage.
- A misfire code appears alongside P0171, because a lean cylinder can burn a valve.
- The car loses power suddenly or will not accelerate past 40 mph.
What the repair costs
| Shop | Dealer | DIY |
|---|---|---|
| $100 to $600 Parts and labor | Not verified No dealer quote data for this code yet. We don't print a number we can't source. | $10 to $200 Parts only, your own labor |
| vacuum hose | $5 – $25 |
|---|---|
| MAF sensor | $40 – $150 |
| fuel pump | $80 – $300 |
Reference range compiled from 2 source type(s), as of 2026-11. This is not a quote — actual cost depends on your vehicle, region, and which part turns out to be the real cause.
How to check what the shop tells you
Ask for the long-term fuel trim before and after the repair. A shop that replaced a mass air flow sensor without showing you a trim number is guessing. Also ask whether they smoke-tested the intake, since a smoke machine finds leaks that a visual check misses.
How to confirm it's really fixed
Clear the code and drive two full warm-up cycles with a mix of idle and highway time. Long-term trim should settle inside plus or minus 10 percent and stay there. If the code returns with the same trim pattern, the leak was not fully sealed.
Common questions
Can I drive with a P0171 code?
Yes for a short while. Lean running raises combustion temperature, so a month of ignoring it can cost a head gasket. Fix the leak first.
How much does a P0171 repair cost?
A vacuum hose runs $5 to $25. A mass air flow sensor runs $40 to $150. A shop charges $100 to $600 depending on what the smoke test finds.
What is the most common cause of P0171?
A vacuum leak after the airflow sensor. A cracked intake tube or a failed intake gasket lets in air the computer never measured.
Can a dirty mass air flow sensor cause P0171?
Yes. A coated sensor element under-reports airflow, so the computer injects too little fuel and the mixture runs lean.
Will P0171 pass an emissions test?
No. A stored P0171 fails an emissions test, and the fuel trim monitor has to run clean before the car can be tested.