Skip to content
CarTipsMentor

P0171 Code: System Too Lean - Causes & Fixes

What a P0171 lean code means, how to read fuel trims at idle and 2,500 rpm, the likely causes in order, carmaker bulletins, and what each fix costs.

Gloved hands holding a handheld diagnostic tester in front of a car's open engine bay
Written by
CarTipsMentor Team
OBD2 Codes guides
Published
Updated
Reading time
17 min

Key takeaways

P0171 means the engine computer has added as much fuel as it is allowed to on Bank 1 and the mixture is still lean, so the engine is getting too much air, too little fuel, or both. With a steady light and a normal-running engine you can usually drive gently to get it fixed, but a flashing light means stop.

  1. 01The causes named most often are air leaking in after the mass airflow sensor, a dirty MAF sensor, a leaking PCV valve and weak fuel delivery.
  2. 02Read live fuel trims at idle and at a steady 2,500 rpm: a high number that falls as rpm rises usually points to a vacuum leak.
  3. 03Replacing the oxygen or air-fuel sensor first is a common, costly mistake, because the sensor is usually reporting a real problem.
  4. 04RepairPal's national estimates run from $124 to $173 for a PCV valve up to $1,344 to $1,513 for a fuel pump.

This guide belongs to our OBD2 guide: most common codes section, which covers the wider topic.

A P0171 code means your engine is running lean on Bank 1, and the engine computer can no longer correct it on its own. Kelley Blue Book's P0171 explainer describes it as the engine receiving too much air into the combustion chamber and not enough fuel.

The code names a condition, not a part. The usual culprits are air sneaking in after the mass airflow (MAF) sensor, a dirty MAF sensor, a leaking PCV valve and weak fuel delivery. This guide shows how to read the fuel trims that set the code, narrow the cause with a scanner and price each repair.

P0171 is one of the codes in our guide to the most common OBD2 codes and their repair costs, where it shows up alongside mass airflow sensor faults. With a steady light and normal driving, you have time to diagnose it properly.

P0171 Quick Answer: What It Means and Can You Drive?

P0171 stands for "System Too Lean (Bank 1)." You can usually drive a short distance with a steady light, but not with a flashing one.

P0171 Quick Answer: What It Means and Can You Drive?: table
ItemDetail
CodeP0171, System Too Lean (Bank 1)
What it meansBank 1 fuel trim has passed its lean limit
Most likely causesVacuum or PCV leaks, dirty MAF sensor, weak fuel pressure or flow
Other causes to rule outExhaust leak ahead of the upstream sensor, failed oxygen or A/F sensor
Safe to drive?Short, gentle trips with a steady light; stop if it flashes
Typical repair cost$124 to $173 for a PCV valve, up to $1,344 to $1,513 for a fuel pump

Code name from Edmunds and AutoZone. Causes from AutoZone, Kelley Blue Book and Identifix. Costs are RepairPal national estimates updated September 3, 2026, before taxes and fees.

What Bank 1 means

Bank 1 is the side of the engine that holds cylinder No. 1, according to Identifix's P0171 repair guide. On a V6 or V8, the other side is Bank 2, and a lean condition there sets P0174.

Most inline engines have one bank, so Bank 1 is the whole engine. Kelley Blue Book notes that Bank 2 is typically found on V6, V8 and V10 engines, though some inline-four engines are also split into two banks.

Engine bay of a Honda with a 2.4-liter four-cylinder i-VTEC engine

How Fuel Trim Sets the P0171 Code

P0171 sets when Bank 1 fuel trim reaches its lean limit. Fuel trim is the percentage the engine computer adds to or removes from its base fuel delivery to hold the mixture near the 14.7 to 1 air-fuel ratio that AutoZone gives as optimal.

The upstream oxygen or air-fuel sensor reports the oxygen left in the exhaust. When it sees a lean mixture, the computer adds fuel, which the scanner shows as a positive trim. Negative trim means it is pulling fuel out of a rich mixture.

Short-term vs long-term fuel trim

Tomorrow's Technician's fuel trim primer defines short-term fuel trim (STFT) as the immediate response to a rich or lean condition, and long-term fuel trim (LTFT) as a learned response based on what STFT has been doing. Add the two together and you get total fuel trim.

In its example, a disconnected vacuum line makes the engine run lean, and STFT adds fuel until it reaches +13%. LTFT then climbs to +13% and holds while STFT drifts back toward 0%.

The number that turns on the light

