A mass airflow sensor on a towel beside an air filter and intake duct.

P0171 Code: System Too Lean Bank 1, Causes and Fixes

Short answer: A P0171 code means bank 1's long term fuel trim hit its limit while adding fuel, so either air is getting in unmeasured or fuel isn't arriving. On some GM, Toyota, Honda, Nissan and Ford engines the carmaker has already named the cause, sometimes with free coverage. The first checks cost nothing, and a smoke test to find a leak is a $100–$200 shop fee.

Written by Iqbal Taher Certified mechanic and parts trader since 2011
Fact checked
Updated

Key takeaways

  • Safety: Stop driving if the check engine light flashes, the engine stalls, it hesitates hard or you smell fuel.
  • Long term fuel trim on a scan tool is the number a P0171 diagnosis starts with.
  • A lean condition that is worst at idle points to an air leak, while one worst under load points to fuel.
  • Check that the oil filler cap is tight and the dipstick fully seated before you pay for any test.
  • Many Toyota fuel pumps with this fault are in free recalls, so check the VIN before you buy a pump.

A P0171 code is the OBD-II code for system too lean, bank 1, and that wording sends people looking for a fuel problem. It can be the wrong first move, because air the engine never counted sets the same code.

The code isn't a measurement of how much fuel the engine got. It's the computer announcing it has been adding fuel and has run out of room to add more, and the cheapest way to find out why costs nothing: notice when it runs worst.

What does P0171 mean?

P0171 means system too lean, bank 1. The computer has been adding fuel on that side of the engine and can't add any more.

Codes Powertrain Fuel trim Generic OBD-II

Too little fuel for the air on bank 1

System Too Lean, Bank 1

P0171

What the computer saw

Long term fuel trim hit its limit while adding fuel on bank 1.

Code
P0171
System
Powertrain
Area
Fuel and air metering
Standard
Generic OBD-II
Checks
Whether long term fuel trim runs out of room while adding fuel

What it doesn't prove

It doesn't prove a sensor or pump is bad. Air the engine never counted sets the same code as fuel that never arrived.

Code name from Toyota bulletin T-SB-0009-23.

The engine measures the air coming in and injects what its map says that air needs. Then an oxygen sensor ahead of the catalytic converter reports what was left over after burning, and the computer corrects.

That correction is fuel trim, and long term fuel trim is the number a diagnosis is built on. A large positive long term trim means the computer is adding fuel, and past its limit it stores P0171.

P0171 fuel trim readings and what each value means
What the scan tool shows What it is What it tells you
Long term fuel trim The one to read first What the computer has learned it must add or subtract on this engine, kept until it relearns. A diagnosis starts here, read beside the short term trim
A positive number Adding fuel The computer is adding more than its map called for, because the sensor keeps reporting lean. Air is arriving unmeasured, or fuel isn't
Past its limit The code When long term trim runs out of room to correct, the computer stores P0171 or P0172

This is what to ask a shop to put on screen, because no dashboard shows it.

So the code reports the correction, not its cause. The check engine light codes page explains how the code families fit together.

5Engine computerAdds fuel. Out of room, it stores P0171Air1234ExhaustAir countAdds fuelReads leanExtra airMass air flow sensorCounts the airSplit hoseExtra air gets in,never countedEngineBurns the fuel withmore air than countedOxygen sensorReads the extraoxygen as leanAir12Extra air34ExhaustAir countReads leanAdds fuel5Engine computerAdds fuel. Out of room, it stores P0171Mass air flow sensorCounts the airSplit hoseExtra air gets in,never countedEngineBurns the fuel withmore air than countedOxygen sensorReads the extraoxygen as lean
Uncounted air makes the exhaust read lean, so the computer adds fuel until it runs out of room.

Can you drive with a P0171 code?

In the short term, yes, if it runs smoothly, though a flashing light, stalling, hard hesitation or a fuel smell means stop. Meanwhile it can run the catalyst hotter than intended, which is why this is worth fixing before it becomes a converter.

