P0171Generic code

P0171 Code: System Too Lean (Bank 1)

The P0171 code means the computer had to add fuel for a long time to make up for a lean mixture and ran out of room to correct. Either more air is getting in than the computer measures, or less fuel is arriving than it commands. Unmetered air leaks are by far the most common cause.

Severity
Medium
Can I keep driving?
Yes, but with caution
Estimated cost
$20 to $600
Difficulty
Medium
System
Air and Fuel
Applies to
All OBD2 vehicles

Common in: Audi, BMW, Chevrolet, Fiat, Ford, Honda, Hyundai, Kia, Mazda, Mercedes-Benz, Nissan, Renault, Seat, Toyota, Volkswagen

On this page

What the P0171 code means

The computer constantly adjusts how much gasoline is injected based on what the oxygen sensors report. That correction is shown as fuel trims: the short term trim reacts instantly, and the long term trim memorizes the trend.

When the sum of both goes beyond roughly 25 percent for long enough, the computer concludes it cannot make up any more and stores the P0171 code. Bank 1 is the side of the engine where cylinder number one sits.

There are only two possible explanations: air is getting in that is not being measured, or less fuel is arriving than commanded. The whole diagnosis comes down to separating those two branches before you touch a single part.

It is worth knowing how the correction is split between the two fuel trims, because it shows where the problem is. The short term trim reacts instantly and the long term trim memorizes the trend. If the long term trim is strongly positive and the short term trim hovers around zero, the computer has already learned to compensate for the leak and is running with that correction built in.

That has a practical consequence: after the repair, you should clear the learned trims and then confirm the P0171 code does not return. If you skip the clearing step, the engine keeps adding extra fuel for a while, and a rich code can show up until the system adapts again.

P0171 code symptoms

  • Check engine light on.
  • Unstable idle, especially with a cold engine.
  • Hesitation and jerking when you accelerate.
  • Loss of power and a sluggish response.
  • Higher fuel consumption, since the computer injects extra fuel to compensate for the condition that sets the P0171 code.
  • An audible hiss in the engine compartment if there is a large vacuum leak.
  • Risk of misfires if the mixture becomes very lean.
  • Long term fuel trim strongly positive while the short term trim hovers near zero.
  • Idle that improves when you press the throttle slightly, typical of a vacuum leak.

Likely causes of the P0171 code

  1. Vacuum leaks. Cracked hoses, a hardened intake manifold gasket, a stuck PCV valve, the brake booster hose or an oil cap that is not sealing.
  2. Dirty or out of calibration MAF sensor, which reports less air than is really entering.
  3. Air leaks after the MAF, in the intake boot or at the air box connections.
  4. Low fuel pressure from a weak pump, a clogged filter or a faulty regulator.
  5. Partially clogged injectors, which deliver less flow than commanded.
  6. Exhaust leak ahead of the O2 sensor, which lets air in and skews the reading toward lean.
  7. Aged O2 sensor with a slow response.
  8. EGR valve that does not fully close.
  9. Deteriorated throttle body gasket, a subtle leak that is easy to overlook.
  10. Oil filler cap that is loose or has a broken seal, which lets unmetered air in through the crankcase ventilation circuit.
  11. Cracked oil separator in the crankcase ventilation system.

How to diagnose the P0171 code step by step

  1. Watch the fuel trims at idle and at 2,500 rpm. If the correction is very high at idle and returns to normal as the revs go up, that clearly points to a vacuum leak. If it stays high across the whole range, it points to the MAF or the fuel supply.
  2. Do a smoke test on the intake. It is the most reliable and fastest way to find air leaks.
  3. Visually inspect all the vacuum hoses, the PCV valve and the manifold gasket. Pay attention to fine cracks that only open up when the engine is hot.
  4. Check the MAF reading in grams per second and compare it with what you would expect for the engine.
  5. Measure fuel pressure with a gauge, at idle and under load. Pressure that drops when you accelerate gives away a weak pump or filter.
  6. Listen for exhaust leaks ahead of the O2 sensor, especially at the manifold.
  7. Check whether a P0174 is also stored. If both banks are lean, the cause is common: MAF, fuel pressure or a large leak. If only bank 1 is lean, the cause is local.
  8. Compare the short term and long term trims. A strongly positive long term trim with a stable short term trim means the system has already learned to compensate for the leak.
  9. Check the oil filler cap. A broken seal lets unmetered air in through the crankcase circuit.
  10. Inspect the throttle body gasket, a subtle leak that a visual check usually misses.