Each carmaker sets its own limit. An ImportCar article on fuel trim numbers says that, in general, a correction of +25% or greater will store P0171 or P0174.

A StarTuned article on fuel trim puts typical limits at plus or minus 25% to 35%, and plus or minus 32% on Mercedes-Benz ME engine management.

A healthy engine sits far lower. Vehicle Service Pros' fuel trim guide says the old rule of thumb was plus or minus 10% total trim for most North American vehicles, and a better one today is plus or minus 5%.

P0171 Symptoms

Often the only symptom is the check engine light. AutoZone says that in most P0171 cases you won't notice any performance issue.

When the lean condition is strong enough to feel, watch for these signs:

  • Rough idle, or stalling when you stop at a light because the engine can't hold a steady idle
  • Hesitation, surging or a lack of power when you accelerate
  • Spark knock or pinging under load
  • A hissing sound from the engine bay, which Kelley Blue Book links to a vacuum leak
  • Hard starting
  • Worse fuel economy

Symptoms from Kelley Blue Book, AutoZone and Edmunds. Hard starting also appears in Toyota's fuel pump bulletin T-SB-0009-23.

What Causes P0171? Most Likely First

Air that the MAF sensor never measured is the most common cause. Kelley Blue Book calls it unmetered air entering the combustion system, and AutoZone's P0171 guide says leaks in the vacuum and PCV hoses are the most common causes and some of the easiest to fix.

Sources rank the rest differently. Kelley Blue Book adds that most of the time the culprit is a faulty or dirty MAF sensor or a weak fuel pump, and Identifix's cause list opens with a weak fuel pump. The order below follows AutoZone and Identifix's diagnostic steps, which both start with leaks.

Vacuum leaks and air getting in after the MAF

Any air that enters between the MAF sensor and the cylinders is unmetered. Underhood Service's P0171 article lists a leak behind the MAF sensor, a leaking intake manifold gasket and a stuck-open EVAP purge valve as examples.

Leaks hit hardest at idle. Vehicle Service Pros says the trims return to almost normal during cruise and wide-open throttle, and on turbocharged engines the same leak can turn them negative under boost.

The air cleaner counts too. A GM Service Insights air cleaner article says a poorly seated air cleaner bracket on 2016 to 2019 Chevrolet Cruze models with the 1.4L engine can set P0171, P0101, P0172, P0300 or P1101.

A dirty or failing MAF sensor

A contaminated MAF sensor misreads airflow, so the computer meters the wrong amount of fuel. AutoZone says this is especially true with oiled air filters that carry too much oil.

A 2000 Toyota Echo case study shows the pattern. The code set at 2,880 rpm and 45 mph with long-term trim at +33%. The MAF signal peaked at about 3.5 volts on a snap throttle and about 3.8 volts with a new sensor.

PCV valve and hose leaks

Underhood Service calls the positive crankcase ventilation (PCV) valve one of the most missed items and says a weak, leaking valve will cause a P0171.

Vehicle Service Pros describes a 2011 Chevrolet Cruze 1.8 with 102,000 miles that idled rough and stalled at stops. Freeze frame showed STFT at +22% and LTFT at +20%, a total of +42%, yet a smoke test of the intake found no leak. The PCV diaphragm had ruptured, and because the valve was built into the valve cover, the fix was a new valve cover.

Weak fuel pressure or flow

Low fuel pressure leaves the engine short of fuel. Toyota's bulletin T-SB-0009-23 covers many 2014 to 2020 models with a hard start or check engine light and P0171, P0174 or P0087. Technicians check fuel pressure and replace the pump if it is out of specification.

Failing injectors do the same. Honda's warranty extension bulletin for the 2015 and 2016 Fit covers failed injectors to 10 years from purchase or 150,000 miles, whichever comes first, on cars that set P0171, P0172, misfire codes or P0420.

A restricted fuel filter or failed pressure regulator can also starve the engine. On direct-injection engines, Underhood Service notes that a worn camshaft lobe can cut high-pressure pump output.

An exhaust leak ahead of the upstream sensor

AutoZone says exhaust leaks are common between the engine and the first oxygen sensor, where they can skew the sensor's reading. ImportCar describes a shop test: block the tailpipe outlets with rags while the engine runs, and if positive short-term trim drops to nearly zero, a large exhaust leak is likely.

A failed oxygen or air-fuel sensor

The sensor that reports the lean mixture is rarely the cause. Identifix lists replacing the upstream oxygen, air-fuel or MAF sensor because its data reports the condition as a common mistake.

