P0171 — System Too Lean (Bank 1)

P0171 means the engine is running lean: too much air, not enough fuel. It is usually driveable, but a lean mixture runs hot and can damage the converter and pistons if it is ignored.

Moderate

The engine will usually run, though it may idle roughly or hesitate. A sustained lean mixture raises combustion temperature and damages expensive parts over time. This code will cause an emissions test failure.

$20–$600Parts, typical range
0.5–2.5 hLabour
estimateNot a quote · 2026 basis

What P0171 means

The engine control module adjusts fuel delivery continuously using feedback from the upstream oxygen sensor. When it has to add more than roughly 25 percent extra fuel to reach the correct mixture and still cannot get there, it concludes the fault is outside its authority and sets P0171. The cause is almost always unmetered air entering after the mass airflow sensor, or a fuel system that cannot keep up.

Technical summary
SystemPowertrain — fuel and air metering

Symptoms you may notice

What causes P0171

Unmetered air entering after the airflow sensor

Very likelylow costeasy

A cracked intake boot, a perished vacuum hose, or a failed intake manifold gasket lets air in that the sensor never measured. This is the most common cause by a wide margin.

Contaminated mass airflow sensor

Likelylow costeasy

Oil residue from an over-oiled performance air filter coats the sensing element, so the sensor under-reports airflow and the module injects too little fuel.

Common misdiagnosis

Clean the sensor with dedicated MAF cleaner before replacing it; solvent damage is a common self-inflicted fault.

Fuel pump or filter cannot maintain pressure

Possiblemedium costmoderate

A tiring pump or a clogged filter holds pressure at idle but falls short under load, so the mixture goes lean exactly when the engine needs fuel most.

Exhaust leak ahead of the upstream sensor

Possiblelow costmoderate

A leak before the front oxygen sensor draws in ambient air between exhaust pulses, so the sensor reads lean and the module adds fuel it did not need to add.

How to diagnose it

1

Read short and long term fuel trim at idle and at cruise

With the engine warm, record both fuel trim values at idle and again at a steady 2500 rpm. The pattern tells you where to look before you touch a single part.

Tools: OBD-II scanner with live dataExpected: Combined trim within plus or minus 10 percentIf it passes: Trims are normal now; the fault is intermittent. Drive the vehicle and re-check.If it fails: Trim high at idle but normal at cruise points to a vacuum leak. High at both points to fuel delivery or the airflow sensor.
2

Inspect the intake tract for leaks

Examine the airflow sensor boot, every vacuum hose, the throttle body gasket, and the brake booster hose for cracks and loose clamps. Flex the intake boot with the engine idling and listen for a change.

Tools: Inspection lightIf it passes: No leak found. Continue to step 3.If it fails: Repair the leak, clear the code, and re-check the fuel trims.
3

Inspect and clean the mass airflow sensor

Remove the sensor and inspect the sensing wire for oily film or debris. Clean it only with dedicated mass airflow cleaner and let it dry completely before refitting.

Tools: Screwdriver set, MAF sensor cleanerIf it passes: Trims returned to normal after cleaning. The fault is resolved.If it fails: Trims unchanged. Continue to step 4.
4

Measure fuel pressure under load

Fit a fuel pressure gauge and compare readings at idle and under a road load against the manufacturer specification. A pump that holds pressure at idle can still fall short under demand.

Safety

Fuel lines are under pressure and petrol vapour ignites easily. Depressurise the system and work away from any ignition source.

Tools: Fuel pressure gaugeIf it passes: Pressure is within specification. Re-examine the exhaust ahead of the sensor.If it fails: Pressure is low under load. Replace the filter or pump as the test indicates.

Related codes

Common questions

Is it safe to drive with a P0171?

For short trips usually yes, but a lean mixture raises combustion temperature. Left alone it can damage the catalytic converter and, in the worst case, the pistons.

Why did P0171 come back after I cleared it?

Clearing the code erases the record, not the fault. The module re-runs its fuel trim monitor within a drive cycle or two and sets the code again if the lean condition is still present.

Last verified 2026-03-12 · Sources: SAE J2012 — Diagnostic Trouble Code Definitions and Failure Type Byte (SAE International)

This information is for general guidance and is not a substitute for professional diagnosis. Cost figures are estimates, not quotes.