What P0171 means
The oxygen sensors report the mixture is running lean — more air than the injected fuel accounts for — and the computer has maxed out its correction trying to compensate. Almost always this means unmetered air is sneaking in (a vacuum leak) or the airflow sensor is under-reporting, not that fuel is genuinely short.
What you’ll notice
- Check engine light
- Rough idle that smooths at higher RPM
- Hesitation or stumble on acceleration
- Sometimes idle surging
Likely causes and repair cost
Broad US independent-shop bands, parts and labour.
Can you drive with P0171?
Drivable in the short term; sustained lean running raises combustion temperatures and, over time, risks damage to pistons and valves. Weeks of margin, not months.
The misdiagnosis to avoid
Replacing oxygen sensors because they're the components in the story. The sensors are the reporters, not the fault — they measured lean correctly. The classic P0171 fix is a $30 intake boot found in a $90 smoke test, discovered after $400 of sensors changed nothing.
How P0171 actually gets set
The computer targets a specific air-fuel ratio and uses the oxygen sensors to check whether it hit it. When it has to keep adding or subtracting fuel to stay on target, it records that correction as fuel trim. A code sets when the correction exceeds roughly 25% for long enough — meaning the engine is no longer running on its designed mixture and the computer has run out of authority to hide it.
What a scan tool shows that the code does not
Short-term and long-term fuel trim percentages, at idle and at cruise, are the whole diagnosis and none of it is in the code. Trim that is high at idle but normal at higher rpm points at a vacuum leak, because an unmetered air leak matters proportionally less as real airflow rises. Trim that is high across the whole range points at measurement or fuel delivery instead.
The trap with this family of codes
Buying oxygen sensors. The sensor reporting the problem is usually the one part working correctly — it is doing its job by telling you the mixture is wrong. A lean code is far more often a torn intake boot, a cracked vacuum hose, a leaking intake gasket or a dirty mass airflow sensor, and the cheapest of those costs ten dollars to clean.
What happens when you clear it
Fuel trim values reset when the code is cleared and take time to relearn, so clearing immediately before a diagnosis destroys the most useful evidence. Read the trims before anyone clears anything.
A lean condition left running is harder on an engine than a rich one, because it burns hotter. A rich condition wastes fuel and eventually clogs the catalytic converter. Neither is an emergency; neither should be ignored for a year.
Describe what it’s doing in your own words and the symptom checker gives you a safe-to-drive verdict, ranked causes with costs, and notes to take to the shop — free, no sign-up.
A basic code reader costs around $25 and usually pays for itself the first time a warning light comes on. We compare them in choosing an OBD2 scanner.
Questions people ask
What's the cheapest first move on P0171?
Clean the MAF sensor with dedicated MAF cleaner ($10) and inspect the big intake tube between airbox and throttle for cracks — flex it open with the engine running and listen for idle change. Those two DIY steps resolve a genuinely large share of P0171s.
Why does it idle rough but drive fine?
A vacuum leak is a fixed-size hole; at idle it's a large fraction of total airflow, at cruise it's a rounding error. Roughness that vanishes with RPM is close to a vacuum-leak signature — and the smoke test is the direct path to the hole.
P0171 and P0174 together — what changed?
Both banks lean at once shifts suspicion to what's shared: a single large vacuum leak (intake manifold, brake booster hose), the one MAF sensor, or overall fuel pressure — rather than a per-bank fault. Paired lean codes narrow the search usefully.