Air & Fuel Mixture ControlOBD2 Codes

P0171 – Meaning, Causes, Symptoms, & Fixes

Code P0171 Definition

Bank 1 has too much air or not enough fuel.

P0171 system too lean bank 1

What Does P0171 Mean?

Combustion engines run most efficiently when they maintain an air-fuel mixture ratio of 14.7 parts air to 1 part fuel. When there are more than 14.7 parts air to 1 part fuel in the air-fuel mixture, a lean condition exists and code P0171 is triggered. The lean condition can be caused by a vacuum leak, which introduces more air into the air-fuel mixture, or by a weak fuel system, which does not input enough fuel into the air-fuel mixture. To keep the engine running properly, the powertrain control module (PCM) tries to compensate for the lean condition by injecting more fuel to the mixture in an effort to maintain the proper 14.7:1 ratio. When these adjustments become too large, code P0171 is triggered.

What Are The Symptoms Of P0171?

  • Check Engine Light is on
  • Lack of power from the engine
  • Rough idle
  • Engine coughing
  • Engine misfiring

What Is The Cause Of P0171?

  • Dirty or faulty mass airflow sensor
  • Vacuum leaks – PCV hoses, vacuum hoses, intake manifold gasket.
  • Weak fuel pump
  • Clogged or dirty fuel injectors
  • Clogged fuel filter
  • Exhaust leak
  • Faulty oxygen sensor
  • Faulty air-fuel ratio sensor

How Serious Is Code P0171? – Moderate

It is okay to drive a vehicle with P0171 for a short period of time, but driving with this code for an extended period of time can overheat the engine and cause internal engine damage.

Code P0171 Common Diagnosis Mistakes

It is important to complete the entire diagnostic process when diagnosing P0171. Many people will replace the air-fuel sensor or O2 sensor as soon as they get a bad reading, but the root cause is often a dirty or faulty mass airflow sensor or vacuum leak, thus causing the O2 or A/F sensor to read differently to compensate. Reading and analyzing fuel trims and the freeze frame data is the key to properly diagnosing P0171.

Tools Needed To Diagnosis P0171

How To Diagnosis Code P0171

Difficulty of Diagnosis and Repair – 3 out of 5

  1. Use FIXD to scan your vehicle to verify P0171 is the only code present. If other codes are present, they must be addressed first.
  2. Inspect all vacuum lines and hoses for leaks, and make sure they are properly connected. If a leak is present, you will hear a hissing sound, though it may be difficult to hear with the engine running. If you suspect a vacuum leak but are having trouble finding it, check out this detailed guide to finding vacuum leaks.
  3. Reconnect any disconnected vacuum lines and replace any damaged vacuum lines that are leaking, then use FIXD to clear check engine light code P0171. If check engine light code P0171 is triggered again, check the rest of the vacuum lines for leaks and continue to the rest of the diagnostic process.
  4. Remove the mass airflow sensor and clean the sensor using mass air flow cleaner or contact cleaner.
  5. Reinstall the mass airflow sensor and clear the check engine light using FIXD. If the check engine light comes back on with code P0171 continue the diagnostic process.
  6. If you confirm there are no vacuum leaks, have a clean mass airflow sensor, and your fuel system is functioning properly, check the exhaust for leaks before the Air Fuel Ratio Sensors or Oxygen sensors if you find any leaks have them repaired.
  7. At this point if the code still persist you may want to consider replacing your A/F sensor or O2 sensors.

Estimated Cost of Repair

For error code P0171, one or more of the below repairs may be needed to solve the underlying issue. For each possible repair, the estimated cost of repair includes the cost of the relevant parts and the cost of labor required to make the repair. 

  • Vacuum leak $100-$200
  • Clean MAF $100
  • Replace MAF $300
  • Fuel Pump $1300-$1700
  • Fuel pressure regulator $200-$400
  • Exhaust repair $100-$200 (if welded to repair)
  • Air fuel sensor or oxygen sensor $200-$300

Ultimate Car Repair Report

The Savvy Motorist Report

Whether you’re planning to DIY repairs or go to a nearby mechanic, this free report contains valuable information for all drivers. Download The Savvy Motorist Report now to discover:

✅  6-step checklist to get the best price on repairs

✅  8 mechanic scams and how to avoid them

✅  How to instantly diagnose a check engine light on your smartphone

✅  And much more

