Code P0171 - System Too Lean: Symptoms, causes, common problems, diagnostic

Updated: July 10, 2021
The OBDII trouble code P0171 - System Too Lean (Bank 1) means that the engine air-fuel mixture is too lean, or there is too much air and too little fuel. Driving a car with the code P0171 can cause more damage to the engine over time, as when the engine runs lean, the combustion temperature is higher.


When an engine runs lean it lacks power and may stall when the car is stopped at a stop sign. The acceleration may also feel slow. The engine may run rough at idle. If this code is caused by a vacuum leak, there might be a hissing noise coming from the engine. Read more about vacuum leaks. The engine may also be difficult to start. Another symptom of an engine running lean is when there is an engine knock or detonation (pinging) under load or when accelerating uphill.


Common causes include:
- Vacuum leaks
- Clogged or faulty Mass Air Flow sensor (MAF)
- Faulty PCV valve or other parts of PCV system
- Stuck open purge valve/solenoid
- Faulty oxygen sensor
- Improperly installed aftermarket intake
- Low fuel pressure
- Clogged-up catalytic converter

How the code P0171 is diagnosed:

With a good scan tool that shows the live data diagnosing the code P0171 is fairly easy. Without a scan tool, the only way to find the problem is to check the basics and research common problems with your particular car make, year and model. We have done some research and posted common problems for some cars, please read further. The best place to take your car for diagnostics is your local dealer - their technicians are factory-trained and know the common problems with the cars they service.
Basic checks under the hood include: is the air filter box properly closed? Does the intake boot have any cracks? Are any of the vacuum lines or hoses disconnected?
If you have a scan tool, check Short Term Fuel Trim (STFT) and Long Term Fuel Trim (LTFT) readings at idle and at higher rpms (read more about fuel trims below). Normally, both LTFT and STFT should be close to zero. If the STFT rises higher than plus 15-20% at idle, but drops at higher rpms, most likely you have a vacuum leak. If the STFT is close to zero at idle, but elevates to 15-20% at higher rpms, the problem could be caused a faulty mass air flow sensor, clogged catalytic converter or low fuel pressure (bad fuel pump). Read more about using a scan tool here.

What is Intake or Vacuum leak?

An air leak anywhere between the engine intake and the mass air flow sensor is often called a 'vacuum leak' or 'intake leak'. Common examples of vacuum leaks include a ripped or cracked intake boot, leaking intake manifold gaskets, stuck-open or defective PCV valve or ripped PCV hose, cracked or disconnected vacuum line. Read more: Vacuum leaks: common sources, symptoms, repairs. Here are a few examples of intake or vacuum leaks:
Cracked intake boot Cracked intake hose Disconnected vacuum line Leaking intake manifold gaskets

Common problems causing the code P0171 in different cars:

One way to find a common problem with your make and model is to search for technical service bulletins (TSBs). For example, the Toyota Technical Service Bulletin (TSB) EG045-07 for the 2003-08 Toyota Corolla and Matrix with the 1ZZ–FE engine mentions a leaking intake manifold gaskets in subfreezing temperature as a possible reason for the code P0171 along with some other codes. If the leaking manifold gasket is confirmed following the diagnostic steps, it must be replaced.
Many Ford vehicles, including Explorer and F150 had a common problem with leaking gaskets between the upper and lower intake manifolds causing the codes P0171 and P0174. Ford has issued a technical service bulletin on this issue. Another known issue in Ford vehicles is a vacuum leak from a ripped-through rubber elbow on one of the vacuum lines at the back of the intake manifold. Some V6 Mazda vehicles (Tribute, MPV) also have this issue where the rubber elbow at the back of the intake manifold rips through, causing a vacuum leak and the code P0171.
A cracked or ripped intake boot is a common reason for the code P0171 in many BMW vehicles.
The service bulletin for Nissan Maxima dated March 2004 mentions replacing an air/fuel sensor as a solution for the code P0171. Another Ford TSB for a number of late 90-s Ford vehicles describes a problem with MAF sensor contamination where both codes, P0171 and P0174 would appear together.
Problems with the mass air flow (MAF) sensor causing the code P0171 are fairly common in many vehicles. Sometimes the mass air flow sensor just gets dirty and gives false air flow readings causing the engine to run lean. Cleaning the air flow sensor may help temporarily; the proper repair involves replacing the faulty mass air flow sensor. A mass air flow sensor can be tested with a scan tool; read more here: mass air flow sensor.

