Rick's Free Auto Repair Advice

Top Causes of the P0171 Code and P0174 Code

Fix a P0171 and P0174 Lean Code Using Proven Diagnostic Strategy

Quick Summary
The P0171 and P0174 codes are some of the most misunderstood OBD-II trouble codes. Both codes indicate the engine is running too lean—either too much air or too little fuel. A P0171 indicates a lean condition on bank 1, while a P0174 indicates a lean condition on bank 2. Most of the time, these codes are caused by something simple, such as a vacuum leak, a dirty MAF sensor, or low fuel pressure. But I’ve also seen trickier issues, such as intake manifold leaks and incorrect temperature sensor readings.

When I diagnose P0171 and P0174, it’s critical to understand how these codes are set in the first place so you don’t replace perfectly good parts. I walk you through what these codes mean, how they affect your engine, and most importantly, how I diagnose and fix them right the first time using a fool-proof diagnostic strategy.

Common Mistakes When Diagnosing Lean Codes

When DIYers see a P0171 or P0174 lean code, they usually jump straight to replacing O2 sensors. That’s a huge mistake. The oxygen sensors don’t cause codes; they’re just the messenger, reporting data that’s out of spec. In other words, a lean code is a symptom, not a diagnosis.

Understanding Fuel Trim: The Foundation of Every Lean Code Diagnosis

If you want to fix a lean code, you have to understand what fuel trim is and how it works.

Fuel trim is your engine’s way of fine-tuning the air/fuel mixture on the fly.

Here’s the idea: your engine needs a precise balance of air and fuel to run efficiently — roughly 14.7 parts air to 1 part fuel. Based on inputs from the Mass Airflow Sensor (MAF), Manifold Absolute Pressure sensor (MAP), the engine coolant temperature sensor (ECT), the accelerator pedal position sensor (APP), and the throttle position sensor (TPS), the computer calculates a set amount of fuel for the operating conditions at that moment in time. The oxygen sensor sits in the exhaust and checks how well the computer did its job. If the oxygen sensor sees too little oxygen in the exhaust, the computer knows that the air/fuel mixture was too rich (too much fuel). If the oxygen sensor reports too much oxygen in the exhaust, the computer knows that the air/fuel mixture was too lean (too little fuel).

Using feedback data from the oxygen sensors, the ECM adjusts the fuel-mixture calculations and builds a history log of its adjustments. These adjustments are called fuel trims.

There are two kinds:

Short-term fuel trim (STFT) — These are instant, moment-to-moment corrections. Think of it like a chef constantly seasoning a dish as it cooks and noting it in the recipe. When STFT remains at or near the same percentage for an extended period, the ECM knows this isn’t a fluke; it’s a sign of a longer-term problem. So it wipes the STFT clean and moves the data over to long-term fuel trim.
Long-term fuel trim (LTFT) — If the engine keeps needing the same correction over and over, the computer “learns” and saves that adjustment permanently. This is the chef crossing out the original recipe quantities and entering the latest versions that work well.

Fuel trim is measured as a percentage.

• A reading near 0% means everything is balanced, and the ECM didn’t have to make any modifications to the recipe.
• A positive number (like +15%) means the ECM had to add 15% more fuel because the mixture was running lean.
• A negative number (like -15%) means the ECM had to reduce fuel because its original calculations were too rich.

Here’s how I use LTFT trim when diagnosing a P0171 or P0174 code.

LTFT 0% to +10% → Normal
LTFT +15% to +25% → Confirmed lean code
LTFT Above +25% → Severe condition

When I see both banks with high positive fuel trim, I know I’m dealing with something affecting the entire engine—not just one cylinder.

Symptoms of a P0171 or P0174 code

• Check Engine Light
• Low engine power/slow acceleration
• Rough idle
• Stalling or surging
• Engine misfire
• Spark/Engine Knock
• Possible hard start or no start

Although some vehicles run surprisingly “okay,” while others misfire and buck like a bucking bronco.

My Step-by-Step Diagnostic Strategy to Fix a Lean Code

Step 1: Compare Fuel Trim at Idle vs RPM. Using live data on my scan tool, I record STFT and LTFT at idle and again at 2500 RPM

High fuel trim at idle, but normal at 2500 RPM indicates a vacuum leak
High fuel trim at all speeds indicates a fuel or MAF issue
High fuel trim under load indicates a fuel delivery problem

