Warning Lights

P0171 Code: System Too Lean, Causes and Fixes

P0171 means the computer sees a lean mixture on Bank 1. Causes, fuel-trim diagnosis, typical repair costs, whether you can drive, and how P0174 relates.

Last updated

A close-up of a cone-style engine air filter in an engine bay, with no people or readable badges in the frame.
Photo: Benjamin Walsham, via Pexels. Used under the Pexels License.

P0171 is a generic OBD-II powertrain code. The standardized wording is "System Too Lean (Bank 1)." SAE J2012 is the industry standard that assigns those generic codes. RepairPal titles the code the same way. Kelley Blue Book lists it as "Fuel Trim System Too Lean (Bank 1)." A Delaware Division of Motor Vehicles list of generic OBD-II codes, which notes that the first digit tells you whether a code is an SAE generic code, publishes "System too Lean (Bank 1)" for P0171.

Bank 1 is the bank that contains cylinder 1. On a typical four-cylinder that is the whole engine. On a V6 or V8, Bank 2 has its own counterpart, P0174.

In plain English, the engine computer is trying to keep the air-fuel mixture near the usual gasoline target of about 14.7 parts air to 1 part fuel, the ratio RepairPal cites. It watches leftover oxygen in the exhaust with an upstream oxygen sensor or an air-fuel ratio sensor, and it adds or subtracts fuel. Those corrections are fuel trims. When the computer has to keep adding fuel past its calibrated limit, P0171 can set. Identifix, in a November 15, 2024 guide, puts it this way: the module has detected a lean condition on Bank 1 and reached a fuel-correction limit. The code names a condition, not the failed part.

People sometimes type it as "po171." That is the same code.

The check engine light is usually what sent you to a scan tool in the first place. A code is not a diagnosis.

What "system too lean bank 1" means

A lean mixture has too much air, or not enough fuel, for what the engine is doing. The upstream sensor sees extra oxygen in the exhaust, and the computer lengthens the injector pulse to add fuel. Short-term fuel trim is the immediate correction. Long-term fuel trim is the learned correction the computer holds onto. Both become more positive when the system is adding fuel, as Underhood Service explained in a June 2, 2026 P0171 article.

RepairPal says long-term trim should ideally sit close to 1 to 2 percent, and that P0171 is stored when the trim is compensated anywhere from 15 percent to as high as 35 percent. Identifix and Underhood Service both describe the same idea as a calibrated or threshold limit. The exact trip point varies by vehicle. Mazda service information for a long list of later models, in an M-Tip posted by NHTSA and stamped January 3, 2023, says P0171 sets when the fuel-feedback correction reaches the upper limit of 25 percent or more for 20 seconds or more. That figure is for those Mazda applications, not a universal law.

The code can reflect a truly lean mixture, or misleading data. Identifix is clear that P0171 does not prove an oxygen sensor, a mass airflow sensor, or a fuel pump has failed.

RepairPal lists oxygen sensors as a common misdiagnosis. It says the computer generally runs tests on those sensors before it looks at fuel trim, and that P0171 is not an oxygen-sensor problem in the usual case. Sensors can still be biased or slow, and an exhaust leak near the upstream sensor can fool the reading, which is why they get tested later, not replaced first.

Symptoms

The check engine light will come on. Identifix says that lamp may be the only symptom.

When the engine does complain, RepairPal lists a lack of power on acceleration, some coughing or misfiring, and trouble idling, especially when the engine is warm or sitting at a stoplight. Kelley Blue Book adds stalling at a stop, a hissing sound from the engine bay if a vacuum leak is involved, a hard start, and knock or pinging under load, such as on a hill. Identifix's list is in the same neighborhood: rough idle or stalling, hesitation or lack of power, misfiring, and pinging or spark knock under load.

Common causes

The usual theme is unmetered air, bad airflow data, or not enough fuel. Kelley Blue Book calls unmetered air entering the combustion system the most common cause, and says the culprit is often a faulty or dirty mass airflow sensor or a weak fuel pump. RepairPal's common-problems list is vacuum leaks (intake manifold gaskets, vacuum hoses, PCV hoses), the mass airflow sensor, a plugged fuel filter or a weak fuel pump, plugged or dirty fuel injectors, and outdated control-module software.

