Skip to content
MotorLogic

Generic · engine

P0171 — Engine Running Lean (Bank 1)

System Too Lean (Bank 1). Long-term fuel trim on bank 1 has reached the maximum positive correction the engine control module is permitted to apply — typically around +25% — meaning the computer has run out of authority to add enough fuel to reach the target air-fuel ratio.

ModerateShort trips only$20–$1,000 typical repair

Quick answer

P0171 means your engine is getting more air than the computer can match with fuel. It has already added all the fuel it is allowed to, the mixture is still lean, and it gives up and turns on the light. On most vehicles the cause is unmetered air sneaking in past the mass airflow sensor — a cracked intake hose, a split PCV line, a leaking intake gasket — not a fuel problem at all. A shop smoke test at $80–$150 usually finds it, and the repairs themselves typically run $150–$600. Left alone, a lean condition runs hot enough to eventually cook the catalytic converter.
Diagnostic summary
Problem
P0171 — Engine Running Lean (Bank 1)
Severity
ModerateGet it looked at soon
Can you drive?
Short trips only

Most cars with P0171 drive close to normal, with perhaps a rough idle and a hesitation off the line, so driving it for a week while you sort out a repair is reasonable. It is not something to leave for months. A sustained lean mixture burns hotter than the engine was designed for, and over time that means detonation, burnt exhaust valves and a poisoned catalytic converter — a $200 vacuum hose problem quietly turning into a $1,500 one.

Typical repair
$20–$1,000
System
engine
Common causes
Vacuum leak in the intake system, Dirty or failing mass airflow sensor, Failed PCV valve or hose

Symptoms drivers report

  • Rough or unstable idle that sometimes surges up and down on its own.
  • Hesitation or a stumble when you first press the throttle.
  • A whistling or hissing sound from the engine bay that changes with engine speed.
  • Hard starting, particularly on a cold morning.
  • Slightly reduced power, sometimes with a misfire code appearing alongside.
  • On many newer vehicles, a check engine light and no noticeable symptom at all.

What triggers this code

  1. Vacuum leak in the intake system

    Very common

    Any air that enters after the mass airflow sensor is air the computer never measured, so it never adds fuel for it. Rubber and plastic intake components go brittle with underhood heat, and the usual failure points are the accordion intake boot, the PCV hose, the brake booster hose and the intake manifold gasket. This is the leading cause by a wide margin.

    How to spot it

    Long-term fuel trim well above +20% at idle that drops close to normal at 2,500 rpm. A fixed-size leak matters enormously when total airflow is small and barely at all when it is large.

    The fix

    Smoke-test the intake, then replace the cracked hose, split PCV tube, brittle intake boot or leaking manifold gasket.

    $100–$600Moderate DIY
  2. Dirty or failing mass airflow sensor

    Very common

    The MAF sensor is a heated element that measures airflow by how fast the air cools it. Oil film from an over-oiled aftermarket air filter, dust that got past a poorly seated filter, or simple age all cause it to under-report airflow. The computer then under-fuels, the oxygen sensor sees lean, and trims climb until the code sets.

    How to spot it

    Fuel trim is high across the entire rpm range rather than only at idle. As a rough sanity check, MAF grams per second at wide-open throttle should land in the same neighbourhood as the engine's horsepower rating.

    The fix

    Clean the sensing element with MAF-specific cleaner and nothing else. Replace the sensor if cleaning does not move the trims within a drive cycle.

    $20–$350DIY friendly
  3. Failed PCV valve or hose

    Common

    The positive crankcase ventilation system is a deliberate, metered vacuum leak. When the valve sticks open or the hose splits, it becomes an unmetered one. On many modern engines the PCV valve is built into the valve cover, so the repair is a whole cover assembly rather than a $12 part.

    How to spot it

    Trims are high at idle, and lifting the oil filler cap with the engine running changes idle speed noticeably — or the cap resists coming off because crankcase vacuum is excessive.

    The fix

    Replace the PCV valve, the hose, or the integrated valve cover assembly depending on the design.

    $60–$400Moderate DIY
  4. Weak fuel delivery — clogged filter, tired pump or dirty injectors

    Common

    If the engine cannot get the fuel it is asking for, the computer keeps commanding more and the trims climb the same way they do with an air leak. The distinguishing feature is when it happens: fuel supply problems get worse as demand rises, so the trims are worst at cruise and under load rather than at idle.

    How to spot it

    Trims are near normal at idle and climb with load or highway speed, and fuel rail pressure drops below specification during hard acceleration.

    The fix

    Test rail pressure under load. Replace the fuel filter first where one is serviceable, then the pump module or injectors as the readings direct.

    $150–$900Advanced DIY
  5. Exhaust leak upstream of the oxygen sensor, or a lazy sensor

    Occasional

    The lean reading may be false. A crack or a leaking gasket ahead of the front oxygen sensor lets outside air get pulled into the exhaust between pulses, and the sensor reports lean even though the mixture in the cylinder was correct. An aged upstream sensor that has drifted lean does the same thing electrically. In both cases the engine is fine and the computer is being lied to.

    How to spot it

    A ticking exhaust noise ahead of the sensor on a cold start, or an upstream sensor whose voltage will not reach 0.9 volts when the mixture is deliberately enriched.

    The fix

    Repair the exhaust leak, or replace the upstream oxygen sensor with an OEM-grade unit.

    $150–$600Shop recommended