On a Toyota or Lexus named in recall 20V-012 or 20V-682, run the VIN first. A failing pump there can stall the engine at speed, so smooth running is no guarantee.

Toyota notes that a lean condition may damage the catalyst, and a new converter costs far more than any fix before it. Our P0420 page explains how a converter fails.

What are the symptoms of a P0171 code?

It can be just the light, because the computer keeps correcting the mixture until it reaches its limit. When the mixture runs thin enough to feel, these are the P0171 symptoms carmakers and owners describe:

  • A rough idle. GM's coverage for the 1.4-liter says the engine may run rough, especially at idle.
  • A noise from the engine. Air drawn through a cracked PCV diaphragm can make a noise, which GM's coverage notice describes.
  • Stalling or hesitation. Owners mention stalling in their federal complaints.
  • Hard starting. Toyota's fuel pump bulletin lists hard starts with P0171 when the pump loses pressure.

None of these points at one part on its own. When it runs worst narrows it down, and the causes below each name the test that proves them.

What causes a P0171 code?

It comes down to air the engine never counted, or fuel that never arrived. A sensor misreading either one sets the same code, and the carmakers' documents add a software cause no list of parts includes. P0171 alone confirms none of them. The code says the fuel trim hit its limit, not why.

The front of a small SUV with the hood off and a V8 underneath, with the parts this page names in color and numbered to match its sections: 1 a vacuum or PCV leak, at the PCV valve, the crankcase tube and a vacuum hose, 2 weak fuel delivery, at the fuel rails and injectors, 3 a sensor misreading, the mass air flow sensor on the outlet tube. Engine software and fuel learning aren't drawn.
Where a P0171 code starts, numbered to match the sections below: the air that gets in unmeasured, the fuel that runs short, and the sensor that misreads.Diagram: Oil & Miles
Use this image

Free to republish under CC BY 4.0: credit Oil & Miles and link to this page. The snippet does both.


              
              
            

1. A vacuum leak or a cracked PCV valve

A vacuum leak lets air into the engine after the air flow sensor has done its counting, so the computer meters fuel for less air than arrived. The PCV system, which vents fumes from the crankcase back into the intake, is a common place for it, because its valve and hoses age.

GM found exactly this on its 1.4-liter turbo: a cracked diaphragm in the PCV valve built into the camshaft cover lets in extra air, and it tells technicians to test the valve before replacing the cover. A loose oil filler cap or a dipstick that isn't seated can do the same, and checking both costs nothing.

2. A weak fuel pump, filter or injector

A tired pump, a clogged filter or a dirty injector delivers less fuel than the computer asked for. The air was counted correctly and the fuel fell short, which shows most under load, when the engine wants the most.

Toyota found pumps losing pressure on a long list of its models, with P0171, P0174 or the low-pressure code P0087, and it confirms with a pressure gauge before replacing the pump. Honda found injectors installed wrongly on the Fit, which wear and under-deliver.

3. A misreading air flow or oxygen sensor

A mass air flow sensor that reads low makes the computer meter fuel for less air than is really entering. An exhaust leak ahead of the oxygen sensor does something stranger: fresh air reaching the sensor reads as leftover oxygen, and the computer adds fuel to a mixture that was never wrong.

Nissan warns against replacing the air-fuel sensor first: its revised diagnosis clears the learned values, runs a confirmation procedure, and replaces the sensor only if that procedure sets P2096–P2099. The air flow sensor often sets its own code when it fails, one of P0100–P0104, such as P0101, though not always.

4. Engine software or fuel learning

Sometimes nothing is broken and the computer's logic is wrong, so the fix is a software update. On flex-fuel engines the computer also learns how much ethanol is in the tank, and small fill-ups can confuse it.

Ford reprograms some F-150s for a P0171 with no part fault, and has warned dealers about flex-fuel learning. Toyota's flex-fuel trucks get a reprogram and a reset of the fuel alcohol learning. A dealer can check your VIN for an update before any part is replaced.

A cracked vacuum tee fitting on top of an engine's intake

A cracked vacuum tee

