Freeze Frame
P0171

System Too Lean (Bank 1)

Severity Moderate Safe to drive? Short term System Fuel and air metering Applies to All OBD-II vehicles, 1996 and newer

In plain English: The engine computer has run out of room adding fuel to correct a mixture that keeps reading lean on bank one.

Short trips are fine. Sustained lean running raises combustion temperature and, left long enough, damages the catalytic converter and can burn valves — so this is one to fix in weeks, not months.

Most likely cause: unmetered air leak — vacuum hose, intake boot or gasket (42% of cases). Cheapest first test: read long term fuel trim at idle, then at twenty five hundred rpm. Typical repair runs $8–$600 in parts.

What P0171 actually means

The oxygen sensor tells the computer there is too much oxygen left in the exhaust, so the computer adds fuel to compensate. That correction is called fuel trim, and you can read it as a percentage on any scan tool. Short term trim is the instant correction; long term trim is what the computer has learned it needs all the time.

Trim is supposed to hover near zero, within about plus or minus five percent. When the computer has to add roughly twenty five percent extra fuel and still cannot get the mixture right, it gives up and sets this code. So the code does not mean the engine is lean — it means the correction ran out of headroom.

air in → Engine exhaust → MAF measures air going in O2 sensor grades the result ECM adds fuel to correct injectors long term fuel trim +25% — at the limit
A measurement below spec — not a part failure report.

Symptoms

Most likely causes, ranked

Unmetered air leak — vacuum hose, intake boot or gasket 42%
By far the most common. Air entering after the mass airflow sensor is never measured, so the computer never accounts for it.
Dirty or failing mass airflow sensor 20%
A contaminated sensor under-reports airflow, so the computer injects too little fuel. Often fixed with eight dollars of cleaner.
Weak fuel delivery — pump, filter or injectors 15%
The distinguishing sign is that it gets worse under load, not better.
PCV system leak or stuck-open valve 11%
A torn PCV hose is just a vacuum leak in a place people forget to look.
Exhaust leak ahead of the oxygen sensor 7%
Outside air pulled into the exhaust makes a perfectly good mixture read lean.
Failing oxygen sensor reporting falsely lean 5%
Least likely, and the reason you never start by replacing the sensor.

Long term fuel trim vs engine speed — the test that splits the causes

Warm the engine up, put your scan tool on long term fuel trim for bank one, and record it at idle, then at fifteen hundred, two thousand and twenty five hundred RPM.

0.0 7.0 14.0 21.0 28.0 35.0 600 1080 1560 2040 2520 3000 Long term fuel trim (%) Engine speed (RPM) Healthy engine Air leak — falls with RPM Fuel delivery — rises with RPM
Falls with RPM = unmetered air leak. Rises with RPM = fuel delivery.

This flat line near zero is what a healthy engine looks like. The correction barely moves as airflow rises.

This is an air leak. Trim is enormous at idle and falls away as RPM climbs, because a fixed-size leak matters less and less as real airflow increases. If your line slopes down like this, go looking for the leak.

And this one is fuel delivery. Trim is acceptable at idle and gets worse as demand rises, because the pump or injectors cannot keep up. Same code, opposite slope, completely different repair.

How to diagnose it, in order

  1. Read long term fuel trim at idle, then at twenty five hundred RPM.
    This single reading splits the entire diagnosis in two, and it costs nothing. High at idle and falling means unmetered air. Low at idle and rising means fuel delivery. Write both numbers down before you touch anything.
    Then → step 2
  2. Does the trim improve when you find and block a suspected air leak?
    Smoke test the intake if you have the tool. If not, watch live trim while spraying a little carburettor cleaner around the intake boot, vacuum lines and gaskets. A sudden trim swing tells you exactly where the leak is. Do not skip the PCV hoses.
    Yes → Repair the leak, clear, re-drive
    No → go to step 3
  3. Is the mass airflow reading plausible for the engine size?
    A rough rule for a naturally aspirated engine: at idle expect roughly one to two grams per second per litre of displacement, and near wide open throttle expect about eighty percent of the engine's litres times its RPM in grams per second. Reading low means the sensor is under-reporting. Clean it properly with MAF cleaner before you buy one.
    Yes → go to step 4
    No → Clean the MAF sensor; replace only if cleaning fails
  4. Does fuel pressure hold to spec under load?
    Gauge on the rail, then load the engine. Pressure that sags as demand rises is a weak pump, a clogged filter or a failing regulator. This is the path the rising-trim line pointed at.
    Yes → go to step 5
    No → Repair fuel delivery — filter, pump or regulator
  5. Is the upstream oxygen sensor switching normally?
    Only now, with air leaks, metering and fuel pressure all ruled out, does the sensor itself become the likely fault. A sensor stuck low reports lean forever and the computer keeps chasing it.
    Yes → Re-check for small leaks — something was missed
    No → Replace the upstream O2 sensor

Read the trims first and you won't replace a fuel pump when it was a five dollar hose.

What you need to do this yourself

Some links may be affiliate links. They cost you nothing extra and do not change which tools are recommended — the diagnostic order on this site is the same either way.

What it costs to fix

RepairPartsLabour
Vacuum hose or intake boot
The most common outcome, and often a ten minute job.
$8–$60 0.5 h
MAF sensor cleaner
Try this before buying any sensor. It frequently is the whole repair.
$8–$15 0.2 h
Intake manifold gasket
Cheap part, real labour, depending on how buried the manifold is.
$25–$120 2.5 h
Mass airflow sensor
Use an OEM or known-good brand; cheap MAF sensors frequently read wrong out of the box.
$60–$300 0.3 h
Fuel pump or filter
The expensive branch, and the one the rising-trim line points to.
$60–$600 2.5 h

Most of the time this is a hose. The reason to read the trims before spending anything is that the cheapest and the most expensive repairs on this list set exactly the same code.