How to diagnose it

  1. Read short-term and long-term fuel trims at idle and 2,500 rpm

    This is the central test and it costs nothing but a scan tool. Warm the engine fully, record short-term and long-term trim for bank 1 at idle, then hold 2,500 rpm and record them again. High at idle and normal at 2,500 rpm is a vacuum leak. High at both is the MAF sensor or fuel supply. Normal at idle and high under load is fuel delivery.

    Tools: OBD-II scan tool with live data

    Result: Sorts the entire cause list into one of three groups before you open anything.

  2. Check whether bank 2 is lean too

    On a V6 or V8, look for P0174 stored alongside P0171. Both banks lean together means the cause is shared by both — the MAF sensor, fuel pressure, PCV or a leak at the common plenum. Bank 1 lean on its own means a localised leak or an injector problem on that side. On a four-cylinder there is only one bank, so this step does not apply.

    Tools: OBD-II scan tool

    Result: Halves the search area on multi-bank engines.

  3. Smoke-test the intake

    A shop introduces low-pressure smoke into the intake with the engine off and watches for where it escapes. It finds cracks in the intake boot, split PCV and brake booster hoses, leaking manifold gaskets and failed injector seals in one pass. At $80–$150 this is almost always cheaper than guessing at parts, and it is the step most DIY diagnoses skip.

    Tools: Smoke machine

    Result: Locates unmetered-air leaks precisely rather than by inference.

  4. Inspect and evaluate the MAF sensor

    Pull the sensor and look at the hot-wire or hot-film element for oil film or dust. Clean it with MAF cleaner only — brake cleaner and carburetor cleaner destroy the element. Then compare its live reading at idle and at wide-open throttle with the expected values for the engine size. Also check that the air filter is seated and that the intake tube clamps downstream of the sensor are tight.

    Tools: MAF sensor cleaner, OBD-II scan tool

    Result: Confirms or eliminates the second most common cause for under $15.

  5. Test fuel pressure under load

    Connect a gauge to the fuel rail, or read commanded versus actual rail pressure on a scan tool where the vehicle supports it. Idle pressure is not enough — the failure often only appears when demand rises. A pressure that sags more than a few psi below specification during hard acceleration points at the pump, the filter or a restricted supply line.

    Tools: Fuel pressure gauge, OBD-II scan tool

    Result: Rules the fuel supply in or out under the conditions that actually matter.

  6. Check the exhaust and the upstream oxygen sensor

    Listen along the manifold and the pipe ahead of the front sensor with the engine cold. Then watch the upstream sensor's response: it should swing rapidly across roughly 0.1–0.9 volts and reach both extremes when the mixture is forced rich and lean. A sensor that will not climb past about 0.7 volts under enrichment is reporting lean when it should not be.

    Tools: Mechanic's stethoscope, Scan tool with live graphing

    Result: Catches the case where the engine is fine and the measurement is wrong.

Repairs & cost

Vacuum hose or intake boot replacement

The cheap and common outcome. A cracked accordion boot, a hardened PCV elbow or a split brake booster hose. Most are accessible from the top of the engine with hand tools, and the parts are usually $15–$80. This is the repair a smoke test most often points to.

$100–$400Moderate DIY1 hr labor

Intake manifold gasket replacement

Required when the leak is between the manifold and the head. The manifold, throttle body and often the fuel rail have to come off, which is where the labor sits. Plastic intake manifolds that have warped or cracked need replacing rather than resealing, which roughly doubles the parts cost.

$250–$700Shop recommended2.5 hrs labor

Mass airflow sensor cleaning or replacement

Cleaning is a $12 can of MAF cleaner and ten minutes. Replacement runs $60–$300 for the part depending on the vehicle. Use an OEM or OEM-supplier sensor here — the calibration matters, and generic MAF sensors are a common source of a code that never quite goes away.

$20–$350DIY friendly0.4 hrs labor

Fuel pump, filter or injector service

The expensive branch. A serviceable inline filter is $40–$120 installed. An in-tank pump module means dropping the tank or opening an access panel and runs $500–$1,000 on most vehicles. Injector cleaning on a bench is a good middle option when flow is restricted rather than absent.

$250–$1,000Shop recommended2.5 hrs labor

Vehicles that set this code often