Basic car knowledge: how the air/fuel ratio is adjusted

Fuel trim Control diagram - OBD II system Fuel Trim Control diagram
In modern cars with the OBD-II system, the front oxygen sensor measures the amount of oxygen in the exhaust gases and provides the feedback signal to the engine computer (PCM) whether the air-fuel mixture coming into the engine is lean (too much air and too little fuel) or rich (too much fuel and too little air).
The PCM adjusts the fuel supply accordingly to keep the air/fuel ratio at the optimum level, which is 14.7/1 (14.7 parts of air to 1 part of fuel).
This process is continuous: when the oxygen sensor detects too much oxygen, the PCM assumes that the air/fuel mixture is lean and adds more fuel. When there is too little oxygen in the exhaust (air/fuel mixture is rich), the PCM reduces the amount of fuel. In technical language this adjustment is called fuel trim.

What is Fuel Trim?

Short term fuel trim (STFT) Once the front oxygen sensor is warmed up after a cold start, the engine computer (PCM) starts cycling the air/fuel ratio between a little lean and a little rich. This cycling happens around once or twice per second. This air/fuel ratio adjustment is called short term fuel trim (STFT). You can see this cycling on the graph here: air fuel ratio (oxygen) sensor. A typical scan tool displays the STFT as a percentage with "-" or "+" in the Live Data mode. For example, if your car had a small vacuum leak, you would see the STFT going up to + 10-15% at idle and dropping to + 3-5% at higher rpms.

Long-term fuel trim (LTFT) There is also a long-term fuel trim (LTFT), which is a long-term compensation of the base air/fuel ratio. For example, if over time, the engine gradually develops a small vacuum leak, it makes the engine run leaner (more air and less fuel). In a long term, the engine computer (PCM) will compensate this condition by adjusting the long-term fuel trim (LTFT) to add more fuel. The long-term fuel trim is also displayed as a percentage with a "-" or "+" sign in a scan tool. For example, a long-term fuel trim (LTFT) at +5% means that the PCM has added some fuel, although 5% is considered within normal range.

How the code P0171 is set

If the air-fuel mixture becomes too lean and the engine computer can no longer compensate for this condition by adding fuel, the engine computer (PCM) turns the "Check Engine" light (MIL) ON and sets the trouble code P0171 - System Too Lean for Bank 1 and (or) P0174 - System Too Lean Bank 2, depending on which cylinder bank is affected. The PCM also stores the freeze frame of the parameters (engine temperature, vehicle speed, fuel trim readings, etc.) at the time when the code was set. Typically, the code P0171 is set when either short term fuel trim (STFT) or long term fuel trim (LTFT) adjustment exceeds a certain value (usually +25%). Read more about the freeze frame.

What does the term "Bank 1" mean?

v6 engine Bank1 and Bank2 in a V6 engine.
The terms "Bank 1" and "Bank 2" refer to a separate group of engine cylinders. Most in-line 4-cylinder engines have only one bank: Bank 1. In V6 and V8 engines, as well as in some 4-cylinder engines, the engine is "split" into two groups of cylinders; the Bank 1 is the one that includes the cylinder number one. To know which is Bank 1 and Bank 2 in your car, you can look it up in the repair manual or google it, mentioning the year, make, model and engine size of your car.

Q: What could cause the code P0171 on 2002 Toyota Corolla? A: In the 2002 Corolla, the code P0171 is often caused by a bad or dirty mass airflow sensor or vacuum leaks. Your mechanic can check for vacuum leaks and test the mass airflow sensor with a scan tool. If the mass airflow sensor is causing the lean condition, cleaning it may help, but usually, it will need to be replaced. There also could be some other reasons, but the air flow sensor and vacuum leaks are the most common.