A P0171 code is set by your vehicle’s powertrain control module (PCM) when it detects that the air-to-fuel ratio of your vehicle is too lean. This means that the PCM is relaying that the engine is receiving too much air into the combustion chamber and not enough fuel.
The PCM receives signals from the oxygen sensors located in your vehicle’s engine bay and is constantly working to adjust the right amount of air and fuel based on the readings provided by these sensors.
When the factory predefined range falls out of line, more specifically, is lower in fuel than the motor needs, the PCM will trigger the P0171 code.
The PCM then calls for more fuel to be sent through the fuel injectors and into the combustion chamber of the engine. This action is called a fuel trim, and in the case of a P0171 code, where more fuel is called for, this is a positive fuel trim.
What Does the P0171 Code Mean?
The Code P0171 stands for “Fuel Trim System Too Lean (Bank 1)”.

When the ECM/PCM is having to add too much fuel based on input from the O2 sensor, the fault code P0171 will be sent to the ECM, which will trigger the check engine light to illuminate.
This code could either mean that the oxygen sensor is detecting too much oxygen or too little fuel in the mixture.
This lack of fuel is known as a lean mixture. In simpler terms, what the code P0171 means is that your system has too lean of a mixture and is not operating optimally.
A vehicle running on a lean mixture causes more pollution because it emits oxides of nitrogen (NOx) that are harmful to the environment. Lean vehicles also have a tendency to misfire as hydrocarbons from unburnt fuel reach the catalytic converters.
This could cause a spike in the car’s fuel consumption, as well as exhaust damage and emission test failure.
If you wish to learn more about rich and lean OBD codes, you can read our discussion about air-fuel mixture. To gain a technical understanding of how the air-fuel mixture can trigger codes to be stored in a vehicle, you can read our explanation about the ideal mixture and OBD codes.
Otherwise, continue reading the following section to quickly learn the possible causes of P0171.
When the P0171 code sets, the oxygen sensors detect too little oxygen in the exhaust (running “lean”) and the control module adds more fuel than normal to sustain the proper air/fuel mixture.
- Rich Mixture = Too much fuel, not enough air
- Lean Mixture = Too much air, not enough fuel
Symptoms of this DTC
Sometimes, when your check engine light comes on, you won’t notice any difference in the way your vehicle operates. When the light accompanies a P0171 code (after scanning for trouble codes), there will be other symptoms.
When there’s too much air inside, your engine cannot function as it should. When your engine is running, but you aren’t driving, you might notice a rough idle or the engine making a coughing sound.
While you drive, it may feel like your car is lacking power when you go to accelerate or drive uphill. You might even hear or feel your engine misfire.
If you don’t notice your car driving differently while showing a code P0171, then there is a chance that your sensor is faulty. These parts do fail.
However, even if there aren’t other symptoms, you must confirm that the parts around the sensor are working. You don’t want to replace an expensive part for no reason.
Common causes of P0171 Code
The vacuum system is the first area to check when your vehicle stores a P0171 code. A small tear or crack in the vacuum lines causes extra air to enter the system.
A leak that causes diagnostic trouble code P0171 could be anywhere around the engine intake, including the PCV hoses, vacuum hoses, and the intake manifold gasket.
If all of the vacuum lines are solid, then the source likely comes from within the fuel system. A weak or failing fuel pump won’t push enough gasoline to the engine. Clogged fuel injectors or a dirty fuel filter will cause a similar backup.
In cases where the vacuum system is leak-free, there is enough gas reaching the engine, and the code P0171 still shows with your check engine light, there remains a hope of finding the cause.
The oxygen sensor, mass airflow sensor, or the air-fuel ratio sensor might be dirty, faulty, or damaged. Alternatively, there might be an exhaust leak affecting the readings.
Is Code P0171 Serious?
Any time your check engine light is on, you should take the reading seriously. A P0171 code is no exception to this rule. When the engine stores this code, you should not drive your vehicle far, if at all.
When your engine runs lean, there is not enough gasoline for it to run efficiently. As a result, you run the risk of the vehicle becoming incapable of accelerating to meet the speed of traffic or to climb a steep hill. The car could also overheat and become irreparable.
Those who modify their turbocharged vehicle by increasing boost are more susceptible to get a code P0171. More air usually equals more power but you must add additional fuel to keep the ratio in line.
At best, when your vehicle shows code P0171, it is not using its fuel efficiently. You’ll waste gas and money whenever you drive.
How to Diagnose Code P0171?
It’s vital to perform an OBD-II scan of your vehicle before assuming the issue’s cause. You or a mechanic should scan for Code P0171 to ensure this is the correct diagnosis for your automobile and that no other fault codes are showing up upon seeing a check engine light.
You might think that changing out some sensors will resolve the issue, but a proper OBD-II scan will confirm the problem takes place around Bank 1. It is recommended that someone with experience in the diagnostics field check for Code P0171.
A professional mechanic should have some additional tools to get to the bottom of the issue.
Below is a list of areas to inspect after finding Code P0171. Complete these steps in the order until you uncover the reason for the error message:
- Use a vacuum gauge to locate leaks —only when the engine is off.
- Check fuel sensor and mass flow air sensor performance with a fuel pressure gauge.
- Follow manufacturer instructions for testing oxygen sensors throughout the fuel system.
- Once you’ve tried all other options, the problem likely lies in the power control module.
How Do I Fix the P0171 Code?
You can resolve the Bank 1 system running too lean error using a few approaches. Depending on the issue’s cause, you may be able to turn the check engine light off by completing one or more of these repairs:
- Replace the fuel pump or fuel filter
- Change the fuel pressure regulator
- Replace the powertrain control module
- Change one or more injectors
- Replace one or more oxygen sensors
- Change the mass airflow sensor
- Repair vacuum leak
To prevent the P0171 code from returning, you can maintain your vehicle regularly, such as with oil changes and tune-ups.
Cost to Fix Code P0171
Remember that prices may vary based on location, labor costs, and the make and model of your vehicle.
- Vacuum/PCV Hose – Replacing a vacuum or PCV hose can range from $90 to $190, including both parts and labor. Typically, parts cost between $10 and $50, while labor costs vary from $80 to $140, based on what shop you take your car to.
- Intake Manifold Gasket – Intake manifold gasket replacement can cost you between $100 and $500. The gasket itself may range from $20 to $100, while labor costs can run anywhere from $80 to $400, again depending on your vehicle’s specifics.
- Fuel Pump – Fuel pump replacement can be pricey, with costs ranging from $300 to $800. A new fuel pump will usually set you back between $100 and $400, with labor costs falling between $200 and $400.
- Fuel Injector – Replacing a fuel injector can cost anywhere from $130 to $800, depending on your vehicle’s make and model. The injector part itself can run between $50 and $300, while labor costs can vary from $80 to $500.
- Fuel Filter – Fuel filter replacement is generally more affordable, with costs ranging from $90 to $190. You can expect the filter part to cost anywhere from $10 to $50, while labor costs will likely fall between $80 and $140.
- Oxygen Sensor – Oxygen sensor replacement can set you back anywhere from $100 to $400. The cost of the oxygen sensor itself typically falls between $20 and $200, and labor costs will usually range between $80 and $200.
- MAF Sensor – Mass Air Flow (MAF) sensor replacement costs can range from $200 to $500. The MAF sensor itself can cost you between $100 and $300, while labor costs can run anywhere from $100 to $200.
- Air/Fuel Ratio Sensor – Replacing the air/fuel ratio sensor typically costs between $130 and $500. The sensor part itself will likely fall between $50 and $300, with labor costs ranging from $80 to $200.
Why Does a P0171 Code and Running “Too Lean” Matter?
“Lean” running cars and light trucks are highly polluting vehicles. Most of the NOx pollution, which is poisonous and can cause asthma, is caused by vehicles that are running too lean.
A lean running car can also misfire, which puts raw fuel (HCs) into the catalytic converter which can result in internal damage, and on into the atmosphere. When you are behind a car or truck that is misfiring it makes your eyes burn.
In comparison, a “rich” running engine (one that is not misfiring as a result) has no smell (CO is odorless) or you may detect a rotten egg smell, which is sulfur dioxide produced by the Catalytic Converter.
P0171 is not an Oxygen Sensor problem. Before a P0171 code is possible, the computer first ran a series of tests to validate the readings from the oxygen sensors.
Since the oxygen sensors passed their readiness tests and didn’t set any codes, the computer then looked to the Fuel Trim adjustment. When the computer determined the air-to-fuel mixture to be too lean, it then set the P0171 code.
What if There Is No Vacuum Leak and Codes P0171 is Set?
An “underreporting” Mass Air Flow Sensor can be a common cause of a code P0171. Essentially, this means that the Air Flow Sensor is telling the computer that much less air is entering the engine than actually is.
Since the oxygen sensors are telling the computer that more fuel is needed, this causes confusion in the computer because the Mass Air Flow Sensor is still saying there is too little air and the Oxygen Sensor is reporting that the mixture is still too lean.
The computer tried to compensate, but since resolution is impossible, it sets the code. It is important to restate that the Oxygen Sensors are accurate—the fuel mixture is too lean.
In this case, the Air Flow Meter or Sensor is inaccurately reporting the real amount of air entering the engine.