Code & Cost

P0171 on Toyota Corolla, Camry & RAV4: Lean Code Causes

Applies to: Toyota Corolla and Matrix (especially 2003–2008 1.8L), Camry and RAV4 2.4L, and most other Toyota 4-cylinder and V6 models.
Related codes: P0174
Updated December 2026. Based on manufacturer service bulletins; check your VIN with a dealer.

P0171 means the engine is running lean, with more air than the fuel matches. On Toyotas the usual causes are cheap to check.

Most common causes on Toyotas

  1. Dirty mass air flow (MAF) sensor. Oil and dirt on the sensor wire make it under-report the air coming in. Cleaning it with MAF cleaner is a common first step. Never use other sprays.
  2. Intake manifold gasket leak. Toyota bulletin EG045-07 for 2003–2008 Corolla and Matrix with the 1ZZ-FE engine names leaking intake manifold gaskets in freezing weather as a cause of P0171. Similar leaks are common on other Toyota 4-cylinders.
  3. Vacuum or PCV hose leaks. Cracked rubber hoses get more common with age.
  4. Weak fuel delivery. A clogged filter or weak pump. Usually it is P0171 together with P0174 on V6 engines, or a lean condition under load.

What to do

  1. Clean the MAF sensor and clear the code. Drive a few days and see if it comes back.
  2. Have the shop do a smoke test for vacuum leaks. It is quick and finds intake gasket and hose leaks.
  3. Ask a Toyota dealer to check your VIN for bulletins and recalls, especially on newer models with fuel pump campaigns.

Typical repair costs for P0171

General US averages for this code. Make-specific repairs above can cost more.

RepairTypical costSource
Smoke test to find a leak$50–$150EngineerFix
Mass air flow sensor replacement$262–$406RepairPal
Intake manifold gasket (vacuum leak)$683–$834RepairPal
Fuel injector replacement$768–$953RepairPal
Fuel pump replacement$1,344–$1,513RepairPal

Full P0171 guide for all cars →

Sources

Is the repair worth it?

Compare the quote with what your car is worth before you pay.

Repair or sell calculator