You may also like


  1. I have a 08 ford escape v 6 when ever my gas tank goes down to empty on i full it up it wouldn’t start

    1. I have a 2001 Lincoln last v8 with P0171 I replace the plugs coil packs oxygen sensor check the intake manifold and tried to check for exhaust leak still have rough idle what to do

      1. Is there an idle air control on your car? If yes, this could be the problem. I have a Ford and a few slight hits with a wrench helped it start working. However it will likely need to be removed and either cleaned or replaced.

        1. I have replaced both one and two Banks on the oxygen sensors but the light came back on and it’s saying that that’s still the problem where do I go from here?

          1. Change mass air flow sensor
            For sure

        2. I think after putting in perfectly and cleaning Idle Air Control Valve and putting a new one in plus a Oxygen O2 #2 Sensor by Catalytic Converter.Run a lot better but I need to Clean or replace Air gas Mass control Sensor!Looks like a UFO by Idle Air Control Valve in Ford’s common or Mazda B series trucks 150 in Ford’s.Clean it out and pour some Fuel Cleaner in gas tank,so your fuel pump won’t die.In mine my battery is not very good! Dies when a bump moves cable and battery couple centimeters.Stereo tweakers did it!

      2. I have a code po 171 on my Subaru Legacy turbo 2004 2.0….how do I fix this code…The engine check light is still on.Thank you

    2. bad fuel pump

    3. Check the Evap purge solenoid on the engine. I’m most cases the diaphragm inside begins to leak. Simple test is to remove the solenoid and connect a vacuum pump to it. If it doesn’t build pressure then it needs replaced. Sometimes you need to active the solenoid to get a good reading. You can do this with a set of jumper wires and a 9v battery. I believe with Ford it is a normally closed solenoid and you shouldn’t need to do this.

    4. don’t let it go down to empty then..

    5. When you fill up. Will it start after about 10 minutes? If so, replace the canister purge valve. When the purge valve gets stuck in the open position and you put gas in your vehicle it causes gas to go through which you will then have to wait for said gas to evaporate.

    6. I’ve changed out wires,plugs(dbchked gap),EGR pcv valves,coil,MAS 2x,02 sensor(upstream)
      Tried finding vacum leaks with smoke machine,propane,ether.
      I’m lost, I put too much money in this truck to have some guy from dealer or shop hunt around n tell me same thing
      Can anybody help?

      1. That was a 2005 Ford Sport Trac (Explorer) 4WD
        4.0 SOHC eng

        1. If ur getting a cylinder misfire code check electrical could be a short in engine harness
          And maf sensor

        2. Intake manifold gasket!!

      2. Fuel injectors. check pump pressure, should be between 40 & 60psi at all times. Under load, at idle, part throttle. If ok replace fuel injectors

  2. I’ve cleaned the mass airflow sensor I’ve replaced the distributor cap all of the wires to the spark plugs I’ve replaced with the oxygen sensors both oxygen sensors I replace the crankshaft sensor I checked the vacuum lines I’ve replace the fuel pump I’ve replace the evaporative control system I’ve cleaned the fuel injectors I’ve replace the fuel cap and I still have a p0171. Any suggestions?

    1. Hi David,

      You might need to take it to a mechanic and check to see what the problem could be. There may be internal circuitry issues.

      1. Clear the code and trade it immediately. lol

    2. You might have a cracked exhaust manifold, with the engine off and cold, push air into the tail pipe with a shop vac, while spraying soapy water around and on the exhaust manifold.

    3. Intake manifold gaskets

    4. Did you fixed? What was the problem i have the same problem? Pleadr answer me

      1. Intake manifold gasket!!

    5. Just junk the car

    6. Have you tried replacing the fuel filter?

    7. did you check the upper and lower intake manifold gasket when cold my 2003 v6 f-150 only put the light on when the temps dropped below 45 my intake gasket was the problem when it warmed up it sealed itself

    8. The first rule should be to never replace a part that has not been tested and proven faulty. There is a chance to replace a good part with a bad new part. Now you have the original problem plus another that you will not believe is a new problem.

  3. I have 2007 Chrysler Sebring. 4 cyl 4 door sedan. Ive change my upstream sensor and now im getting better mpg but its still not like before. My car has been jumping when I turn the ignition on and im starying to think its my fuel injectors. What do you think?

    1. Hi Kevin,

      There are multiple causes to trouble code P0171. Please follow our diagnosis steps to make sure that you are checking all probable causes. Let us know what you find!

      The FIXD Team

  4. I had a check engine light and reduced accelerator response on my 2006 Cadillac Xlr-v a course le of weeks ago. Once I let it warm up for about 15 minutes the accelerator issue went away but the check engine light stayed on. I ordered the FIXD unit last Saturday and checked the car again (before I received the FIXD unit) and the ch Co engine was off and no throttle issues. This car sets s lot and is on s trickle charger. I received the fixed unit today and received a P0171 and a P2127 code but the check engine light was still off. Can these issues just go away?

  5. I have a 2000 GMC Sierra 5.3 that runs lean on bank 1 I’ve done everything I had a tapping lifter I even pulled the heads and and replace them new fuel injectors new oxygen sensors the valves look great went over all the vacuum lines many of times and I know it’s not the massive air flow sensor I’ve replaced twice it only doesn’t on bank one it would mess up the entire engine like a lot of other parts this truck just acts up at random I went over every ground attached to the frame motor I’ve been reading on a lot of issues over the past few years and never came up with anyting except for one not the guy online had to reset are tuna Bank one from a diagnostic tool which I’m not going to go out and buy a $400 tool to try it I had it in the shop 5 years ago and they couldn’t figure it out either they did a pressure check to make sure I didn’t have a antifreeze leak and a vacuum and a fuel pressure test but there’s not too many of these types of trucks on the roads anymore like that was a big issue with Chevy in that era

    1. Bryan I have a very similar thing with my 08 Avalanche. It will miss a couple seconds, then run fine for maybe 30 seconds, then miss again for no more than 2 seconds. After about ten times of this the check engine light will flash with the warning ding for about 5 seconds then it goes out and the engine will never miss again until you shut it off and restart it, even if you drive it hundreds of miles which I have done several times. When you shut it off and restart it, it goes through the same ritual again. This pattern tells me it’s not mechanical or it would miss all the time. Mechanics with their scanners can’t figure it out. I am going to replace the computer in hopes that will solve it.

      1. Short somewhere in your engine wire harness had same problem for 2 years hesitated real bad cell flashing misfire cylinder 6 ended up being short and maf sensor

    2. Hello I have get engine light up today when i drive my Audi a6 c6 2.0 petrol Tfsi 170Bhp, manual universal, s-line , 2007. I have code P0171 , i stoped car, make a reading with OBD2, and after i have started again come up sign low oil pressure, as well i have antifreeze leak, but no smoke ,no rattles, anyone knows whats the problem?

  6. Chevy dealer knew exactly what it was, bad fuel pump on ZR2 blazer 2004, charged me 1000. scammers

  7. My car was getting occasional P0171 errors. I’d clear the error and some time later would get an error hit. Never several errors, and not following any particular sequence to cause the error.
    Now back in May 2018 my car club had arranged to drive on Talladega. I drove maybe 20 laps speeds were 110 to 140 MPH. Whatever happened, I guess cleared up the fuel flow, I haven’t had the problem since. Bottom line, running the engine hard fixed this problem in just one case. And my Gosh it was fun!!!

    1. Sounds like you had dirty injectors. Running it harder than usual at an extended period could clear them.

  8. My check engine light came on and I was just about to purchase a diagnostic tester to see what was going on. I then saw your ad on the web and purchased one. Long story short it worked; it cleared my light. Thanks guys!

    1. No problem Kenneth! Glad we could help!

      FIXD Team

  9. I have 2003 Escalade esv that had p0171 and p0174, but the light automatically turned off after a few miles. It has turned on and off on its own twice, any ideas as to what might be the issue?

    1. get a new egr valve and gasket to fix the problem

    2. That intermittent light is likely the O2 sensors failing.

  10. I have a 2004 Cadillac Deville and I got code 171&174 help me to fix this problem

  11. I have had a FIXD unit for some time. Use it almost daily in the business of turning wrenches. Makes the job a lot easier.

  12. My 2013 nissan altima s just replace 02 sensors airflow sensor and still have code P0171 just got the car back from the dealer

  13. A loose gas cap can also cause this issue.

  14. I have an 08 Avalanche and here is what happens with it. It was misfiring consistently and we discovered a bad lifter. After replacing all the plugs, wires, lifters, and cam shaft and all the necessary things that go with that, I now get this code. But the strange thing is there is a pattern. When you first start the motor it runs fine except it will miss for maybe one second every 30 seconds or so. After maybe ten times misfiring, the check engine light will flash and the warning bell will ding for about 5 seconds, then everything goes out and the engine will run perfectly until you shut it off , even if you drive it 500 miles which I have done several times.. When you restart it it goes through the same pattern again… every time. I have a new computer ordered in hopes that will stop it.

  15. I have the Astra J .. doing the same ,,, am told to replace the O2 sensor bank 2 and trim sensor.. is it worth keeping this car?

  16. Where do you find the air intake censor on a 2001 Ford Ranger V6 Edge?

  17. ….problem started yrs ago on my E150 with 5.4., cleared codes,removed fuel cap, started engine. Try adding a little grease to the seal on cap, when it’s off.

  18. code p0171 skoda fabia 2005 1.2 40kw

  19. can the air glide on 2003 marauder be fixed it’s making loud noise over the front right tire

  20. Don’t allow your fuel to go down empty. Because it will start bringing out some dirty to block the nozzle

  21. Since it is part of the drivetrain system, could an error P0171 affect the rpm’s when the transmission shifts? Poor power starting off or climbing a hill and the transmission doesn’t shift until you drop back on the gas pedal.

  22. Hi all

    I have a 1998 Lincoln Navigator that is in mint condition. Last night she gave me a code P0171. I cleaned the Mass Air Sensor, but the code returned. The plugs and fuel filter have fewer than 3000 miles on them. The injectors have been cleaned and there are no vacuum leaks. She is running smooth as glass and even getting better milage since I cleaned the mass air sensor.
    Any other ideas?

    Be safe

Leave a reply

Your email address will not be published. Required fields are marked *