Nissan's bulletin NTB19-022 for 2017 to 2019 models says to replace the A/F sensor only if a confirmation test sets P2096, P2097, P2098 or P2099, and otherwise to keep diagnosing with the sensor ruled out.

How to Diagnose P0171 With a Scanner

Save the data, then compare live fuel trims at idle and at 2,500 rpm before you replace anything. A basic code reader only shows the code, so you need live data and freeze frame, two features explained in our roundup of the best OBD2 scanners for every budget.

  1. Read every code. Identifix says to record stored, pending and permanent codes. Underhood Service notes that P0171 rarely travels alone.
  2. Save the freeze frame before clearing anything. Note rpm, load, coolant temperature, speed and both fuel trims when the code set. The Echo's code set at 45 mph, which pointed away from a vacuum leak.
  3. Read live trims at idle on a warm engine. Note STFT, LTFT and the total for each bank.
  4. Hold a steady 2,500 rpm and read them again. A Vehicle Service Pros drivability article recommends gathering trim data at idle, at 2,500 rpm and on a test drive.
  5. Compare Bank 1 with Bank 2 on a V engine. One lean bank suggests a leak on that side; both lean together suggests a shared cause.
  6. Look and listen for leaks. Check the vacuum hoses, the intake boot between the MAF and throttle body, the clamps and PCV hoses. Identifix also lists the air cleaner housing, manifold gaskets, the brake booster circuit and purge plumbing.
  7. Inspect the MAF sensor. Identifix says to clean the sensing element only when the carmaker permits it and only with an approved product.
  8. Smoke test the intake if you haven't found a leak.
  9. Test fuel pressure under load if the trims stay high off idle.
  10. Check for exhaust leaks ahead of the Bank 1 upstream sensor.
  11. Check for service bulletins before you replace a sensor or computer.
  12. Fix, clear and recheck. Total trim should settle back within about plus or minus 5%.
Bluetooth OBD2 diagnostic tool plugged into a car's diagnostic port

The fuel trim pattern tells you where to look first.

How to Diagnose P0171 With a Scanner: table
What the trims showWhat it points to
High positive at idle, close to normal at 2,500 rpm or cruiseVacuum or PCV leak
High positive that stays high off idle or sets at speedAirflow measurement or fuel supply
Both banks lean by about the same amountShared cause, such as the MAF or low fuel pressure
Only Bank 1 leanA leak on that bank, intake or exhaust
Turbo engine: positive at idle, negative under boostIntake or boost leak

Patterns from Identifix, Vehicle Service Pros, ImportCar and the Toyota Echo case study in Lean Is Mean. Each pattern is a starting point and needs a test to confirm it.

Why the 2,500 rpm reading matters

A small leak is a big share of total airflow at idle and a tiny share at higher rpm. As the Lean Is Mean case study puts it, a vacuum leak has a greater effect at idle than at 3,000 rpm.

Smoke testing for vacuum leaks

A smoke machine fills the intake with visible vapor that escapes wherever there is a leak. ImportCar says a reliable test needs mild positive pressure, so the air intake, vacuum ports and exhaust outlets must be sealed. It recommends testing both after a cold soak and at full operating temperature.

Testing fuel pressure and volume

Fuel pressure is checked with a gauge against the specification in your service manual, as Toyota's bulletin requires. Identifix says to measure pressure and, where specified, fuel volume under the conditions when the fault occurs.

Don't stop at an idle reading. Identifix lists treating normal pressure at idle as proof of correct pressure under load as a common mistake. Direct-injection systems need approved high-pressure test equipment.

Carmaker Bulletins That Mention P0171

Check for a service bulletin before you buy parts. Several carmakers have published P0171 fixes.

Carmaker Bulletins That Mention P0171: table
VehiclesBulletinWhat it coversFix
2014 to 2020 Toyota models, including Camry, Corolla, RAV4 and TacomaToyota T-SB-0009-23Hard start or MIL with P0171, P0174 or P0087Check fuel pressure, replace the pump if out of spec
2021 to 2023 Ford F-150 with 3.3L engineFord TSB 25-2342MIL with P0171 that may be due to PCM softwareReprogram the PCM
2015 and 2016 Honda FitHonda SB 22-002MIL with P0171, P0172, misfire codes or P0420Injectors covered to 10 years or 150,000 miles
2016 to 2019 Chevrolet Cruze 1.4LGM bulletin 18-NA-118P0101, P0171, P0172, P0300 or P1101Reseat the air cleaner bracket, replace a damaged element
2017 to 2019 Nissan models, including Rogue and SentraNissan NTB19-022P0171 or P0174Confirm the A/F sensor with a P2096 to P2099 test first