A crack like this lets in air the engine never counted, and a smoke test finds it when you can't hear it. AI illustration by Oil & Miles

Is it a vacuum leak or a fuel problem?

A leak is worst at idle and weak fuel is worst under load, and noticing which costs nothing. At idle the engine draws little air, so a fixed leak is a big share of it. Open the throttle and the same leak is too small to matter.

Fuel works the other way. At idle even a tired pump keeps up, but ask for full throttle up a grade and the shortfall appears.

So a car whose trim numbers look ugly at idle and calm on the highway is telling you to look for air. One that's fine around town and lean when worked is telling you to look at fuel, and our page on why a car shuts off at idle covers the idle causes.

How do you fix a P0171 code?

Read the number before anyone names a part. To narrow a P0171 code down, start by reading every code and the long term fuel trim, in this order:

  1. Read every code and long term fuel trim. Any scan tool with live data shows it. P0174 beside it, or a P0101 or P0087, changes where you look.
  2. Check the cheap seals. The oil filler cap tight, the dipstick fully seated, and no hiss near the engine with it idling.
  3. Note when it runs worst. Ugly at idle and calm at speed is air, and fine at idle and lean under load is fuel.
  4. Run the VIN. A dealer can check whether GM's, Toyota's or Honda's coverage still applies to your car, any open recall and any software update.
  5. Ask for a smoke test or a fuel pressure test. A smoke test finds the leak you can't hear, and a gauge proves the fuel side, as Toyota's bulletin does before replacing a pump.
  6. Don't start with the oxygen sensor. Nissan replaces its air-fuel sensor only after its confirmation test sets that sensor's own codes.

Steps 2 and 3 can miss a leak too small to hear or a pump that only falls short under load. If the shop wants a sensor or a converter, ask for the trim numbers and the test behind the quote, and reading a repair estimate shows what else to ask.

What to say to the shop

When a quote names a part before any test has run:

“I have P0171 and these other codes stored: [codes]. Before you replace an oxygen sensor, an air flow sensor, a fuel pump or injectors, can you show me the long term fuel trim, run a smoke test or a fuel pressure test, and tell me which result points at the part?”

A good answer: the trim numbers and a smoke or fuel pressure test result before any part.

How much does a P0171 code cost to fix?

Often little, because the cheapest fixes come first: a loose oil filler cap or a dipstick that isn't seated costs nothing to put right. A smoke test to find a hidden leak costs a $100–$200 fee at an independent shop.

Weak fuel delivery costs more. A new fuel pump runs $504–$555 on a 2019 Toyota Camry 2.5 and $671–$726 on a 2019 Corolla 1.8 at an independent shop, parts and labor.

Our fuel pump cost page prices other cars. The Camry's pump may be free under Toyota recall 20V-012 or 20V-682 and the Corolla's under 20V-012, so check the VIN first.

Does a warranty or recall cover a P0171 repair?

Sometimes, though most of those windows have closed. GM covered a cracked PCV diaphragm on its 1.4-liter for 10 years or 120,000 miles from the date the car was first put in service, and its deadlines to reimburse owners who already paid have passed.

The date the car went into service decides it. Many Toyota fuel pumps with this fault are also in free recalls. Before you pay, run the VIN, the 17-character number on your registration, through our free VIN checker. A dealer can also check the Toyota, Honda and Ford terms.

How is P0171 different from P0174 and P0172?

P0174 is the same lean code on bank 2, and P0172 is the same system in reverse, too rich on bank 1. On an engine with two cylinder heads, each is a bank with its own oxygen sensor and fuel trim, and bank 1 is the side with cylinder 1.

An inline four has one bank and can't set P0174, and most inline sixes can't either, though BMW's split into two banks and can. P0171 with P0174 points at something both banks share: the air coming in, the fuel pump, or a sensor that reads for both. One bank alone points back at that bank's own plumbing. The P0174 page covers the bank 2 code.

P0172 and P0175 mean long term trim reached its limit while taking fuel away. Leaking injectors, too much fuel pressure and an air flow sensor reading high all produce it, and the P0172 page covers it in detail.

