This post contains affiliate links.
Your Check Engine Light is on, you’ve pulled the code, and it reads P0171. Maybe the car idles a little rough, maybe it feels like it’s hesitating on acceleration, maybe you haven’t noticed anything at all. Either way, here’s what you need to know.

P0171 means your engine control module (ECM) has detected a “System Too Lean” condition on Bank 1 — there’s too much air relative to fuel in the mixture, and the ECM’s fuel trim correction has maxed out trying to compensate. That’s the short version. The full picture — including exactly what to check on your Honda Civic, Honda Accord, Toyota Camry, Toyota RAV4, or Ford F-150 — is below.
The good news: P0171 is rarely an emergency. The better news: it’s one of the most methodically diagnosable codes there is, because the fix almost always comes down to finding where unmetered air is getting in, or where fuel isn’t getting delivered as expected.
What Is the P0171 Code, Really?
Your engine needs a precise ratio of air to fuel to run properly — roughly 14.7 parts air to 1 part fuel at idle (the “stoichiometric” ratio). The mass airflow (MAF) sensor measures incoming air, and the ECM calculates how much fuel to inject based on that reading. Oxygen sensors in the exhaust then confirm whether the mixture actually burned correctly.
When the upstream oxygen sensor (or air-fuel ratio sensor) reports more oxygen in the exhaust than expected, the ECM assumes the mixture is running lean and adds fuel to compensate — this is called positive fuel trim. P0171 triggers when that correction climbs too high (typically above +20 to +25%) and stays there, meaning the ECM can no longer fully correct the imbalance on its own.
“Bank 1” refers to the cylinder bank that contains cylinder #1. On four-cylinder engines (most Civic, Accord, Camry, RAV4 four-bangers) there’s only one bank, so this distinction doesn’t matter much. On V6 engines (F-150, V6 Accord/Camry) it matters — P0171 points to one specific bank, while its sibling code P0174 points to the other. If both appear together, the cause is more likely something shared, like a MAF sensor or fuel pressure issue, rather than a leak confined to one side of the engine.
How P0171 Shows Up Differently Across These Five Vehicles
The lean-condition mechanics are the same everywhere, but each of these vehicles has well-known trouble spots that push the odds toward one cause over another.
Honda Civic (2006–Present)
On the 1.8L R18A Civic, the most common P0171 culprit is a vacuum leak at the intake manifold gasket or a cracked PCV hose — these engines have several small vacuum-fed lines that harden and crack with age. A dirty or failing MAF sensor is the second most common cause; on Hondas, the MAF sits right in the intake tract and is sensitive to oil contamination from aftermarket oiled air filters.
On the 1.5L turbocharged Civic, check the intercooler piping and turbo boost hoses first — any crack or loose clamp under boost introduces unmetered air downstream of the MAF, which is a classic lean-code trigger on turbocharged engines specifically.
Honda Accord (2003–Present)
The four-cylinder K24 Accord follows the same pattern as the Civic — intake gasket leaks, PCV system cracks, and MAF sensor contamination top the list. On the V6 J-series Accord, check whether P0171 and P0174 appear together; if so, suspect the MAF sensor or a fuel delivery issue affecting both banks equally, rather than hunting for two separate vacuum leaks.
A weak fuel pump is also worth checking on higher-mileage Accords, especially if the lean condition gets worse under load or at highway speed, when fuel demand is highest.
Toyota Camry (2002–Present)
On both the 2AZ-FE four-cylinder and 2GR-FE V6 Camry, vacuum leaks around the intake manifold gasket and PCV hose are the leading cause. Toyota intake gaskets on these engines are known to degrade and cause slow vacuum leaks over time. A clogged or dirty MAF sensor is common too, especially on vehicles that haven’t had regular air filter changes.
On the newer A25A direct-injection Camry, also check for a stuck-open EVAP purge valve — if it’s cracked open when it shouldn’t be, it pulls extra air (and sometimes vapor) into the intake at idle, throwing off the trim calculation.
Toyota RAV4 (2006–Present)
Shares the same engine families as the Camry, so the same causes apply — intake gasket leaks, PCV cracks, and MAF contamination. On the RAV4 specifically, check the air intake boot (the accordion-style hose between the air filter box and throttle body) for splits; it’s a known wear point that’s easy to miss on a visual inspection.
On RAV4 Hybrid models, a lean code can sometimes correlate with how the engine cycles on and off — capture freeze frame data to see if P0171 logs specifically during engine restart events, which points toward a different diagnostic path than a constant leak.
Ford F-150 (2004–Present)
On the 5.4L Triton V8, aging intake manifold gaskets and PCV valve failures are common causes of lean codes, and these trucks often see both P0171 and P0174 from a shared vacuum leak at the upper-to-lower intake manifold junction. Check that connection first.
On EcoBoost F-150s (2.7L/3.5L), boost-side leaks are the prime suspect — any crack in the intercooler piping, a loose boost hose clamp, or a failing PCV system on these turbocharged engines introduces unmetered air. EcoBoost engines are also sensitive to carbon buildup on intake valves from direct injection, which can throw off airflow calculations at the margins. On the naturally aspirated 5.0L Coyote V8, intake gasket and PCV issues are the most likely path, similar to the Triton.
Step-by-Step Diagnostic Process for P0171
Work through these in order — starting with the free checks before spending money on parts.