Vacuum leaks. Air that gets in after the mass airflow sensor is air the computer did not measure, so the mixture goes lean. RepairPal calls a vacuum leak very common, and names a torn PCV hose, a torn intake air boot, a broken dipstick seal (the dipstick is part of the PCV system), a sticking or leaking EGR valve, and a leaking EGR or intake manifold gasket. On a V6 or V8, a code on only one bank can point to a gasket or a cracked manifold on that side. Underhood Service adds a leak behind the mass airflow sensor and a stuck-open EVAP purge valve.

A dirty or under-reporting mass airflow sensor. RepairPal says an under-reporting sensor tells the computer that less air is entering than really is, so the computer injects too little fuel. Dirt, dust, or oil on the sensing wire can do the same thing. Cleaning might buy some time, RepairPal says, but the sensor should eventually be replaced, and the air filter and its housing should be kept clean so a new sensor does not fail the same way.

PCV valve and hoses. Underhood Service calls the PCV valve one of the most missed items, and says a weak, leaking valve can set P0171. MOTOR, in a May 1, 2025 shop-talk column, says even a poor-sealing dipstick or oil cap can let a working PCV system pull in too much outside air, and it tells shops to watch for smoke exiting the crankcase.

Weak fuel pump, plugged filter, or dirty injectors. If the fuel system cannot deliver enough fuel, the computer keeps asking for more and never catches up. RepairPal says to verify fuel pressure and delivery, then check injector drop or flow if pressure and volume are good. Dirty or contaminated gas can plug injectors and set lean codes. Underhood Service notes that on gasoline direct-injection engines, a worn camshaft lobe can cut the output of the high-pressure pump.

An exhaust leak before the upstream sensor. MOTOR's advice is to put a smoke machine in the tailpipe and check for a leak near the upstream oxygen sensors, because those sensors will read outside air as a lean mixture. Identifix says a leak ahead of or near the upstream air-fuel or oxygen sensor can bias the feedback lean, and that a leak only behind the downstream sensor is less likely to explain P0171.

Software. RepairPal says to check for a control-module software update first, because an outdated fuel map can leave a worn engine running lean. Ford later published a bulletin that is a concrete example of that idea, which we get to below.

How to read the fuel trims

This is not a weekend checklist for every car, and it is not a reason to open the fuel system if you are not set up to do that work safely. We're not mechanics. Use the service information for your vehicle, or have a shop do the diagnosis.

Identifix's order starts with recording every stored, pending, and permanent code, plus freeze-frame rpm, load, coolant temperature, vehicle speed, and fuel trims, before clearing anything. Compare Bank 1 with Bank 2 when the engine has two banks, and look at the trims at idle and at a steady higher engine speed.

RepairPal wants at least three long-term trim ranges on a scanner: idle, 3,000 rpm unloaded, and 3,000 rpm with at least 50 percent load, then the freeze-frame data to see which range failed.

The trim pattern is a clue, not a verdict. MOTOR says that if a vacuum leak is the cause, the trims will decrease by about 15 percent when you run the engine at about 2,500 rpm. Identifix makes the same point in slightly broader terms: if positive trim is highest at idle and improves as airflow rises, prioritize a vacuum leak, then confirm it. A problem that gets worse with load points more toward fuel delivery or a mass airflow error than toward a small leak.

If both banks are adding a lot of fuel, the cause often sits in something they share: the intake path after the mass airflow sensor, the sensor itself, or the fuel pump and filter. A code on only one bank is more likely a gasket, an exhaust leak, or injectors on that bank, which is the split RepairPal describes for V-type engines.

RepairPal also publishes a mass-airflow "truth test": at idle, check the barometric-pressure reading on the scan tool. If you are close to sea level and the sensor is reporting about 26.5 inches of mercury, it is behaving as if you were at about 4,500 feet, and the sensor is under-reporting airflow. That check does not replace the vehicle's official test.

After a repair, MOTOR says to clear Keep Alive Memory so the fuel trims can relearn.

Original graphic of a diagnosis order for a P0171 code: read the codes, compare fuel trims, check for leaks, check the MAF, test fuel delivery, then check for an exhaust leak.
Graphic: Zero Traction. Order abridged from RepairPal, Identifix, MOTOR, and Underhood Service.

What it typically costs to fix

The bill follows the cause. RepairPal's national averages, last updated September 3, 2026, do not include taxes and fees, and they do not factor in your city or your exact engine. Related work may also be needed.