The P0171 lean and rich codes as a set
Code What it says Where to look first
P0171too lean, bank 1one side: local vacuum leak, one injector
P0174too lean, bank 2the other side, same list
P0171 and P0174 together too lean, both banks something shared: MAF, pump, filter, intake before it splits
P0172too rich, bank 1injectors, fuel pressure, a sensor reading high
P0175too rich, bank 2the other side, same list

One bank alone and both banks together point at different places, which is the whole reason to read them side by side.

P0171 code checklist: read every code and long term fuel trim, check the oil filler cap and dipstick, note whether it runs worst at idle or under load, run the VIN. Ask for a smoke test or a fuel pressure test before parts, and don't start with the oxygen sensor. Ask whether GM's, Toyota's or Honda's coverage still applies.
Everything on this page as one checklist: free checks, the shop's tests, and who may pay. Infographic: Oil & Miles
Use this image

Free to republish under CC BY 4.0: credit Oil & Miles and link to this page. The snippet does both.


              
              
            

From the carmakers

What the carmakers' bulletins say

GM blames a cracked PCV diaphragm, Toyota a pump losing pressure, and Nissan warns against replacing the sensor first. Each one lists P0171 among its codes.

In the complaint record no make stands out, though the Cruze and Sonic, the cars GM's 1.4-liter coverage names, lead by model. Unmetered air and weak fuel delivery aren't brand problems, because every engine meters air and pumps fuel.

Toyota

Bulletin T-SB-0009-23

Some 2014 – 2020 model year Toyota vehicles may exhibit a hard start and/or MIL ON condition

Covers
The 2014–2020 Toyotas it lists, with codes including P0171, P0174 and P0087.
Fix
Toyota confirms low pressure with a gauge and replaces the fuel pump under its powertrain warranty, 60 months or 60,000 miles. That has ended for most of the listed years, though some California-certified cars carry 7 years or 70,000 miles. The fuel pump recalls 20V-012 and 20V-682 are still free.
Who pays
May be under warranty
GM

Special coverage N202299080

If this were to occur, excess air could be drawn into the engine intake.

Covers
2011–2014 Cruze, 2012–2014 Sonic, 2014 Trax and Encore 1.4L.
Fix
The camshaft cover with its PCV valve was replaced, covered for 10 years or 120,000 miles. By our estimate that has ended for these model years. A 2015–2016 Cruze 1.4L may still be under GM special coverage N192210230 (10 years or 120,000 miles), so run the VIN.
Who pays
Info only
Nissan

Technical bulletin NTB19-022

Do NOT replace the A/F sensor

Covers
2017–2018 Altima and 2017–2019 Sentra, Rogue and others.
Fix
The sensor is replaced only if P2096–P2099 set on the confirmation procedure.
Who pays
Info only
  • Complaints. Of the 104 complaints naming P0171, 13 are Cruzes and 8 Sonics, and 29 mention stalling, against 14 naming P0174, 4 of them Toyotas and 2 Fords.
  • Other documents. Ford's software fix on some F-150s is booked at 0.3 hours, Honda 22-002 extends cover on the Fit's injectors, and Toyota's fuel pump recalls are 20V-012 and 20V-682.

P0171 make by make in the federal complaint recordShare of each make's NHTSA complaints that name the code

Chevrolet 0.06%
Kia 0.03%
Toyota 0.03%
Ford 0.01%

How to read it: complaints measure who reported a fault, not how often a part fails. Every make is on one scale. Makes naming the code fewer than 10 times are left out, because below that a ranking is noise. Only 4 makes clear that bar for this code, so the list is short by nature rather than by trimming.

Counts: Chevrolet 35 of 58,983, Kia 11 of 33,007, Toyota 11 of 37,042 and Ford 12 of 132,256. Source: NHTSA consumer complaints received through September 30, 2026, model years 2010–2025, 653,343 complaints.

Conclusion

What to do next about a P0171 code

Note when it runs worst and ask for the test behind any quote, a smoke test for a leak or a gauge for the fuel side, and have a dealer check your VIN for GM's 1.4-liter or Toyota's pump coverage before you pay. Fix it before the converter.