Step 1: Check for Companion Codes and Read Fuel Trims
Scan for P0174 (Bank 2 lean) alongside P0171. Both banks lean together points toward a shared cause — MAF sensor, vacuum leak in a shared area, or fuel delivery — rather than a bank-specific leak. Also read your live short-term and long-term fuel trim values with your scanner. Trims that climb steadily with RPM and load point toward a vacuum leak (proportionally more impactful at idle); trims that stay high across all conditions point more toward MAF or fuel delivery issues.
Step 2: Inspect Vacuum Lines, Hoses, and the PCV System
This is the highest-odds cause across all five vehicles. With the engine idling, visually inspect every rubber vacuum line, the PCV valve and its hose, and the brake booster line for cracks, splits, or loose connections. Squeeze hoses to feel for brittleness. A cracked PCV hose is one of the most commonly missed causes because it’s small and easy to overlook.
Step 3: Check the Intake Manifold Gasket and Air Intake Boot
Intake manifold gaskets degrade with heat cycling over years of service, especially on the Camry, RAV4, and Triton F-150. Inspect the air intake boot (the flexible hose from the air filter box to the throttle body) for cracks or tears — a very common and very easy-to-miss leak point. A smoke test is the most reliable way to find these: introduce smoke into the intake with the engine off and vacuum applied, and watch for where it escapes.
Step 4: Inspect and Clean the MAF Sensor
A dirty or failing MAF sensor under-reports incoming air, which causes the ECM to under-fuel and can trigger a lean code even with no physical air leak at all. Remove the sensor and inspect the wire or film element for dust, oil residue, or visible contamination. MAF sensor cleaner (never anything else — other solvents can damage the delicate element) can restore a dirty sensor; if it’s cracked or reads erratically when tested, replace it.
Step 5: Check Fuel Delivery
If air-side checks come back clean, move to fuel. Check fuel pressure against your vehicle’s spec using a fuel pressure gauge. A weak fuel pump, a clogged fuel filter, or a failing fuel pressure regulator can all under-deliver fuel and produce a lean reading even though the air side is fine. This is more likely if the lean condition worsens specifically under load or acceleration.
Step 6: Inspect Oxygen Sensors and EVAP Components
A failing or contaminated upstream oxygen sensor (or air-fuel ratio sensor) can report inaccurate data, causing the ECM to chase a lean condition that isn’t really there. Also check the EVAP purge valve — if it’s stuck partially open, it can pull excess vapor or air into the intake at idle. Clear the code, drive a full cycle, and see whether it returns to confirm your fix.
Estimated Repair Costs by Cause
DIY parts-only costs are typically 40–60% below these combined shop estimates. Vacuum leak diagnosis and repair is very DIY-accessible on all five of these vehicles.
Common Mistakes People Make With P0171
Replacing the O2 Sensor First
O2 sensors are rarely the root cause. Check vacuum leaks and the MAF first — they’re free or cheap to inspect and far more likely.
Skipping the Visual Inspection
Small cracked hoses and PCV lines are the single most common cause and the easiest to miss without a careful look.
Using the Wrong MAF Cleaner
Regular solvents or brake cleaner can damage the sensor’s delicate element. Use MAF-specific cleaner only.
Ignoring Fuel Trim Patterns
Trims that rise with RPM point to vacuum leaks; flat high trims point elsewhere. Skipping this step means guessing blind.
Missing P0174
On V6 engines, not checking for the Bank 2 companion code can send you hunting for a leak on the wrong side of the engine.
Overlooking the Air Intake Boot
This flexible hose cracks with age and is easy to overlook since it’s often hidden behind the airbox.
Can You Drive with P0171?
Yes, generally. A lean condition is usually mild enough that the vehicle remains drivable, and it won’t cause the kind of immediate damage a severe misfire can. That said, don’t ignore it indefinitely — sustained lean running increases combustion temperatures, which can accelerate wear on exhaust valves and, over the long term, the catalytic converter.
If you notice rough idle, hesitation, or reduced power alongside the code, treat it as more urgent. And if P0171 appears together with a misfire code like P0300, prioritize diagnosing that combination promptly, since a lean condition is a known contributor to random misfires.
Frequently Asked Questions About P0171
What’s the difference between P0171 and P0174?
Both indicate a lean condition — P0171 is Bank 1, P0174 is Bank 2. On four-cylinder engines there’s only one bank, so you’ll only ever see P0171. On V6 engines, if both appear together, suspect a shared cause like the MAF sensor or fuel delivery rather than two separate leaks.
Can a bad gas cap cause P0171?
Not directly — a loose gas cap typically triggers EVAP codes like P0455 or P0442, not a lean fuel trim code. P0171 is about the intake air and fuel delivery system, not the fuel tank vapor system, so don’t start there for this specific code.
Will P0171 cause a check engine light to flash?
Usually not. P0171 is a steady-light code under normal circumstances. A flashing light indicates a more severe active misfire that’s damaging the catalytic converter in real time — different urgency, different code. If your light is flashing, treat that as the priority regardless of what else shows up.
How do I know if it’s a vacuum leak or a MAF sensor?
Fuel trim behavior is your best clue. If trims climb noticeably at idle and improve at higher RPM, a vacuum leak is more likely, since it has proportionally more impact when airflow is low. If trims stay elevated fairly evenly across RPM ranges, a MAF sensor issue is more likely. A smoke test can directly confirm or rule out a vacuum leak.
Can I just clear the code and see if it comes back?
You can, but it won’t tell you much — if the underlying cause (a slow vacuum leak, a dirty MAF) is still present, the code will return within a few drive cycles. Diagnosing the actual cause first saves you the repeat trip to the scanner.
Is P0171 expensive to fix?
Usually not. The most common causes — a cracked PCV hose or a dirty MAF sensor — cost under $50 to fix, often less if you already own basic tools. The more expensive causes, like a full intake manifold gasket or a fuel pump, are less common but possible on higher-mileage vehicles.
Chasing a Related Code?
P0171 is a known contributor to random misfires. If your scanner also shows P0300, read our misfire diagnosis guide next — the two often trace back to the same vacuum leak.
Quick Summary and Your Next Step
P0171 means your engine is running lean on Bank 1, and the ECM’s fuel correction has maxed out trying to fix it. Here’s the diagnostic path condensed:
- Check for P0174 and read fuel trims — this tells you whether the cause is shared or bank-specific, and whether to suspect vacuum or fuel delivery.
- Inspect vacuum lines and the PCV system — the single most common cause across all five vehicles.
- Check the intake manifold gasket and air intake boot — both degrade with age and are easy to miss visually.
- Inspect and clean the MAF sensor — a dirty sensor under-reports air and mimics a lean condition.
- Verify fuel delivery — weak pump, clogged filter, or failing regulator if air-side checks are clean.
- Check O2 sensors and the EVAP purge valve last — less common causes, but worth ruling out.
Whether it’s a cracked PCV hose on a Civic, a tired intake gasket on a Camry, or a boost leak on an EcoBoost F-150, P0171 rewards patience over parts-swapping. Work the list in order, and you’ll land on the actual leak instead of guessing your way through a parts counter.