RepairNational averageLaborParts
PCV valve$124 to $173$91 to $134$32 to $39
Fuel filter$258 to $322$132 to $194$126 to $128
Mass airflow sensor$274 to $381$51 to $75$223 to $306
Oxygen sensor$440 to $523$93 to $136$347 to $387
Intake manifold gasket$683 to $834$313 to $459$370 to $375
Fuel injector replacement$768 to $953$304 to $446$464 to $507
Fuel pump$1,344 to $1,513$241 to $353$1,104 to $1,160
Exhaust manifold replacement$1,514 to $1,724$349 to $512$1,164 to $1,212

An oxygen sensor is on that list because shops replace them, not because they should be the first guess. RepairPal calls oxygen sensors a common misdiagnosis for P0171. A smaller exhaust leak repair can also land well below a full manifold replacement. A software update or a vacuum hose may cost something else entirely. Get a diagnosis before you budget for the expensive part.

RepairPal warns that working on the fuel system carries a fire risk, and it recommends leaving a fuel-pump replacement to a shop.

Original graphic comparing RepairPal's September 2026 average costs for common P0171 repairs, from a PCV valve to a fuel pump.
Graphic: Zero Traction. Figures are RepairPal national averages last updated September 3, 2026, and do not include taxes, fees, or your location.

Can you drive with a P0171 code?

You can often keep the car moving, but you should not treat this as a problem you can ignore. Kelley Blue Book says you will be able to physically operate the vehicle, but it is strongly not recommended, and it tells you to have the car inspected as soon as possible, especially if it goes into a reduced-power mode.

For a steady check engine light, the EPA's consumer fact sheet, EPA-420-F-02-016, says there is no cause for panic, and that the vehicle is telling you to seek attention soon. The same fact sheet says the vehicle might be wasting fuel, shortening engine life, or causing extra pollution, and that delay can lead to more expensive damage.

Identifix says a significant lean condition can cause hesitation, misfire, elevated combustion temperature, and catalyst stress, though the code alone does not prove the engine or converter is already damaged. RepairPal is blunter about the misfire path: a lean-running engine can misfire and put raw fuel into the catalytic converter, which can result in internal damage. That is one reason a long-ignored lean condition can turn into a P0420 catalyst-efficiency code.

If the engine is shaking, the light is flashing, you hear knock, or you are losing power, don't keep driving just to finish the trip. A flashing check engine light is a different, more urgent warning. If the car still runs smoothly, get the codes read soon and have the cause found before a short trip becomes a converter bill.

P0171 and P0174

P0174 is the Bank 2 version of the same generic code, "System Too Lean (Bank 2)," on the Delaware generic list and in SAE J2012. Bank 2 is the bank that does not contain cylinder 1. You will only see P0174 on engines that actually have two banks, typically a V6 or V8. Identifix says a P0174 alongside P0171 means Bank 2 is also lean.

When both codes are stored, shops usually start with the shared parts: the intake path after the mass airflow sensor, the sensor itself, the PCV system, a stuck-open purge valve, or fuel pressure and volume. A single-bank code keeps the search on that bank's gasket, exhaust leak, or injectors. Related misfire codes, when they are present, are worth reading too. Identifix says P0300 or a cylinder-specific misfire code can appear when the mixture problem affects combustion.

Toyota, Ford, Chevrolet, and Nissan bulletins

P0171 is a generic code. The fix is not. These notes come from official bulletins posted by NHTSA, and they apply only to the models and conditions named. If your car is not on the list, don't invent a match. Have a dealer or shop check the VIN for current service information.

Toyota. T-SB-0009-23, dated February 9, 2023, covers certain 2014 to 2020 Toyota vehicles that may have a hard start, a check engine light, or both, with P0171 and/or P0174 (System Too Lean Bank 1/Bank 2) or P0087 (fuel rail or system pressure too low). Toyota says Techstream data may show positive fuel trims, including a no-pressure condition that has to be verified with a manual fuel pressure gauge. If those codes or the hard start are not present, the bulletin does not apply. If they are present, the next step is a fuel-pressure test. If pressure is within specification, the bulletin still does not apply, and diagnosis continues in the repair manual. If pressure is out of specification and the other criteria are met, the published repair is to replace the fuel pump using the bulletin's procedure. Toyota says that repair, when it qualifies, is covered under the Powertrain Warranty for 60 months or 60,000 miles, whichever comes first, limited to the specified condition, and that some California-certified vehicles registered in California or a state that has adopted California's emission warranty may have longer California coverage. A Toyota dealer can check the VIN. This is not a reason to replace a pump on a Toyota that is outside the bulletin, or on one whose fuel pressure is already in spec.