From the Toyota, Ford, Honda and Nissan bulletins filed with NHTSA and from GM Service Insights. Each bulletin applies only to listed VINs or engines, so confirm with a dealer.

Ford's TSB 25-2342 lists the PCM reprogramming at 0.3 hours of labor and warns that shifts may feel firmer for several days while the transmission relearns.

Is It Safe to Drive With P0171?

Usually, yes, for a short distance, if the light is steady and the engine runs well. It is not safe once the light flashes or the engine stalls or loses power.

Sources disagree on urgency. Kelley Blue Book says the code by itself doesn't present any immediate dangers, but strongly advises against driving with it. RepairPal's P0171 page rates it "Urgent," meaning immediate action is necessary.

Edmunds' P0171 guide says a lean mixture can lead to misfires, a rough idle and, in severe cases, engine overheating. Identifix adds that it can progress to hesitation, stalling, misfire or catalyst stress, and Kelley Blue Book notes that many cars protect themselves by going into limp mode or reduced power mode.

Is It Safe to Drive With P0171?: table
SituationSeverityWhat to do
Steady light, engine runs normallyModerateDrive gently and get it diagnosed soon
Steady light with rough idle, hesitation or stalling at stopsHighKeep trips short; a stall in traffic is a hazard
Flashing light or sudden loss of powerSevereStop when safe and arrange service

From the 2022 Ram 2500/3500 owner's manual, Kelley Blue Book and Identifix.

The Ram owner's manual says a steady light usually doesn't need a tow, but driving for long periods with it on could damage the vehicle control system and affect fuel economy and drivability.

Mazda's owner's manual for the 2025 CX-50 is more cautious. It says not to drive at high speed with the light on or flashing, and not to disconnect the battery cables while it is lit.

A flashing check engine light means stop

The Ram manual warns that if the light is flashing, severe catalytic converter damage and power loss will soon occur. Pull over when it's safe and arrange service instead of driving on.

Our guide to the steady vs flashing check engine light explains what each one means for your next mile.

Free tool

Check Engine Light Checker. Pick whether the light is steady or flashing and tick any symptoms, such as rough running or lost power, to see how urgent it is and whether you can keep driving.

Run that check in the Check Engine Light Checker before you choose between driving to a shop and calling a tow.

How to Fix P0171 and What It Costs

Fix what the tests point to. RepairPal's estimates run from $124 to $173 for a PCV valve up to $1,344 to $1,513 for a fuel pump, and its check engine light diagnosis estimate puts testing at $125 to $183.

How to Fix P0171 and What It Costs: table
RepairRepairPal estimateCarMD 2026 average
Check engine light diagnosis$125 to $183Not listed
PCV valve replacement$124 to $173Not listed
EVAP purge valve replacementNot listed$172.12
MAF sensor replacement$274 to $381$346.21
Fuel filter replacement$258 to $322Not listed
Fuel pressure regulator replacement$317 to $409Not listed
Exhaust manifold gasket replacement$417 to $596Not listed
Oxygen sensor replacement$440 to $523$286.87
Intake manifold gasket replacement$683 to $834Not listed
Fuel injector replacement$768 to $953$572.27
Fuel pump replacement$1,344 to $1,513Not listed

RepairPal national estimates for parts and labor, updated September 3, 2026, before taxes and fees. CarMD averages are for 2025 U.S. repairs from the 2026 CarMD Vehicle Health Index. The two sources use different methods, so their figures differ.

The RepairPal fuel pump estimate shows why diagnosis comes first: parts alone run $1,104 to $1,160, an expensive guess if the real fault is a PCV leak.

The sources split on oxygen sensors and injectors. The 2026 CarMD Vehicle Health Index puts their averages at $286.87 and $572.27, both below RepairPal's ranges, and ranks MAF sensor replacement as the fourth most common check engine repair.

Free tool

Repair Cost Estimator. Enter a shop's parts price, labor hours and rate to see the total, the parts-only DIY cost and how a MAF sensor, oxygen sensor or injector quote compares with the national average.

The Repair Cost Estimator splits any quote into parts, labor and fees and shows how much labor you would save by doing the job yourself. Check for a warranty extension first, like the injector coverage on eligible 2015 and 2016 Honda Fits.

After the Fix: Clearing P0171 and Getting Ready for Inspection

Clear the code with a scan tool only after the repair is done and the data is saved. Identifix warns that disconnecting the battery can erase useful data and may create extra relearn work.