Design details that make some models more prone to this fault than others.

  • Ford F-150

    The 4.6 and 5.4-liter modular V8s through the late 2000s routinely set P0171 together with P0174 from a cracked plastic intake manifold or a collapsed PCV hose. Both banks going lean at the same time is the signature, and it points at the shared plenum rather than at anything on one side.

  • Toyota Camry

    The 2AZ-FE four-cylinder's intake manifold gasket and the rubber elbow on the PCV line get brittle from heat cycling and become a routine source of unmetered air past about 100,000 miles. These are inexpensive parts that are easy to overlook because they look intact until you flex them.

  • Hyundai Tucson

    Direct-injection Tucsons carbon up the intake valves, and the purge control solenoid is a known failure point. A purge valve that will not seal lets unmetered air into the intake continuously, which reads as a lean code — worth checking alongside P0442 if both appear together.

  • Honda Civic

    Civics rarely leak at the intake manifold, but the 1.5-liter turbo's charge-air piping and its clamps are a known weak point. A boost leak downstream of the MAF sensor produces a lean code that only appears under acceleration, which is why idle-only testing on these misses it.

Reading fuel trims to find the leak

Fuel trim is the computer telling you, in a percentage, how wrong its own airflow math is. Short-term trim is the live correction happening right now. Long-term trim is the learned average it has settled on. Both should sit within roughly ±10% on a healthy engine. P0171 sets when long-term trim pins at its maximum, which on most vehicles is about +25%.

What makes trims genuinely diagnostic is comparing them at two engine speeds. A vacuum leak is a hole of fixed size. At idle it might represent 20% of total airflow; at 2,500 rpm the same hole is a rounding error. So the trim number moves, and that movement names the fault.

At idleAt 2,500 rpmMost likely causeNext test
+20% or higherNear 0 to +5%Vacuum leakSmoke-test the intake
+15% or higher+15% or higherMAF under-reporting, or low fuel pressureClean the MAF, then check rail pressure
Near normalClimbs with loadFuel delivery — filter, pump or injectorsFuel pressure test under load
+15% on bank 1 only+15% on bank 1 onlyLocalised leak or injector issue on that bankSmoke-test that side, compare injector flow
Below −10%Below −10%Running rich, not lean — different code familyCheck for leaking injectors and high fuel pressure
What bank 1 long-term fuel trim patterns point at

What a lean condition actually damages

Lean is not simply less fuel used. Air-fuel ratio controls combustion temperature, and the peak occurs slightly lean of the ideal 14.7:1 ratio the computer targets. Running lean pushes cylinder temperatures up, and everything that fails from P0171 fails from heat.

  • Exhaust valves run hottest of anything in the combustion chamber and are the first mechanical casualty. A burnt valve turns a $150 repair into a cylinder head job.
  • Detonation — fuel igniting from heat and pressure rather than from the spark — hammers piston crowns and ring lands. The knock sensor retards timing to protect the engine, which is why a lean car often feels gutless.
  • The catalytic converter sees higher inlet temperatures and, if the lean condition tips into misfire, unburned fuel as well. That combination is what actually kills converters.
  • Spark plugs show it first: a white, blistered or eroded electrode is the visual signature of chronic lean running and a useful confirmation when you pull them.

Frequently asked questions

Is it safe to drive with a P0171?
For a week or two while you get it diagnosed, generally yes — most cars run acceptably. The risk is cumulative rather than sudden: months of lean running raise combustion temperatures enough to burn valves and degrade the catalytic converter. If the car has also started misfiring or the light is flashing, stop treating it as low priority.
Will P0171 fail my emissions inspection?
Yes. It is an emissions-related code, so in any OBD-II testing state the stored code and illuminated light fail the test on their own. A lean-running engine will often also fail on tailpipe measurements in the states that still take them, because of elevated oxides of nitrogen.
Is P0171 always a vacuum leak?
No, but it is the single most likely cause and the cheapest to check, which is why it belongs first. A dirty mass airflow sensor, a failed PCV valve, weak fuel pressure and even an exhaust leak ahead of the oxygen sensor all produce the same code. Fuel trim readings at two engine speeds tell you which family you are in before you spend anything.
What is the difference between P0171 and P0174?
They are the same fault on different cylinder banks — P0171 is bank 1, P0174 is bank 2. A four-cylinder only has one bank, so it can only set P0171. On a V6 or V8, both codes together point at something shared such as the MAF sensor, the PCV system or fuel pressure. One code alone points at a leak localised to that side.
Will cleaning the mass airflow sensor fix it?
Sometimes, and it costs about $12 to find out, so it is a reasonable early step. Use MAF-specific cleaner — brake or carburetor cleaner will destroy the sensing element. If the fuel trims do not improve within a drive cycle after cleaning, the sensor was not the problem and you should move to a smoke test.

Looking for a code that is not here yet? Browse the full code library.