Step 2: Check for Unmetered Air (The #1 Cause of P0171 P0174)

The MAF sensor measures how much air is coming into the engine. The MAF sensor is located right after the air filter. If there’s a leak in the air duct between the MAF and the throttle body, a disconnected vacuum line, or an intake manifold leak, that UNMETERED air will throw off the ECM’s air/fuel calculation. So, I always start my diagnosis by looking for an unmetered air leak.

I inspect:

Intake duct after the MAF
PCV hoses and fittings
Intake manifold gaskets
Brake booster

A cracked intake boot is one of the most common causes of P0171 and P0174, especially when it opens under vacuum.

this image shows a torn air duct that can cause a P0101 code

Torn intake air duct

To confirm:
I use a smoke machine (best method)
Or a propane/carb spray test while watching fuel trim
If the fuel trim drops when I introduce fuel, I’ve found the leak.

The most common causes of a P0171 or P0174 code

Too much air is getting into the engine

• Air intake duct: The rubber intake boot between

The air filter box and throttle body are notorious for developing cracks, especially in the pleated flex area. Even a tiny split can pull in extra air at idle and set a P0171/P0174 code. Pro tip: Flex the boot while inspecting — cracks like to hide in the folds.

• Vacuum hoses and PCV plumbing:
Brittle plastic hoses are prone to cracking at elbows and connectors. PCV hoses are a top offender, especially on Ford, GM, and Hyundai/Kia engines. A loose or popped-off line is an instant lean condition.

• Intake manifold gasket leaks:
This is common on engines that use rubber O-ring gaskets. Some shrink when cold, so the P0171/P0174 code appears on a cold start and disappears at warm-up.
• Brake booster diaphragm leaks
Often overlooked — but a torn booster diaphragm acts like a massive vacuum leak.

Step 3: Evaluate the MAF Sensor (A Top Cause of Lean Codes)

A dirty or failing MAF sensor underreports airflow, which leads directly to a lean code.

What I look for:
Low airflow readings (grams/sec) using live data
Contamination from oiled air filters

Rule of thumb:
About 1 gram/sec per liter of engine size at idle
If it’s off, the computer underfuels—and sets P0171 and P0174.

Cleaning the MAF often fixes the issue. If not, replacement is the next step.

this image shows a MAF sensor cleaning procedure• What contaminates a MAF sensor?

Reusable oiled air filters are a frequent culprit. Over time, the oil-soaked cotton fibers break away from the filter and stick to the hot wire in the MAF sensor, where the fibers burn and form an insulating carbon film. Now insulated from the real incoming air temperature and airflow, the sensor begins to under-report airflow. In other words, the ECM thinks less air is entering, so it adds less fuel, making the mixture leaner.
See this post for instructions on cleaning a MAF sensor.

Step 4: Test Fuel Delivery (When Fuel Trim Stays High Everywhere)

If fuel trim is high at all RPM ranges, I shift my focus to fuel.

I test:

Fuel pressure under load
Fuel volume
Injector performance

Even slightly clogged injectors can trigger a lean code because they reduce fuel flow just enough to push fuel trim to its limit.

1) Clogged Injector Nozzles (most common)— Short-trip driving or sitting unused for long periods can leave varnish deposits in the injector nozzles that reduce fuel flow.  Instead of spraying a fine mist, they sputter out a weak stream, causing a lean condition.

2) Weak or Malfunctioning Injector Coils (Less common) — Internal electrical failures reduce injector opening strength or timing, resulting in poor delivery and cylinder-to-cylinder fuel imbalance.

3) Injector O-ring Vacuum Leaks (Least likely)— Sometimes the injector itself works fine, but a torn O-ring allows vacuum to pull in unmetered air right at the intake port. That can produce a localized lean condition that significantly affects fuel trims.

Step 5: Check for Exhaust Leaks (Often Missed)

An exhaust leak upstream of the O2 sensor can trick the system into thinking the engine is running lean.

This falsely triggers:
P0171
P0174
Other lean code conditions

I check:
Exhaust manifolds
Flange connections
Missing bolts or gaskets

Even a small leak can skew sensor readings.

To check for exhaust leaks, look for:

