P0171 Code: System Too Lean (Bank 1), Explained in Plain English

“System Too Lean” sounds like a gym poster, but the P0171 code is one of the most common check engine codes, and one of the most satisfying to fix. The cause is often a $20 hose.

Worn engine hoses and connectors that can cause a vacuum leak and a P0171 lean code

Here’s what the code means, the six things that cause it, and a simple test that tells you which group to look in.

What “lean” means

Your engine wants a specific ratio of air to fuel, about 14.7 parts air to 1 part fuel. The computer constantly adjusts the fuel to hold that ratio, using readings from the oxygen sensors. When the engine keeps getting more air than expected, the computer adds fuel to compensate. It can only add so much. Once the correction passes its limit, usually around 20 to 25 percent extra fuel, it sets P0171. A scanner may show P0171 as pending before the light comes on; see pending vs stored vs permanent codes for the difference.

So the code doesn’t mean “not enough fuel” exactly. It means “I’m adding as much fuel as I’m allowed and the mixture is still lean.” Either extra air is sneaking in, or less fuel is arriving than the computer thinks, or a sensor is lying.

Bank 1 is the side of the engine with cylinder number 1. Four-cylinder engines have one bank. If you have a V6 or V8 and see P0171 and P0174 together, whatever’s wrong affects both sides, which rules out anything cylinder-specific.

Symptoms

Rough idle, hesitation when you accelerate, occasional stalling at stops, and poor fuel economy. Some cars run noticeably better once warmed up. Many have no symptoms at all beyond the light.

Driving with P0171 is generally safe for a while, but a lean engine runs hot and can eventually damage the catalytic converter and even valves. Fix it within a few weeks.

The one test that splits the causes in half

If you or your mechanic can look at live data, find the fuel trims: short-term fuel trim (STFT) and long-term fuel trim (LTFT). Positive numbers mean the computer is adding fuel. Now compare idle to about 2,500 RPM:

  • Lean at idle, nearly normal at 2,500 RPM → unmetered air, almost always a vacuum leak. At idle a small leak is a big percentage of total airflow. At higher RPM it’s a drop in the bucket.
  • Lean at both, or worse under load → fuel delivery or the mass air flow sensor. These problems scale with airflow, so they don’t go away when you rev it.

That one comparison saves a lot of guessing.

The six causes

1. Vacuum leak

The number one cause. Rubber hoses crack with age and heat. PCV hoses and valves fail. Intake manifold gaskets shrink and leak (certain GM V6 engines were famous for it). Brake booster hoses split. Listen for a hiss with the engine idling, and have a shop smoke-test the intake if you can’t find it by eye. Smoke tests cost $80 to $150 and find leaks in minutes. Not every leak code is about vacuum, though: a P0455 code points to a large leak in the fuel vapor (EVAP) system instead. Vacuum leaks are often worst before the engine warms up, which is a common cause of a rough idle when cold. A large vacuum leak can also weaken the brake booster, making the brake pedal hard to press.

2. Dirty or failing MAF sensor

The mass air flow sensor measures incoming air with a heated wire or film. Dust and oil (often from an oiled aftermarket air filter) coat the element and make it read low. The computer thinks less air is arriving, delivers less fuel, and the mixture goes lean. A can of MAF sensor cleaner is about $10. Spray, let it dry fully, reinstall. Don’t touch the element and don’t use brake cleaner or carb cleaner.

3. Low fuel pressure

A tired fuel pump, a clogged fuel filter or a failing pressure regulator can’t keep up as demand rises. This is the classic “lean under load” pattern. A fuel pressure test with a gauge on the rail, or live data on direct-injection cars, confirms it.

4. Clogged fuel injectors

Partly blocked injectors deliver less fuel than commanded. Usually this comes with a rough idle and sometimes a misfire code. Injector cleaner in the tank helps mild cases; a professional cleaning or replacement handles the rest.

5. Exhaust leak before the oxygen sensor

A leak in the exhaust manifold or at a gasket upstream of the oxygen sensor pulls in outside air between exhaust pulses. The sensor sees extra oxygen and reports lean, even though the engine isn’t. Listen for ticking on a cold start that fades as the metal warms.

6. A failing oxygen sensor

Less common than people think, but an aged upstream sensor can report lean when it isn’t. Suspect this when the fuel trims look wrong but nothing else checks out. Always check for leaks before replacing a sensor on a hunch. If you also see an oxygen sensor heater code, read our P0135 code guide.

P0171 code: what it costs

FixTypical cost (US)
Vacuum or PCV hose$20 – $150
MAF sensor cleaning$10 (DIY)
MAF sensor replacement$150 – $400
Intake manifold gasket$200 – $500
Fuel filter$50 – $150
Fuel pump$400 – $1,000
Upstream oxygen sensor$150 – $400
Smoke test (diagnosis)$80 – $150

After the fix

Clear the code and drive normally for a few days. The fuel trims should settle back toward zero (anything within about plus or minus 10 percent is fine). If they’re still high and positive, the leak or the fuel problem is still there.

If P0171 came with a misfire code, read our P0300 guide too; lean mixtures and misfires often travel together. And for any other code stored with it, try our OBD2 Code Lookup. A P0128 code alongside it often means a stuck-open thermostat is making the engine run cold.

Before paying for a repair, check whether your vehicle has an open safety recall using the NHTSA recall lookup, since recall work is done free at the dealer.

Free tools from GarageWise HQ

Car Symptom Checker: not sure what's wrong? Answer two quick questions to narrow it down.

OBD2 Code Lookup: got a check engine code? See what it means and what the fix usually costs.

About the author: Muhammad Umair Naseer

Muhammad Umair Naseer is the founder and editor of GarageWise HQ. A software engineer by training, he started the site to turn confusing car problems into clear, practical guides. Every article is researched from owner's manuals, manufacturer service information, and trusted repair resources, and when a job needs a certified mechanic, he says so.