How to fix the P0171 code

  • Replace cracked vacuum hoses, and replace the PCV valve if it is stuck or hardened.
  • Replace the intake manifold gasket when the smoke test confirms the leak.
  • Clean the MAF sensor with a product made for it, and replace the intake boot if it has cracks.
  • Replace the fuel filter and, if pressure is still low, the pump or the regulator.
  • Clean or replace injectors with insufficient flow.
  • Repair exhaust leaks ahead of the O2 sensor.
  • Replace the O2 sensor if its switching is slow, but only after ruling out everything above.

After the repair, clear the codes and check that the fuel trims move back within a margin of plus or minus 10 percent.

  • Replace the throttle body gasket or the oil filler cap if their sealing is compromised.
  • Replace the oil separator in the crankcase ventilation system if it is cracked.
  • Clear the learned fuel trims after the repair so the system can adapt again from scratch.

Technical reference data

  • Normal fuel trims: between minus 10 and plus 10 percent, adding short term and long term.
  • Typical threshold that sets the code: total correction held above 20 to 25 percent.
  • Approximate fuel pressure on port injection: 3 to 4 bar (45 to 58 psi).
  • A healthy narrowband O2 sensor switches between 0.1 and 0.9 volts several times per second with a hot engine at idle.
  • Short term trim: immediate reaction. Long term trim: learned and memorized correction.
  • Normal values: between minus 10 and plus 10 percent, adding both together.
  • After the repair, clear the learned trims, or the engine keeps over-compensating for a while.

Brand-specific notes

When P0171 and P0174 appear at the same time, the cause is always common to both banks. Start with the MAF sensor, fuel pressure and large intake leaks, and stop hunting for individual injector failures.

One source of leaks almost nobody checks is the crankcase ventilation circuit: the filler cap, the oil separator and their hoses. They are cheap parts that produce exactly the same symptoms as an expensive sensor.

Frequently asked questions about P0171

What does it mean when the mixture is lean?
It means there is too much air compared with the amount of gasoline. The computer sees this through the O2 sensors and injects more fuel to compensate, until it reaches its correction limit and stores the code.
Can I drive with a P0171 code?
You can, with caution and only for a short time. A lean mixture that persists raises combustion temperature and can cause misfires that damage the catalytic converter.
Will replacing the O2 sensor fix the P0171 code?
Almost never. The sensor is correctly reporting a mixture that really is lean. Replacing it without finding the air leak or the fuel problem only delays the repair.
What is the difference between P0171 and P0174?
It is the same diagnosis applied to different banks. P0171 is bank 1 and P0174 is bank 2. When they show up together, the cause is common to the whole engine.
Do I need to clear anything after fixing the leak?
Yes, the learned fuel trims. If you do not clear them, the engine keeps adding extra fuel until the system adapts again, and a rich code may appear.
Can the oil cap cause a lean condition?
Yes. If its seal is broken or it does not close, unmetered air gets in through the crankcase ventilation circuit, and the effect is the same as a vacuum leak.
How much does it cost to fix P0171?
A vacuum hose or a cleaning of the MAF sensor can cost as little as $20. Fuel pump or injector work pushes the total toward $600.

Questions about the P0171 code

There are no questions about this code yet. Tell us about your case: vehicle, symptoms and what you have already checked.