• Rust cracks at the manifold or flange: Those tiny fissures expand when the manifold heats up, making the problem worse at higher load or RPM.
• Loose or missing manifold bolts: A surprisingly common failure point on many trucks and SUVs — especially V8s.
• Failing exhaust gaskets: Leaks at the manifold-to-head connection or the exhaust flanges can introduce enough oxygen to fool the sensor.
• Aftermarket exhaust installations. Poor welds or clamp connections often leak just enough to skew sensor data.

Refer to this article for tips on finding an exhaust leak

GDI Engines and Carbon Buildup

In a traditional port fuel-injected engine, gasoline sprays directly onto the intake valves, constantly washing them clean. In a GDI (Gasoline Direct Injection) engine, the fuel is sprayed directly into the cylinder, bypassing the intake valves entirely — so nothing ever cleans them.

Over time, oily blow-by vapors from the crankcase

this image shows carboned intake valve

Buildup on the back face of an intake valve

vent onto the back of those valves and bakes into hard carbon deposits. The valves end up coated in a crusty, sponge-like buildup.

The carbon buildup:

1. Restricts Airflow — Heavy carbon deposits physically restrict airflow into the cylinder.

Here’s what happens:
The Mass Air Flow sensor measures incoming air at the intake. But carbon buildup reduces the amount of air that actually reaches the cylinder. This creates uneven cylinder filling

Now the key point:

Some cylinders get less air than expected
Combustion becomes unstable or incomplete
Oxygen sensors detect excess oxygen in the exhaust

The computer interprets this as a lean condition, even though airflow is actually being disrupted—not simply increased.

2. Turbulence and Poor Airflow Distribution — Carbon doesn’t just block airflow—it distorts it. Instead of smooth airflow into the cylinder, you get:

Turbulence
Uneven air/fuel mixing
Cylinders running slightly differently from each other

That leads to:
Partial misfires
Oxygen left over in the exhaust stream

The upstream O2 sensors detect excess oxygen, and the ECM responds by increasing fuel delivery, raising fuel trim, and eventually setting a lean code.

3. Intake Valve Sealing Issues — In severe cases, carbon buildup can prevent the intake valve from sealing properly.

That causes:

Loss of compression
Reduced volumetric efficiency
Weak combustion

Again, weak combustion leaves oxygen in the exhaust, mimicking a lean condition and potentially triggering codes like P0171 or P0174.

4. Cold Start Lean Conditions (Very Common) — This is where I see carbon buildup show up most often.

When the engine is cold:
Deposits are hard and thick
Airflow restriction is worse
Fuel atomization is poorer

You’ll often see:
High fuel trim at cold idle
Lean codes that disappear as the engine warms up

That’s a classic carbon buildup signature on GDI engines.

How I Confirm Carbon Buildup Is the Cause

I don’t guess—I verify.
1. Check Fuel Trim Patterns — If I see high positive fuel trim at idle that improves at higher RPM, that suggests airflow restriction rather than fuel delivery. 
2. I smoke check the intake— If I’ve already checked for air duct, vacuum hose, and intake manifold leaks, and I’ve smoke tested the system, then I start thinking carbon.
3. With a Borescope Inspection — This is the gold standard. I insert a scope through the intake or spark plug hole and look directly at the valves. Heavy deposits confirm the diagnosis.
4. Go into Mode $06 and check the misfire counters — Carbon buildup often causes:
Random misfires at idle
Cylinder imbalance
That supports the theory that the intake valves have heavy carbon deposits. That’s when it’s time to clean the intake valve.

Why You Should Never Ignore a Lean Code

Driving with P0171 or P0174 isn’t harmless.

I’ve seen it lead to:

Burned exhaust valves
Engine overheating
Misfires
Catalytic converter damage

If you want to protect the engine, you need to fix a lean code as soon as it appears.

Final Thoughts: This Is How You Fix P0171 and P0174 the Right Way

Every time I diagnose P0171, P0174, or any lean code, I follow the same system: start with fuel trim, separate air vs fuel issues, and test methodically.

The truth is simple—if you understand fuel trim, you can diagnose and fix a lean code faster than most technicians who rely on guesswork.

©, 2018 Rick Muscoplat

Posted on by Rick Muscoplat



Custom Wordpress Website created by Wizzy Wig Web Design, Minneapolis MN
Ricks Free Auto Repair Advice