Oil & Miles checks each step here against the carmakers' bulletins and NHTSA's complaint file.

OBD-II · Fuel trim codes

Other OBD-II fuel trim codes and what each one means

P0171 · guides for this code

What to read next about P0171

Common questions

Asked most often

Can the fuel itself cause a P0171 code?

It can, mainly on flex-fuel engines, because ethanol carries oxygen inside its own molecule where gasoline's hydrocarbons carry none, and a gallon of it holds about two thirds the energy. More ethanol than the computer expects needs more fuel for the same air, which reads lean until the car learns it.

Will a P0171 code clear itself?

The lamp can, but the code mostly won't: the car turns the lamp off after three sequential drives with similar conditions and no fault, and the stored code stays in memory for around forty warm-up cycles regardless. So have the codes read even after the light has gone out.

What happens if I leave a P0171 code?

The car may feel normal for a while, but it can run the catalyst hotter than intended, and Toyota notes that a lean condition may damage it.

Can an oxygen sensor cause P0171?

Yes, by reporting a mixture leaner than reality, which makes the computer add fuel it didn't need to. An exhaust leak ahead of that sensor does the same thing by letting fresh air reach it.

Sources

  1. GM special coverage N202299080, with N192210230, 19-NA-114, 22-NA-171, 21-NA-105 and special coverage 16139, for the PCV, intake and duct causes and the coverage terms. GM via NHTSA, read September 29, 2026
  2. Toyota T-SB-0009-23, with T-SB-0166-19 and T-TT-0718-22, for the fuel pump, flex-fuel learning and catalyst damage. Toyota via NHTSA, read September 29, 2026
  3. NHTSA recalls 20V-012 and 20V-682, for Toyota's free fuel pump replacement. NHTSA, read October 31, 2026
  4. 13 CCR 1968.2, for the three driving cycles that turn the lamp off and the forty warm-up cycles that erase the code. Cornell Legal Information Institute, read August 25, 2026
  5. Nissan NTB19-022, for the revised P0171 diagnosis. Nissan via NHTSA, read September 29, 2026
  6. Honda 22-002, for the Fit injector extension. Honda via NHTSA, read September 29, 2026
  7. Ford TSB 25-2342, with SSM 49050, for the software and flex-fuel cases. Ford via NHTSA, read September 29, 2026
  8. NHTSA consumer complaints received through September 30, 2026, every complaint naming P0171, its signs and models. NHTSA
  9. Alternative Fuels Data Center, Fuel Properties Comparison, for the chemical structures - ethanol CH3CH2OH against gasoline's C4–C12 - and the energy content, 76,330 Btu per gallon for E100 against 112,114–116,090 for gasoline. US Department of Energy, read September 18, 2026
  10. The causal chain from a lean condition to a failed catalyst, set out with its sources in our own P0420 article: a mixture persistently wrong overheats the catalyst, and an exhaust leak upstream of the sensor produces a false lean reading. Oil & Miles, September 2026

AI illustration by Oil & Miles

How this was compiled

The source is NHTSA consumer complaints received through September 30, 2026, on 2010–2025 models, 653,343 complaints in all.

The idle against load test is reasoning, not a citation. It follows from a fixed leak being a large share of a small airflow and a negligible share of a large one, so no source is offered for it.

What we didn't do

We didn't scan a vehicle, smoke test an intake or measure fuel pressure for this article. We give no fuel trim percentage that counts as a fault: manufacturers set their own thresholds, the figures in circulation are rules of thumb rather than specifications, and quoting one as a limit would be inventing a standard.

We give no frequency ranking of causes, because nothing published counts them in a way we would repeat. We recommend no scan tool.

Prices are ranges compiled in October 2026 for the US market and vary by region, engine and shop rate. Prices from $10 up are rounded to the nearest dollar, so $14.13 reads as $14 and $14.52 as $15. Below $10 they're exact. This article is general information, not advice about your specific vehicle. See the disclaimer.