P0171 Code: How to Find and Fix a "System Too Lean, Bank 1" Fault
The check engine light is on, the idle feels a little lumpy, and your scanner says P0171 – System Too Lean (Bank 1). It's tempting to start ordering sensors. Hold off. A P0171 code tells you the engine computer is adding extra fuel to make up for something; your job is to find out what. Very often, that something is a $15 hose.
P0171 in Plain English: Too Much Air, Not Enough Fuel
P0171 means the engine computer has added as much fuel as it's allowed on Bank 1, and the mixture still reads lean. It names a condition, too much air for the fuel going in, not a failed part.
Here's how it gets there. The upstream oxygen sensor (an air/fuel ratio sensor on many newer cars) reports how much oxygen is left in the exhaust, and the computer trims the injector pulse to stay on target. Those corrections show up on a scanner as fuel trim: short-term trim reacts second by second, long-term trim is what the computer has learned over time. Plus-side numbers mean extra fuel. Once the correction hits the automaker's limit, P0171 sets, the kind of check California's OBD II rule (13 CCR 1968.2) requires.
"Bank 1" is the side of the engine with cylinder 1. An inline four or six has only one bank, so P0171 covers the whole engine; on a V6 or V8, P0174 is the matching Bank 2 code. Our P0151 Bank 2 Sensor 1 guide explains bank and sensor numbering.
What Would Cause Bank 1 to Be Lean?
P0171 comes from anything that adds air the MAF didn't measure, or delivers less fuel than the computer commanded. Here's the order to check, from most common and cheapest down:
- Vacuum or intake leak after the MAF (most common, often cheapest fix). A cracked intake boot, a split vacuum line, a loose brake booster hose or a leaking intake gasket.
- PCV hose, valve or oil-cap seal (cheap, easy to miss). The crankcase ventilation path is connected to intake vacuum, so a torn hose or a missing cap seal acts like a leak.
- Dirty or failing MAF sensor (common on high-mileage cars). If it under-reports airflow, the computer under-fuels.
- EVAP purge valve stuck open (often overlooked). It can pull extra air and vapor into the intake at idle.
- Weak fuel delivery (shows up under load). A tired pump, a clogged filter or a faulty pressure regulator.
- Clogged or leaking injectors (more likely when only one bank is lean).
- Exhaust leak upstream of the front O2 sensor (sneaky). Outside air pulled in at the leak makes the sensor read lean, so the computer adds fuel the engine didn't need.
What Is the Most Common Cause of a P0171 Code?
Short answer: unmetered air, meaning a vacuum or intake leak somewhere after the MAF sensor. Rubber and plastic get brittle with heat and age, and the leak doesn't have to be big. A small leak matters most at idle, when the engine pulls very little air in total. That gives you a simple clue:
- Trims high at idle, then near normal at 2,500 rpm → vacuum leak is the lead suspect.
- Trims stay high or get worse as rpm and load rise → look at fuel delivery or the MAF.
P0171 Symptoms: Can You Keep Driving?
Most cars with P0171 show a check engine light, a rough idle or some hesitation, and some show nothing else. If the light is solid and the car drives normally, a few days of careful driving while you diagnose is usually fine. Don't stretch that to months: a lean engine runs hotter, which is hard on valves and the catalytic converter, and a lean misfire can turn a cheap repair into a converter replacement.
Symptoms to watch for:
- The check engine light, sometimes with no change in how the car drives
- A rough or hunting idle, the kind that can make the car shake at idle
- Hesitation or stumbling when you accelerate
- Hard starting, especially after the car sits
- A hissing sound near the intake (a big vacuum leak)
- Worse fuel economy, since the engine runs less efficiently
Red Flag: A flashing check engine light, stalling or heavy misfiring means park it. Our guide to a flashing check engine light with car shaking explains why that combination is urgent.
How to Fix Fault Code P0171?
Find the cause before you buy parts: save the codes, compare fuel trims at idle and 2,500 rpm, then check for air leaks, the purge valve, the MAF and fuel delivery, in that order. If another code is stored with P0171, fix that one first.
STEP 1Scan and Save Before You Clear
Read every stored and pending code, then save the freeze frame data. What's recorded varies by vehicle; on many engines it includes items such as rpm, coolant temperature, load, vehicle speed and fuel trim. A P0171 that set at warm idle points a different way than one that set at highway speed.
STEP 2Read Fuel Trims at Idle and 2,500 RPM
Warm the engine fully, write down Bank 1 STFT and LTFT at idle, then hold about 2,500 rpm and write them down again. Use the clue from the causes section: better at higher rpm → leak; worse under load → fuel or MAF.
Rule of thumb: add short-term and long-term trim to get the total correction. On many engines, healthy total trim at warm idle sits within roughly ±10%. That's a typical example, not a pass/fail spec; the factory service information wins. Our guide to reading OBD2 live data shows how to graph both.
STEP 3Hunt for Unmetered Air
- Inspect the intake boot between the MAF and throttle body, especially the folds underneath.
- Follow every vacuum line, the PCV hose and the brake booster hose. Listen for hissing.
- Check that the oil filler cap and dipstick seal properly.
- Shops: a smoke test finds leaks you can't see or hear. Follow the machine maker's pressure guidance.
STEP 4Rule Out the Purge Valve
A purge valve that leaks at idle acts like a vacuum leak and can set P0171 on its own. On supported vehicles, use an active test to command the valve closed and watch short-term trim. If trim drops back toward normal → the valve is leaking. Our P0455 EVAP guide covers the rest of that system.
STEP 5Check the MAF Sensor
Graph MAF airflow against rpm. A reading that looks low for the engine size, or that doesn't rise smoothly, makes the MAF a P0171 suspect. Clean it with spray made for MAF sensors before replacing it. Our Nissan P0101 MAF guide walks through a typical cleaning job.
STEP 6Check Fuel Pressure and the Front O2 Sensor
If trims climb under load, connect a fuel pressure gauge and compare against the factory spec at idle and under load. On supported vehicles, use active tests to run the pump or check injectors. Then check for exhaust leaks between the engine and the front O2 sensor before you condemn the sensor itself.
How to Fix System Too Lean Bank 1 When Only One Bank Is Lean
On a V6 or V8, P0171 alone (no P0174) narrows the hunt. Shared parts like the MAF, fuel pump and PCV feed both banks, so they're less likely. Focus on what only Bank 1 has:
- The intake manifold gasket on the Bank 1 side
- Bank 1 injectors (clogged or weak)
- A cracked Bank 1 exhaust manifold or a loose flange before the O2 sensor
- The Bank 1 upstream O2 sensor and its wiring
On an inline engine, Bank 1 is the whole engine, so work through Steps 3–6 in order.
Fix Companion Codes First
A lean code that follows another fault often clears once the first problem is repaired, so check what else is stored with P0171:
| Companion Code | What It Adds to the Story |
|---|---|
| P0174 (Bank 2 lean) | Both sides lean together → look at parts that feed both banks: MAF, fuel pressure, PCV or a big intake leak. |
| P0101 / P0102 (MAF) | The airflow reading itself is suspect. Check the MAF before chasing leaks. |
| P0300–P0308 (misfire) | A lean mixture can cause misfires, and a misfire can fool the oxygen sensor. Sort out which came first. |
| P0496 (EVAP high purge flow) | The purge valve may be letting vapor and air into the intake when it shouldn't. |
| P0087 (fuel rail pressure too low) | A fuel-supply problem is now the lead suspect. |
P0171 Cost to Fix: What You'll Likely Pay
Fixing P0171 costs anywhere from under $50 for a vacuum hose to several hundred dollars for a sensor, injectors or a fuel pump; the cause decides the bill. The first four rows below are national averages for parts and labor from the 2026 CarMD Vehicle Health Index (2025 repair data). The rest are our estimates for U.S. independent shops at an assumed $110–$170 per labor hour.
| Repair | Typical Cost | Source |
|---|---|---|
| Replace oxygen sensor(s) | $286.87 average | CarMD 2026 |
| Replace mass air flow sensor | $346.21 average | CarMD 2026 |
| Replace EVAP purge control valve | $172.12 average | CarMD 2026 |
| Replace fuel injector(s) | $572.27 average | CarMD 2026 |
| Vacuum or PCV hose | $45–$210 | Estimate |
| Smoke test diagnosis | $55–$170 | Estimate |
| Intake manifold gasket | $195–$800 | Estimate |
| Fuel pump module | $260–$1,000+ | Estimate |
Bottom line: swapping an O2 sensor and a MAF sensor "because the code said lean" costs about $633 at CarMD's averages, and neither part may be bad. Twenty minutes with fuel trim data tells you which row of this table you're actually in. That's why testing first is the cheapest step of any P0171 repair.
LAUNCH Scanners for Diagnosing P0171
To diagnose P0171 with evidence instead of guesses, you need fuel trim and MAF graphs, freeze frame and bi-directional active tests. Two LAUNCH scanners cover all three: the LAUNCH X431 CRP919X BT for DIY owners and small shops, and the LAUNCH X431 V+ 5.0 PRO3 for busy shops and V6 or V8 work. Here's how they compare on a lean code:
| Feature | CRP919X BT | V+ 5.0 PRO3 |
|---|---|---|
| Live data graphing | Yes, fuel trims and MAF airflow | Yes, 12-in-1 graph |
| Freeze frame | Yes | Yes |
| Active tests | Fuel pump, injector and solenoid tests on supported vehicles | 3,000+ active tests on supported vehicles |
| Connection | Bluetooth VCI, up to 33 ft | DBScar VII Bluetooth connector |
| Screen | 7-inch | 10.1-inch |
| Included update period | 2 years free | 2 years free |
LAUNCH X431 CRP919X BT: For DIY Owners and Small Shops
- Solves: the "leak or fuel?" question. It reaches every module the car exposes, plots fuel trims against MAF airflow, stores freeze frame, and commands the fuel pump, injectors and solenoids on supported vehicles. Its wireless VCI lets you watch trims at the engine bay while you flex hoses.
- Best fit: owners who fix their own cars and small shops that want all-system access in a 7-inch handheld.
LAUNCH X431 V+ 5.0 PRO3: For Busy Shops and V-Engine Work
- Solves: the "one bank or both?" question on V6 and V8 engines. It lays Bank 1 and Bank 2 trims, MAF and rpm on one 10.1-inch screen with its 12-in-1 graph, and adds active tests where the vehicle supports them, plus pre- and post-repair reports for the customer.
- Best fit: independent shops and mobile techs who see lean codes every week and want a bigger screen and deeper coverage.
After the Repair: Confirm, Clear and Prevent
After the P0171 repair, recheck trims at idle and 2,500 rpm. You want them back near the same range on both banks and steady. Then clear the codes. Here's how to reset the check engine light with an OBDII scanner.
If your scanner still lists P0171 as a permanent code, that's normal. California's Bureau of Automotive Repair (BAR) explains that a permanent code can't be erased with a scan tool or a battery disconnect; it clears on its own after the monitor reruns and passes. Drive a normal mix of city and highway miles over the next few days.
To keep P0171 from coming back:
- After any intake, throttle body or air filter work, recheck every clamp and hose you touched.
- Replace brittle vacuum and PCV hoses when you see cracks, not after they split.
- Change the air filter on schedule so dirt doesn't reach the MAF.
- Glance at fuel trims during routine scans. A long-term trim creeping upward month by month is an early warning.
Summary: Follow the Trims
A P0171 code is a symptom, not a part number.
Read the fuel trims, compare idle against 2,500 rpm, hunt for unmetered air, and let the data decide whether you need a sensor, a fuel pump or just a new hose. Ready to see your own fuel trims? Start with a scanner that graphs live data and runs active tests, and diagnose your next P0171 with evidence instead of guesses.
FAQ
How much does it cost to fix P0171?
Anywhere from under $50 for a vacuum hose to several hundred dollars for a sensor. CarMD's 2026 index puts average MAF sensor replacement at $346.21 and O2 sensor replacement at $286.87.
What is the most common cause of a P0171 code?
A vacuum or intake leak after the MAF sensor. Cracked hoses, a split intake boot and PCV leaks top the list.
Can a dirty MAF sensor cause P0171?
Yes. A contaminated MAF can under-report airflow, so the computer delivers too little fuel. Clean it with MAF-specific spray and recheck trims before replacing it.
Will P0171 clear by itself?
The check engine light may turn off once the cause is fixed and the monitor passes. A stored or permanent P0171 can take a few days of normal driving to clear.
Can P0171 damage my engine?
Driving lean for a long time can raise combustion temperatures and cause misfires, which can damage the catalytic converter. Fix it within days or weeks, not months.