Ford. TSB 25-2342, dated July 25, 2025, covers some 2021 to 2023 F-150 trucks with the 3.3-liter engine that have a check engine light and P0171 stored in the powertrain control module. Ford says the cause may be the software level of that module, and the published action is to reprogram it with the latest FDRS software. That bulletin supersedes 23-2195. It is a match only for those trucks, and only when the issue and model statements are met. It does line up with RepairPal's general advice to check for a software update.

Chevrolet. GM Special Coverage Adjustment 16139, released March 2017, covers certain 2012 to 2014 Chevrolet Sonic models with the 1.8-liter LUW or LWE engine. GM said a P0171 fuel-system-lean code or a P0101 mass-airflow performance code may set because of a cracked air-cleaner outlet duct, which is unmetered air after the sensor. The published correction was to replace that duct as needed. The special coverage was 10 years or 120,000 miles, whichever came first, from the in-service date, so many of those cars are now outside that window. The mechanical point still stands: a cracked duct after the mass airflow sensor is a documented way to set P0171.

Nissan. NTB19-022, dated March 5, 2019, covers a list of 2017 to 2019 Nissan models, including some Altima, Sentra, Rogue, Murano, Armada, Frontier, Titan, and NV vehicles. Nissan revised the diagnosis for P0171 and P0174 so shops start with an air-fuel sensor confirmation test used for P2096 through P2099. If that confirmation test sets one of those codes, the corresponding air-fuel sensor is replaced. If it does not, Nissan says not to replace the air-fuel sensor, and to continue the lean-code diagnosis while excluding that sensor. That is a useful reminder on any brand: the sensor that reports a lean condition is not automatically the failed part.

FAQ

What does the P0171 code mean?

P0171 means the computer has detected a lean condition on Bank 1, the bank that contains cylinder 1, and has reached its fuel-correction limit. The standardized wording, published on a Delaware Division of Motor Vehicles generic OBD-II list and assigned as a generic code under SAE J2012, is "System Too Lean (Bank 1)." RepairPal uses the same title. Kelley Blue Book lists it as "Fuel Trim System Too Lean (Bank 1)." The code names a condition, not the failed part.

Can I drive with a P0171 code?

Often the car will still move, but you should not ignore the code. Kelley Blue Book says driving is strongly not recommended and that you should have the vehicle inspected as soon as possible. The EPA, writing about a steady check engine light, says there is no cause for panic and that you should seek attention soon. Identifix warns that a significant lean condition can cause misfire, higher combustion temperatures, and catalyst stress. If the engine is shaking, the light is flashing, you hear knock, or you are losing power, don't keep driving just to finish the trip.

What causes a P0171 code?

The usual causes are unmetered air, bad airflow data, or not enough fuel. RepairPal's list includes vacuum leaks, a mass airflow sensor problem, a plugged fuel filter or weak fuel pump, dirty injectors, and outdated software. Underhood Service highlights the PCV valve as a frequently missed leak, and MOTOR notes that an exhaust leak near the upstream oxygen sensor can make the mixture look lean. Kelley Blue Book and Identifix both warn against replacing the oxygen or air-fuel sensor first.

How do you diagnose P0171 with fuel trims?

Record the codes and freeze-frame data first. Then compare short-term and long-term fuel trims at idle and at a higher steady rpm, and compare Bank 1 with Bank 2 if the engine has two banks. RepairPal also wants a loaded rpm reading. MOTOR says a vacuum leak often makes the trims drop by about 15 percent at about 2,500 rpm. A problem that gets worse with load points more toward fuel delivery or a mass airflow error. Confirm the cause with a smoke test, a fuel-pressure test, or the official procedure for your vehicle. We're not mechanics.

How much does it cost to fix a P0171 code?

It depends on the cause. RepairPal's national averages, updated September 3, 2026, include $124 to $173 for a PCV valve, $258 to $322 for a fuel filter, $274 to $381 for a mass airflow sensor, $683 to $834 for an intake manifold gasket, $768 to $953 for a fuel injector replacement, and $1,344 to $1,513 for a fuel pump, all before taxes, fees, and related repairs. An oxygen sensor averages $440 to $523, but that part is a common misdiagnosis. Get a diagnosis before you budget for the expensive part.

What is the difference between P0171 and P0174?

P0171 is System Too Lean on Bank 1, the bank that contains cylinder 1. P0174 is the same condition on Bank 2. A typical four-cylinder has only Bank 1. A V6 or V8 can set one code, the other, or both. When both are stored, the cause often sits in parts the banks share, such as the intake path after the mass airflow sensor, the sensor itself, or fuel pressure.

Sources

Related reading