P0171 is one of the most common check engine light codes on any vehicle. It means Bank 1 is running too lean -- the engine is getting too much air or not enough fuel. If you also have P0174, that's Bank 2 lean, and the diagnosis is the same.
This code is frustrating because the list of possible causes is long. But with the right approach and some OBD2 live data, you can narrow it down to the exact problem in minutes -- not days of throwing parts at it.
Your engine needs a precise 14.7:1 air-to-fuel ratio (called stoichiometric). The PCM constantly adjusts fuel delivery using data from the oxygen sensors. Fuel trims measure how much the PCM is compensating:
When LTFT reaches +25% or higher, the PCM can't add enough fuel to compensate and sets P0171. The engine is running lean, and the computer is maxed out trying to fix it.
This is the #1 cause of P0171 on most vehicles. Unmetered air enters the engine after the MAF sensor, so the PCM doesn't know it's there and can't add fuel to match.
Common leak points:
Spray carburetor cleaner around vacuum hoses and the intake manifold with the engine running. If RPMs change, you found your leak. A smoke machine is even better if you have access to one.
The Mass Airflow sensor measures incoming air. If it's contaminated with oil (especially from oiled air filters like K&N), it under-reads airflow and the PCM delivers too little fuel.
Fix: Clean with MAF sensor cleaner ($8 can). Don't use brake cleaner or carb cleaner -- they leave residue that damages the hot wire element. If cleaning doesn't work, replace it ($40-80 aftermarket).
A fuel pump that's dying often still runs -- just not at full pressure. You'll see lean codes mostly under load (highway driving, going uphill) because the pump can't keep up with demand.
How to check: Monitor fuel pressure with a gauge or live data PID. Most port-injected engines need 55-62 PSI. Direct injection engines run 500-2,900 PSI on the high-pressure side.
Injectors that are partially clogged can't deliver enough fuel. You'll usually see a lean code plus a misfire code (P030X) on the affected cylinder.
An exhaust leak near the manifold draws in outside air, which the upstream O2 sensor reads as a lean condition. The PCM adds fuel to compensate -- but the engine was never actually lean. This is a false lean code.
A lazy or biased oxygen sensor can report lean when the mixture is actually fine. This is less common than the other causes but worth checking if everything else looks good.
The fastest way to find the cause is with fuel trim data. Here's the method professional technicians use:
Connect your OBD2 scanner and monitor these PIDs:
| Total Fuel Trim | What It Means |
|---|---|
| -10% to +10% | Normal range -- no problem |
| +10% to +20% | Slightly lean -- something is starting to fail |
| +20% to +25% | Significantly lean -- code will set soon |
| +25% or higher | P0171 territory -- PCM is maxed out |
This step is the key to narrowing down the cause:
| Fuel Trim Pattern | Most Likely Cause |
|---|---|
| High at idle, drops at 2,500 RPM | Vacuum leak (unmetered air matters less at higher airflow) |
| Normal at idle, high at 2,500 RPM | Fuel delivery problem (pump, filter, or restricted line) |
| High at both idle and 2,500 RPM | MAF sensor under-reading or major fuel issue |
| High only under load (driving) | Weak fuel pump -- can't keep up with demand |
ScanFixAI's AI diagnostics automatically analyze your fuel trim patterns and tell you the most likely cause. Instead of memorizing these tables, let the AI read the data and give you a plain-English diagnosis.
At idle, a healthy MAF sensor should read approximately 2-7 grams/second for a 4-cylinder engine and 4-12 g/s for a V6 or V8. If the reading is significantly low, clean or replace the MAF.
The upstream O2 sensor should switch between 0.1V (lean) and 0.9V (rich) several times per second at idle. If it's stuck below 0.3V or switching very slowly, the sensor itself may be the problem.
| Vehicle | Most Common P0171 Cause |
|---|---|
| Ford F-150 / Mustang (4.6/5.4) | Cracked PCV elbow or intake manifold gasket |
| Toyota Camry / Corolla | Intake manifold gasket or brake booster hose |
| Chevy Silverado / Tahoe | Intake manifold gasket (plastic manifold warps) |
| Honda Civic / Accord | Leaking EVAP purge valve (stuck open) |
| BMW 3 Series / X3 | Cracked DISA valve or CCV hose |
| VW/Audi (TSI/TFSI) | Torn PCV diaphragm or intake flap motor |
| Hyundai/Kia (Theta II) | Purge valve or intake manifold runner control |
A lean-running engine produces higher exhaust gas temperatures. Over time, this cooks your catalytic converter (turning a $50 fix into a $1,500 fix) and can warp exhaust valves. Fix P0171 promptly.
| Repair | DIY Cost | Shop Cost |
|---|---|---|
| Vacuum hose replacement | $5 - $15 | $75 - $150 |
| MAF sensor cleaning | $8 (cleaner) | $50 - $100 |
| MAF sensor replacement | $40 - $80 | $150 - $250 |
| Intake manifold gasket | $25 - $60 | $300 - $600 |
| EVAP purge valve | $20 - $50 | $100 - $200 |
| Fuel pump replacement | $100 - $200 | $400 - $800 |
Start with the cheap stuff. Clean the MAF sensor, check for vacuum leaks, and read your fuel trim data before ordering expensive parts. With the right live data, you'll know exactly what to fix.
Read codes, run full module scans, and get AI-powered repair guidance. Free download, no account required. Pro unlocks guided diagnostics for every module.
Download ScanFixAI Free