Give the trims time to settle. In Tomorrow's Technician's example, LTFT stayed at +13% after the leak was fixed, so the engine ran rich until both trims returned to 0%. On the Toyota Echo, clearing codes did not reset the trims to zero.

The light can also go out on its own. A 1995 EPA rule on OBD let the light go out after a fuel system fault that doesn't return during three sequential trips with engine speed within 375 rpm, load within 10 percent and the same warm-up status as when the fault was found.

Clearing codes has a catch at inspection time. The New York DMV's readiness guide says cleared codes leave readiness monitors incomplete, and an OBD II vehicle won't pass until the required monitors are ready. In most cases that takes two drive cycles separated by a cool-down period.

P0171 often arrives with other codes, and each one narrows the search.

Codes Related to P0171: table
CodeMeaningWhat it tells you
P0174System Too Lean (Bank 2)Both banks lean points to a shared cause, like the MAF or fuel pressure
P0170Fuel Trim Malfunction (Bank 1)A fuel trim problem exists on Bank 1
P0172System Too Rich (Bank 1)The opposite problem; a faulty injector is a common cause
P0101Mass or Volume Air Flow "A" Circuit Range/PerformanceThe MAF sensor reading is suspect
P0300Random/Multiple Cylinder Misfire DetectedA lean mixture can cause misfires
P0087Fuel Rail/System Pressure Too LowFuel supply is weak, as in Toyota's pump bulletin
P2096Post Catalyst Fuel Trim System Too Lean Bank 1Used in Nissan's A/F sensor check

Code names from Kelley Blue Book's P0171 and P0101 pages and Toyota bulletin T-SB-0009-23. Notes from ImportCar, Kelley Blue Book, Edmunds and the Toyota and Nissan bulletins.

A MAF code beside P0171 is a strong clue. The Kelley Blue Book P0101 page groups P0100 to P0104 as mass airflow circuit codes.

Honda's Fit bulletin also groups P0171 with P0420, and our guide to the P0420 catalyst system efficiency code explains how problems upstream of the converter can set it.

Frequently Asked Questions

Will a P0171 code clear itself?

The light can go out on its own if the cause is gone. A 1995 EPA rule allowed it after three sequential trips without the fault under similar engine speed, load and warm-up conditions. If the leak, dirty sensor or weak pump is still there, the fuel trims climb again and the light comes back. Fixing the cause is the only lasting way to clear it.

Can bad spark plugs cause a P0171 code?

Spark plugs are worth checking, but treat them as a clue. Identifix includes a plug inspection in its P0171 steps, looking for wear, fouling, damage or a pattern in one cylinder. It says light-colored deposits can support other evidence of a lean condition, but plug color alone does not identify the cause, so keep testing for leaks and fuel problems.

Can a catalytic converter cause P0171?

The converter is not on the P0171 cause lists from AutoZone, Identifix or Kelley Blue Book, which focus on unmetered air, fuel delivery, sensors and exhaust leaks ahead of the upstream sensor. The link usually runs the other way. Kelley Blue Book warns that lean running can superheat the converter, and Identifix says a lean condition can progress to catalyst stress.

Why does P0171 come back after clearing it?

Clearing the code erases the record, not the cause. If the vacuum leak, dirty MAF sensor or weak fuel pump is still there, the fuel trims climb back past the limit and the code returns. Save the freeze frame first, then repair what the fuel trim pattern and tests point to, and check for a carmaker bulletin before clearing it again.

Can a dirty air filter cause P0171?

The filter area can contribute. AutoZone warns that oiled air filters with too much oil can contaminate the MAF sensor and make it read falsely. Identifix starts its vacuum leak check at the air cleaner housing and the ducting after the MAF sensor, since a gap after the sensor lets in air it never measured. Check those seals when you inspect the MAF.

What does P0171 mean on a Chevy Cruze?

It means the same lean condition on Bank 1, and two Cruze causes are well documented. GM says a poorly seated air cleaner bracket on 2016 to 2019 Cruze 1.4L models can set P0171. Vehicle Service Pros describes a 2011 Cruze 1.8 whose ruptured PCV diaphragm, built into the valve cover, pushed total fuel trim to +42%.

Sources and References

Written by

CarTipsMentor Team

Researched from the sources listed above and checked against them before publishing. Nobody paid to be mentioned on this page. It is general information, not advice about your own vehicle.

Published . Last updated .

Who writes for usEditorial policyDisclaimer

All guides