Air & Fuel Mixture ControlOBD2 Codes

P0171 – Meaning, Causes, Symptoms, & Fixes

P0171 system too lean bank 1

What Does Code P0171 Mean?

  • P0171 definition: Bank 1 has too much air or not enough fuel
  • Issue Severity: MODERATE– Extended driving with this code can cause internal engine damage.
  • Repair Urgency:  Get this code fixed as soon as possible to avoid damage to spark plugs, pistons, and catalytic converters. 
  • Diagnosis: It is important to complete the entire diagnostic process when diagnosing P0171. Many people will replace the air-fuel sensor or oxygen sensor as soon as they get a bad reading, but the root cause can also be a dirty or faulty mass airflow sensor or vacuum leak, thus causing the O2 or MAF sensor to read differently to compensate.

Find a Certified Shop

We've partnered with RepairPal to recommend trustworthy shops in your area. Enter your details to see certified shops near you that offer upfront estimates, guaranteed fair pricing, and a minimum 12-month, 12,000-mile warranty.

Combustion engines run most efficiently when they maintain an air-fuel mixture ratio of 14.7 parts air to 1 part fuel. Too much fuel and/or too little air results in the engine running rich setting a P0172 trouble code, while too little fuel and/or too much air results in the engine running lean resulting in a check engine light for the P0171 code. 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, the P0171 code is triggered.

P0171 Causes

  • Faulty or dirty 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

P0171 Symptoms

  • Check Engine Light is on or flashing
  • Lack of power from the engine
  • Rough idle
  • Engine “coughing” or misfiring
  • Tip of spark plugs are white
  • Commonly associated with error codes: P0174

How Do I Fix Code P0171?

With a P0171 code, the first step is to get it properly diagnosed to figure out what is causing the engine to run lean. Using the live data function of the FIXD sensor and app allows you to read and analyze fuel trims to properly diagnose a P0171 code.

If your engine is running lean and you’re not comfortable diagnosing this issue at home, we recommend finding a RepairPal-certified shop to pinpoint the problem and give an accurate estimate for repairs. 

These shops can not only help you figure out what’s going wrong before you waste time and money on the wrong parts, but they also offer a minimum 12-month, 12,000-mile warranty and stand behind all their estimates with guaranteed fair pricing.

> Find a RepairPal Certified Shop Near You

How Much Does It Cost to Fix Code P0171?

If you take your car to a shop for diagnosis, most shops will start with an hour of “diag time” (the time spent in labor diagnosing your specific issue). Depending on the shop’s labor rate, this typically costs somewhere between $75-$150. Many, if not most, shops will apply this diagnosis fee to any required repairs if you have them perform the repairs for you. From there, a shop will be able to give you an accurate estimate for repairs to fix your P0171 code.

Right shop, right price

We've partnered with RepairPal to recommend certified and trustworthy shops in your local area. 

  • Upfront cost estimates
  • Minimum 12-month, 12,000-mile warranty
  • Fair price guarantee

Possible Repair Costs for P0171

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

DIY Steps to Diagnose Code P0171

If you’d like to try to fix code P0171 at home without throwing money at parts, you’ll want to follow the steps below for proper diagnosis. Keep in mind this is an intermediate-level diagnosis and repair and not recommended for beginners. Diagnosis requires more specialized equipment beyond what the FIXD Sensor can provide and it can be a time and labor-intensive process for inexperienced DIYers.

DIY difficulty level: Intermediate

This repair requires mechanical knowledge and is not recommended for beginners.

Tools/parts needed (our top picks from Amazon):


Use FIXD to scan your vehicle to verify P0171 is the only code present. If other codes are present, they must be addressed first.


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.


Remove the mass airflow sensor and clean the sensor using mass air flow cleaner or contact cleaner.

> How to clean your MAF sensor


Check the exhaust system components for leaks before the Air Fuel Ratio Sensors or Oxygen sensors; if you find any leaks have them repaired. Exhaust leaks can usually be spotted visually by a buildup of soot in the general vicinity of the leak.


Low fuel pressure can throw off the air-fuel mixture ratio, and this could be caused by anything from the fuel injectors and fuel pressure regulator to the fuel pump.

> How to check fuel pressure

  • Check fuel injectors: Make sure the fuel injectors are functioning properly and activating. Random misfires can be a sign of faulty or clogged fuel injectors that need to be replaced. Also, check that the fuel injector wiring is not damaged and is connected properly.

> How to check fuel injectors by ear

> How to check fuel injectors with a digital multimeter


At this point if the code still persists you may want to consider replacing your A/F sensor or O2 sensors.


After you repair the cause of your P0171 code, inspect the spark plugs. If there is a white haze or crust on the tip of the spark plugs (near the diode that screws into the engine), then you should replace all of the spark plugs.

Common P0171 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.

Still Need Help Fixing Code P0171?

If you’ve followed the steps above and are still experiencing a lean engine condition and code P0171, please contact the FIXD Mechanic Hotline if you’re a FIXD Premium subscriber or find a RepairPal certified shop near you to get the right repairs at a fair price.


Lifelong automotive enthusiast with a soft spot for offroading. Wrencher turned writer, but I still love to tinker on just about anything with an engine. Dream car: tie between a ‘71 Hemi ‘Cuda and a ’91 GMC Syclone. #GirlDad #SaveTheManuals

Jeffrey N. Ross
Lifelong automotive enthusiast with a soft spot for offroading. Wrencher turned writer, but I still love to tinker on just about anything with an engine. Dream car: tie between a ‘71 Hemi ‘Cuda and a '91 GMC Syclone. #GirlDad #SaveTheManuals

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!

          1. Thats not your MAF sensor thats your EGR valve, the UFO looking thing with the vacuum hose coming out the top. The MAF sensor is always in the intake hose somewhere between the throttle body and the air filter box. In the Rangers/Mazda B series trucks it is right outside the air filter box at the front of the truck by the radiator. It is roughly the shape of a square on top and has two security drive bolts holding it in place.

      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.