Diagnostic guide
P0171 System Too Lean (Bank 1): Vacuum Leak, MAF or Fuel Delivery?
Written by WrenchLane's diagnostic AIreviewed pipeline
P0171 is one of the most common check-engine codes on any petrol engine — and one of the most commonly misdiagnosed. Because it names the fuel system, it often leads to quotes for oxygen sensors, mass air flow (MAF) sensors and fuel pumps when the actual fault is a cracked vacuum hose costing a fraction of the price. Here is what P0171 really means, the likely causes ranked, and the fuel-trim reading order a good shop follows before replacing anything.
What code P0171 means
P0171 is a generic OBD-II code that reads "System too lean (Bank 1)." Bank 1 is the engine side containing cylinder 1; most four-cylinder engines have only one bank.
"Lean" means more air than the delivered fuel can match. The engine control unit (ECU) constantly corrects the mixture using fuel trims — short-term (STFT, live) and long-term (LTFT, learned). When it has to add fuel beyond its correction limit for a sustained period, it sets P0171.
The code does not name a failed part — only that the ECU is compensating for extra air or missing fuel. How those trims behave across engine speeds, readable on any decent scan tool, is the most useful clue in this diagnosis. (On V-engines, P0171 together with P0174 — Bank 2 lean — points at a shared cause like the MAF or fuel pressure rather than a bank-specific gasket.)
Symptoms to confirm
- Check engine light with P0171 stored, sometimes intermittent
- Rough or unstable idle, often worse when cold
- Hissing or whistling at idle can accompany a vacuum leak — though many are silent
- Hesitation or stumble on light acceleration
- Occasional stalling at idle or when stopping
- Fuel economy slightly worse than usual
The car can also drive normally — no symptoms doesn't make the code spurious.
Likely causes, ranked
- Vacuum leak (unmetered air). The most common cause: cracked or disconnected vacuum hoses, a torn intake boot after the MAF, leaking intake manifold gaskets, a brake booster hose, or a stuck-open PCV valve. Air entering after the MAF isn't measured, so the ECU under-fuels.
- Dirty or failing MAF sensor. A contaminated MAF under-reports airflow across the whole range, so the ECU delivers too little fuel everywhere. Cleaning with dedicated MAF cleaner is cheap and sometimes resolves it.
- Fuel delivery restriction. A clogged filter, weak pump, failing pressure regulator or dirty injectors leave the injectors unable to match the metered air — worst under load, when fuel demand is highest.
- Exhaust leak before the upstream oxygen sensor. A cracked manifold or leaking gasket can pull outside air past the sensor between exhaust pulses, so the mixture reads leaner than it really is. Less common, but it fools the trims the same way.
Diagnostic steps (in order)
- Read the fuel trims, not just the code. With the engine warm, record STFT and LTFT at idle, then at a steady 2,500 rpm. High positive trims at idle that fall toward normal at higher rpm point at a vacuum leak — a leak is a fixed amount of air, so it matters most when total airflow is small. Trims that stay high across the range point at the MAF or fuel delivery. This one reading splits the diagnosis in half.
- Smoke test the intake. If the trims said "vacuum leak," a smoke machine fills the intake with visible smoke and shows exactly where it escapes — hoses, boots, gaskets, PCV circuit. It rules the leak in or out conclusively.
- Check the MAF against reality. Inspect and clean the sensor element, then compare its reading at wide-open throttle to what an engine of that size should flow. A clearly low reading with no leaks found rules the sensor in.
- Test fuel pressure and volume. If trims stay high everywhere and the MAF checks out, measure fuel pressure against specification, at idle and under load. Low or falling pressure rules in the pump, filter or regulator.
- Inspect the exhaust upstream of the O2 sensor. Look and listen for manifold and flange leaks, especially cold, when cracks are widest. This catches the false-lean case before anyone buys a fuel pump.
Reference: what fuel trim actually measures
P0171 is not a sensor reading. It is the engine computer reporting that its own correction has run out of room.
The upstream oxygen or air-fuel sensor tells the computer how the burn came out, and the computer lengthens or shortens injector pulse to bring the mixture back to stoichiometric. That correction has two layers: short-term trim, the live adjustment happening now, and long-term trim, the learned offset stored in the fuel tables. P0171 sets when the total correction stays beyond the limit set for that engine, for long enough to count. The exact trigger is calibration-specific rather than one universal number, though a sustained total correction in the region of +25% is already past what most engines can absorb. On a healthy engine both trims sit within roughly plus or minus 10% at idle and at cruise.
The discriminator the code itself cannot give you is in how the trim behaves as load changes:
- High at idle, falling as engine speed rises: unmetered air. A fixed-size leak is a large fraction of a small idle airflow and a small fraction of a large one.
- High and holding, or worse under load: fuel delivery, or a mass airflow sensor under-reporting. The engine is asking for more than it is being given.
- One that mimics both: an exhaust leak upstream of the sensor. Air drawn in past a cracked manifold or a bad gasket makes the mixture read lean when it is fine.
Same code, opposite repairs. Watching trim against engine speed separates them before anything is bought.
What a fair repair should cost
The honest-outcome range on this code is unusually wide — which is why the order above matters. Cheap end: a vacuum hose or clamp is often under €50 including labour, MAF cleaning €10–20, an intake boot or PCV valve typically under €150. Mid-range: intake manifold gaskets vary by engine, commonly €150–450. Expensive end: a MAF sensor roughly €80–300, a fuel pump €300–700 or more with labour. An hour of diagnostic time including a smoke test is money well spent; a pump or sensor quote with no recorded trims and no smoke test behind it deserves a second opinion.
The takeaway
P0171 says the engine is getting unmeasured air or not enough fuel — make the shop show you fuel trims at idle versus 2,500 rpm and a smoke-test result before agreeing to any sensor or pump.
FAQ
- Can I keep driving with a P0171 code?
Usually yes, for a short time. But sustained lean running raises combustion temperatures and can eventually damage the catalytic converter, and an engine that stalls at junctions is a safety issue. Get it diagnosed soon.
- Will replacing the oxygen sensor fix P0171?
Rarely. The upstream sensor is usually the messenger, not the fault — it is correctly reporting a lean mixture. Replacing it without reading fuel trims and smoke testing the intake is the classic wasted spend on this code.
- What is the most common cause of P0171?
Unmetered air — a vacuum leak from a cracked hose, torn intake boot, PCV fault or leaking intake gasket — is the most frequent culprit in practice, followed by a dirty MAF sensor. Fuel-delivery faults are real but further down the list, which is why trims and a smoke test come before any fuel-system parts.
Free tool
Symptom & DTC checkerBeta
Describe a symptom or enter a diagnostic trouble code (DTC) and get matched to a WrenchLane diagnostic guide — free, no signup.
