P0171 on 2018-2020 Toyota Avalon: Lean Condition Causes and Fixes
P0171 on a 2018-2020 Avalon most often means there's a vacuum leak (like a bad intake manifold gasket or PCV hose) or a dirty Mass Air Flow (MAF) sensor. However, a failing low-pressure fuel pump is a very strong possibility on this specific model due to a widespread recall. Cleaning the MAF sensor is a cheap first step; a new OEM sensor is around $150.
- P0171 means your engine is running with too much air or not enough fuel.
- The most likely causes on your 2018-2020 Avalon are a dirty MAF sensor or a vacuum leak from a hose or intake gasket.
- Always start with the simplest fix: clean the MAF sensor with dedicated cleaner.
- If P0171 appears with P0174 (on V6 models), the problem affects the whole engine, pointing strongly to the MAF sensor, a major vacuum leak, or fuel pressure.
- A Toyota TSB suggests that fuel pump issues can cause this code, so check fuel pressure if simpler fixes don't work.
What's Unique About the 2018-2020 Toyota AVALON
For this generation of Avalon, the P0171 code is strongly linked to a widespread safety recall for defective Denso low-pressure fuel pumps. The pump's impeller can swell and fail, causing low fuel pressure and triggering P0171, often alongside P0087 (Fuel Rail / System Pressure – Too Low). Toyota's own Technical Service Bulletin T-SB-0092-20 directly addresses this link. While vacuum leaks and dirty MAF sensors are common culprits on all cars, the fuel pump should be a primary suspect on the 2018-2020 Avalon if P0171 appears, especially if accompanied by hard starting or P0087.
Diagnostic Flowchart
Tap your situation to follow the diagnostic path that matches what you're seeing on this vehicle.
Symptoms You May Notice
- Check Engine Light is on
- Rough or unstable idle
- Hesitation or lack of power during acceleration
- Reduced fuel economy
- Engine stalling, especially under load
- Hard starting condition or long crank times
- Sputtering or misfiring sounds from the engine
- Immediately replacing the oxygen (A/F) sensor without checking for vacuum leaks, cleaning the MAF sensor, or investigating the fuel pump status first. These are more common and often cheaper fixes.
Most Likely Causes
- Dirty or Faulty Mass Air Flow (MAF) Sensor 🔴 High Probability → Shop Fuel Injection Air Flow Meter The MAF sensor measures the amount of air entering the engine. If it's dirty from road debris or oil from aftermarket air filters, it can under-report airflow, causing the ECM to inject too little fuel. This is a very common and easy-to-check issue across many Toyota models.
How to confirm: Inspect the sensor for dirt or debris; it is located on the air filter housing. A scan tool can monitor MAF readings; at idle, values should be stable and increase smoothly with RPM. With the engine off (key on), the reading should be zero. A dirty sensor may provide readings that are erratic or lower than expected.
Typical fix: Clean the sensor with a dedicated MAF sensor cleaner. Do not touch the delicate sensor wires. If cleaning doesn't resolve the issue, the sensor must be replaced. Using OEM (Denso) is highly recommended.
Est. part cost: $10-$15 for cleaner, $100-$200 for a new sensor. - Low Fuel Pressure (Weak/Failing Fuel Pump) 🔴 High Probability 2018-2020 Avalons were part of a major safety recall for defective Denso low-pressure fuel pumps where the impeller could fail. This failure directly causes low fuel pressure, leading to a lean condition. Toyota TSB T-SB-0092-20 specifically links P0171 with P0087 (Fuel Rail / System Pressure – Too Low) on these models, pointing to the fuel pump as the root cause.
How to confirm: Connect a fuel pressure gauge to the fuel rail to test the pressure against manufacturer's specifications. A scan tool showing high positive long-term fuel trims (LTFT) that remain high under load (not just at idle) can also point to a fuel delivery issue rather than a vacuum leak. The presence of code P0087 is a strong confirmation.
Typical fix: Replace the fuel pump assembly in the fuel tank. Check if your vehicle's VIN is covered under the recall (NHTSA Campaign Number: 20V682000), as the repair may be performed by a dealer at no cost.
Est. part cost: $0 if under recall, otherwise $400-$600+ for an OEM Denso assembly. - Vacuum Leak 🟡 Medium Probability Vacuum leaks from cracked hoses (like the PCV hose) or a failed intake manifold gasket allow unmetered air into the engine after the MAF sensor, leaning out the air-fuel mixture. Gaskets can become brittle with age and heat cycles.
How to confirm: Visually inspect all vacuum hoses for cracks or disconnections. A smoke test is the most definitive way to find leaks. Another method is to carefully spray a non-flammable substance like water or a dedicated diagnostic vapor near suspected leak points while the engine is running; a change in engine idle indicates a leak.
Typical fix: Replace the cracked hose or faulty gasket. For the intake manifold, it is recommended to replace the full set of gaskets.
Est. part cost: $10-$50 for hoses, $30-$60 for an OEM intake manifold gasket set. - Failing Air/Fuel Ratio Sensor (Upstream O2 Sensor) ⚪ Low Probability → Shop Oxygen Sensor The A/F sensor (Bank 1, Sensor 1) provides the primary data for air-fuel mixture control. A lazy or failing sensor can send incorrect 'lean' signals to the ECM. While possible, it's less common than MAF, vacuum, or fuel pump issues on this platform.
How to confirm: Use a scan tool to observe the sensor's voltage readings. A healthy sensor should fluctuate rapidly. A slow or stuck reading indicates a problem.
Typical fix: Replace the Bank 1, Sensor 1 Air/Fuel Ratio sensor. It's recommended to use OEM or high-quality brands like Denso.
Est. part cost: $100-$250
Rare But Worth Checking
- Clogged Fuel Injectors: → Shop Fuel Injector If only one or two injectors on Bank 1 are partially clogged, it can cause a lean condition on that bank without affecting the other.
- Exhaust Leak: A leak in the exhaust manifold or pipe before the first A/F sensor can draw in outside air, making the sensor incorrectly read a lean condition.
Diagnosis Steps
- Read the trouble codes with an OBD-II scanner and check for any other accompanying codes, especially P0174 and P0087.
- Check if the vehicle's VIN is part of the Denso fuel pump recall (NHTSA 20V682000). If so, contact a Toyota dealer.
- Using a scan tool, monitor short-term (STFT) and long-term (LTFT) fuel trims. A combined total (STFT + LTFT) consistently above +20% confirms a lean condition. Some systems may not set a code until trims exceed +35%. If trims are high at idle but normalize at higher RPMs, a vacuum leak is likely. If trims remain high across the RPM range, suspect a MAF or fuel delivery issue.
- Visually inspect the engine bay for obvious issues like cracked or disconnected vacuum hoses and loose air intake components between the MAF sensor and the engine.
- Remove and inspect the Mass Air Flow (MAF) sensor. Clean it with dedicated MAF sensor cleaner and reinstall.
- Perform a smoke test to definitively locate any vacuum leaks, paying close attention to the intake manifold gasket area and PCV hoses.
- If no vacuum leaks are found, test the fuel pressure using a mechanical gauge to rule out a weak fuel pump or clogged filter, especially if code P0087 is also present.
- If fuel pressure is normal, analyze the Air/Fuel Ratio sensor (Bank 1 Sensor 1) data on a scan tool. If it responds slowly or is stuck lean, it may be faulty.
- If all else fails, consider the possibility of clogged fuel injectors or an exhaust leak before the A/F sensor.
Parts You'll Likely Need
- Mass Air Flow (MAF) Sensor Cleaner — Often, the MAF sensor is just dirty and cleaning it is the cheapest and easiest first step.
Trusted brands: CRC, WD-40
Aftermarket price range: $10-$15 - Mass Air Flow (MAF) Sensor
(OEM #22204-75030)— If cleaning doesn't work, the sensor itself may have failed. It is a primary cause of lean codes on Toyotas.
Trusted brands: Denso, Hitachi
OEM price range: $150-$200
Aftermarket price range: $70-$120 - Intake Manifold Gasket
(OEM #17171-25010 (For A25A-FXS I4, confirm for V6))— These gaskets can degrade over time, creating a vacuum leak that is a very common cause of P0171.
Trusted brands: Fel-Pro, Mahle, Toyota Genuine
OEM price range: $30-$50
Aftermarket price range: $15-$30 - Fuel Pump Assembly
(OEM #23221-31130 (V6, verify by VIN); 23220-0P180 (V6, verify by VIN))— Indicated as a primary cause by a Toyota TSB and a major recall, a weak fuel pump will fail to supply adequate fuel pressure, causing a lean condition.
Trusted brands: Denso (OEM), Bosch
OEM price range: $400-$600
Aftermarket price range: $200-$350
Related Codes That Often Appear With This One
- P0174 — System Too Lean (Bank 2). This code often appears with P0171 on V6 engines and strongly suggests a problem affecting both cylinder banks, such as a dirty MAF sensor, a large vacuum leak at the intake plenum, or low fuel pressure from a failing fuel pump.
- P0087 — Fuel Rail / System Pressure – Too Low. As cited in TSB T-SB-0092-20, this code directly points to a fuel delivery issue (like a weak fuel pump) as the cause for the lean condition.
- P0441 — Evaporative Emission System Incorrect Purge Flow. A stuck-open EVAP purge valve can create a vacuum leak, introducing unmetered fuel vapors and air, which can contribute to a lean code.
Technical Service Bulletins (TSBs) & Recalls
- T-SB-0092-20 (February 9, 2023): Addresses a hard start and/or MIL ON with DTCs P0171, P0174, and/or P0087. It instructs technicians to check fuel pressure to diagnose a potential fuel system issue. This TSB covers a wide range of 2014-2020 Toyota models, including the Avalon.
Platform-Specific Known Issues
- Fuel Pump Failure Recall: → Shop Fuel Pump The most significant issue for the 2018-2020 Avalon is the defective Denso low-pressure fuel pump. A recall (NHTSA 20V682000) was issued because the impeller could absorb fuel, deform, and cause the fuel pump to stop working. This leads to a loss of fuel pressure, which directly causes a lean condition (P0171) and often a low fuel pressure code (P0087). Symptoms include rough running, stalling, and a failure to start. Owners should check their VIN with a Toyota dealer to see if the recall applies and has been completed.
Mechanic-Grade Diagnostic Values
- Low-Pressure Fuel System (2GR-FKS V6) — expected: 196 to 833 kPa (28 to 121 psi). Failure: Pressure below the specified range, especially under load, indicates a weak low-pressure fuel pump.
- High-Pressure Fuel System at 3000 RPM (2GR-FKS V6) — expected: 2400 to 19500 kPa (348 to 2828 psi). Failure: Pressure that fails to meet the target pressure requested by the ECM points to a failing high-pressure fuel pump.
- High-Pressure Fuel System (A25A-FXS Hybrid) — expected: 3.0 to 25 MPa (435 to 3626 psi). Failure: A pressure drop of 5 MPa (725 psi) or more from the target pressure for over 10 seconds can trigger a fault code.
- Mass Air Flow (MAF) Sensor Reading — expected: Approximately 1-3 g/sec at idle, increasing to 2-6 g/sec at 2,500 RPM (values are general but representative).. Failure: Readings that are erratic, jumpy, or do not increase smoothly with RPM suggest a dirty or faulty sensor.
- Average Fuel Trim Learning Value (Long Term Fuel Trim) — expected: Close to 0%, typically within +/- 10%.. Failure: When the average fuel trim learning value exceeds +35%, the ECM interprets this as a system fault and sets the P0171 DTC.
- Port Fuel Injector Resistance (2GR-FE, similar to 2GR-FKS) — expected: 11.6 to 12.4 Ω at 20°C (68°F). Failure: Resistance outside of this range indicates a faulty injector coil.
Hidden / Shadow Codes Worth Checking
- Average Fuel Trim Learning Value: This is not a discrete code but a critical PID (Parameter ID) viewed on a professional scan tool like Techstream. The ECM will set P0171 when this value, which is an advanced calculation of long-term fuel trim, exceeds a pre-set limit (e.g., +35%), indicating it can no longer compensate for the lean condition. (see via Toyota Techstream or an advanced scan tool capable of reading manufacturer-specific live data.)
- Mode $06, Test ID $81: Mode $06 data can reveal test results for non-continuous monitors. For Toyota, Test ID $81 often corresponds to O2 Sensor/Air-Fuel Ratio Sensor test results. Failing values here can point to a lazy or failing sensor before it triggers a specific sensor code. (see via Any OBD-II scan tool that supports Mode $06 data.)
Scan Tool Commands That Help
- Toyota Techstream: Data List > MAF and COOLANT TEMP — Used to view live data for the Mass Air Flow sensor in grams/second to verify its operation against standard values at idle and 2,500 RPM.
- Toyota Techstream: Active Test > Control the Fuel Pump / Speed — This bidirectional command allows a technician to manually activate the fuel pump to test its function and verify fuel pressure without the engine running. This is crucial for diagnosing the known fuel pump issues on this platform.
- Toyota Techstream: ECM Reprogramming (Calibration Update) — Per TSB T-SB-0049-21, some 2019-2022 models with the A25A-FXS engine may require an ECM software update to correct logic for fuel system codes (like P0087, which is related to P0171) that appear at high altitudes.
Wiring & Ground Locations
- G01 (Example) — Typically in the left fender area of the engine compartment.. This is a primary engine compartment harness ground point. A corroded or loose G01 ground can cause erratic sensor readings for the MAF, A/F sensors, and ECM, potentially leading to a false P0171 code.
- G08 (Example) — Typically at the lower side of the left A-pillar, near the kick panel.. This is an instrument panel harness ground. A poor connection here can affect the ECM and its sensor inputs, which are critical for fuel management.
Real Owner Repair Stories
- YouTube video on a 2007 Toyota Camry (2007 Toyota Camry (similar vacuum hose layout)) — P0171 code appeared immediately after a valve cover gasket replacement at a shop.
❌ Tried (didn't work) Initial assumption was a major component failure.
✅ What actually fixed it A small, hidden vacuum hose under the plastic engine cover was found to be cracked and disconnected, likely disturbed during the prior repair. Replacing the hose resolved the code. - Reddit user in r/MechanicAdvice (2007 Toyota Matrix with 1.8L engine (known for similar intake gasket issues)) — P0171 code, especially when the engine was cold.
❌ Tried (didn't work) Cleaning MAF sensor.
✅ What actually fixed it The plastic intake manifold gasket was leaking when cold and sealing up as the engine warmed up. Replacing the intake manifold gasket with a new OEM part permanently fixed the lean code. - YouTube video on a 2002 Toyota Premio (2002 Toyota Premio) — P0171 code and failed emissions test with high O2 and CO readings.
❌ Tried (didn't work) Checking for vacuum leaks., Verifying MAF sensor readings., Checking fuel delivery., Inspecting wiring harness integrity to the A/F sensor.
✅ What actually fixed it Scan tool data showed the upstream A/F (oxygen) sensor was stuck in a lean condition and not responding correctly. Replacing the A/F sensor resolved the P0171 code and allowed the car to pass emissions.
"I Checked Everything" — The Actual Cause
- A common scenario where an intake smoke test shows no leaks is when the actual cause is a crack or leak in the exhaust manifold or exhaust pipe *before* the upstream A/F (O2) sensor. The exhaust pulses can suck in fresh, unmetered oxygen from the outside air through the crack. The A/F sensor detects this extra oxygen and incorrectly reports a lean mixture to the ECM, which then sets P0171 even though the engine's internal air/fuel mixture is correct.
OEM Part Supersession History
22204-75030→22204-0F030— Part has been updated or consolidated by the manufacturer.
Heads up: The new part number 22204-0F030 is the correct service replacement for the original.
Model Year Variations Within This Range
- 2019-2022: For vehicles with the A25A-FXS (Hybrid) engine, Toyota issued Technical Service Bulletin T-SB-0049-21. It addresses fuel system codes that may appear when driving at high altitudes in high temperatures. The fix is not a part replacement but an ECM software update (reprogramming) performed by a dealer.
Helpful Videos
Used OEM Parts in Stock
New Aftermarket Parts Available
The information in this article is provided for general reference and educational purposes only. Vehicle specifications, procedures, and part compatibility can vary by production date, trim level, and region. Always consult your vehicle's factory service manual and verify part numbers before purchasing or performing repairs. Safety-critical components such as airbags, seat belts, and braking systems should be installed by a qualified professional.
- Toyota AVALON:
- 🧭 Diagnostic Flowchart
- 🎬 Helpful Videos
- 🛍️ Shop This Part
- What's Unique About the 2018-2020 Toyota AVALON
- Symptoms You May Notice
- Most Likely Causes
- Rare But Worth Checking
- Diagnosis Steps
- Parts You'll Likely Need
- Related Codes That Often Appear With This One
- Technical Service Bulletins (TSBs) & Recalls
- Platform-Specific Known Issues
- Mechanic-Grade Diagnostic Values
- Hidden / Shadow Codes Worth Checking
- Scan Tool Commands That Help
- Wiring & Ground Locations
- Real Owner Repair Stories
- "I Checked Everything" — The Actual Cause
- OEM Part Supersession History
- Model Year Variations Within This Range
- 🎟️ Get 5% Off