P0171 Means Too Lean on Bank 1. Fixes Cost $40 to $1,140
Author Source EEAT Authors · Matthew's Author Page
Prices updated October 2026

A new PCV valve can fix a P0171 for $40 to $300. A new fuel pump can fix the same code for $290 to $870. A bad one of either sets the exact same code, and a code reader can't tell you which one your car needs.
I'm Anthony, lead technician at Supercanic, the shop in San Jacinto and Hemet that runs MechanicRank, where we list 48,054 shops and mechanics. The usual cause is cheap, often a leak that lets extra air in. The trick is a test that sorts the cheap causes from the costly ones before anyone orders a part.
9 min read · 13 sections
Snapshot
- P0171 means the computer is adding a lot of extra fuel on bank 1 and has hit its limit. It does not name a part.
- The usual fixes run $40 for a PCV valve up to $1,140 for an intake gasket, parts and labor, on a midsize car at national shop rates.
- Vacuum leaks are the classic cause. A dirty or failing airflow sensor, weak fuel delivery and exhaust leaks come next.
- Our 254 paid diagnostic visits had a median of $150. Shops that post a price online post a median of $100.
- P0171 plus P0174 points at something both sides of the engine share. P0171 alone on a V6 or V8 points at bank 1.
- Clearing the code wipes the clues. On most cars it comes back on the second drive if the problem is still there.
What P0171 Means
Your engine wants a set mix of air and fuel. An oxygen sensor in the exhaust reports whether the mix is lean, with extra air, or rich, with extra fuel. The computer then adds or pulls fuel to fix it. That correction is called fuel trim.
P0171 sets when the computer has been adding so much fuel that it reaches its limit. Kelley Blue Book describes it as too much air and not enough fuel on bank 1. The limit is set by each carmaker. The 2003 Saab 9-5 service manual, for one, sets the code once its fuel adaptation passes 25%. Other makers use their own number.
Bank 1 is the side of the engine with cylinder number one. A four cylinder engine only has one bank, so P0171 is the only lean code it can set. A V6 or V8 has two banks, and bank 2 has its own code, P0174.
What Each Lean Code Fix Costs
These come from our own repair cost guides. Each one adds the part price to the book labor time at $95 to $140 an hour, for a midsize sedan or small SUV.
- PCV valve$40 to $300
- Fuel filter$55 to $210
- Upstream oxygen sensor$110 to $460
- Mass airflow sensor$120 to $430
- Exhaust leak ahead of the sensor$125 to $600
- Fuel pressure regulator$135 to $530
- Intake manifold gasket$230 to $1,140
- One fuel injector$245 to $1,020
- Fuel pump$290 to $870
MechanicRank repair cost guides as of October 2026, midsize car, national labor rate of $95 to $140 an hour, before sales tax. Not a quote for your car.
A cracked vacuum hose is missing from that chart because it's often the cheapest fix of all. It's a length of hose and a few minutes once a smoke test finds the crack. That's why the test matters more than any one part.
California shops charge more an hour. The table below uses the $120 to $175 an hour our guides use for the state, and pairs each fix with the clue that points to it.
| The Fix | What Points to It | Midsize Car, California |
|---|---|---|
| PCV valve or hose | Lean at idle, a whistle or hiss, trims drop as rpm rises | $50 to $350 |
| Intake manifold gasket | Smoke escapes at the gasket line, lean worst at idle | $280 to $1,350 |
| Mass airflow sensor | Lean at idle and at cruise, airflow reads low for the engine size | $125 to $460 |
| Upstream oxygen sensor | Lazy or stuck reading, and no air or fuel fault found | $120 to $510 |
| Exhaust leak ahead of the sensor | A tick at cold start, soot near a joint or the manifold | $150 to $690 |
| Fuel pump | Lean under load, low fuel pressure or volume on a gauge | $330 to $975 |
| Fuel filter | Pressure drops under load on a car with a serviceable filter | $65 to $245 |
| One fuel injector | Lean on one bank only, or a weak injector on a balance test | $270 to $1,125 |
MechanicRank repair cost guides as of October 2026, at a California labor rate of $120 to $175 an hour. Trucks, hybrids and European cars cost more.
The Two Minute Test That Sorts It
A good tech doesn't start with parts. They start by watching fuel trim on a scan tool, first at idle and then at a steady 2,500 rpm. Our free lesson on fuel trims walks through it.
A vacuum leak lets in a fixed amount of extra air. At idle that leak is a big share of all the air coming in, so trim reads high. At 2,500 rpm the same leak is a small share, and trim falls back toward zero. Trim that falls as rpm rises is the leak signature.
If trim stays high at cruise or climbs under load, the engine is short on fuel. That points at the pump, the filter or the injectors, and a fuel pressure gauge settles it. If trim is high everywhere, a lazy airflow sensor that under counts the air is a prime suspect.
The freeze frame helps too. It's the snapshot the computer saves when the code sets, with rpm, load and temperature. A P0171 that set at 2,600 rpm under heavy load is a fuel delivery clue, not a vacuum leak clue.

One Bank or Both
On a V6 or V8 the two codes tell you a lot before anyone opens the hood.
P0171 and P0174 together. Both sides are lean, so look for something both sides share. That's the airflow sensor, the fuel pump, the filter, the pressure regulator, or a leak in the intake that feeds both banks, like a PCV hose or a brake booster hose.
P0171 alone. Only bank 1 is lean. If bank 2 trims sit near zero, the shared fuel supply is fine. The cause lives on bank 1, like a leak at that side of the intake gasket, a weak injector on that bank, or an exhaust leak ahead of that bank's oxygen sensor.
KBB lists exhaust leaks among the causes for a reason. A crack ahead of the oxygen sensor can pull in outside air between pulses. The sensor sees the extra oxygen and reports lean, even when the engine's mix was fine.
What Our Own Jobs Show
Supercanic keeps a public study of what customers actually paid. It covers 953 paid jobs from August 2025 to October 2026, most of them at the customer's home or work. The full table is on our mobile mechanic prices page.
| Job Type | Paid Jobs | Median Paid | Middle Half |
|---|---|---|---|
| Diagnostic visit only | 254 | $150 | $125 to $175 |
| Fuel pump or injectors | 15 | $530 | $292 to $721 |
| All paid jobs | 953 | $218 | $150 to $478 |
Supercanic paid jobs, August 2025 to October 2026, before sales tax. Most were in Riverside and San Bernardino counties. Middle half is the 25th to 75th percentile.
One job in four was a diagnostic visit and nothing more. On a lean code, that visit is often the whole bill, since a found hose leak is a small add on. The fuel jobs tell the other side of the story. At a $530 median, a pump guessed wrong costs more than three diagnostics.
Shops that post a check engine diagnostic price on their own websites post a median of $100, with the middle half between $80 and $150. Our check engine light diagnostic guide has the detail. Ask whether the fee comes off the repair if you approve it.
Why the Light Comes Back
Clearing a P0171 and driving off feels like a fix. It isn't one, and the rules for the light explain why.
California's OBD II rule, 13 CCR 1968.2, has the car store a pending code the first drive it sees a fault. If the fault shows up again on the next drive, the light comes on and the code is confirmed. So a lean engine usually brings the light back within two drives. Once the fault is truly gone, the same rule turns the light off after three drives in a row without it.
Clearing codes also wipes the learned fuel trim and the freeze frame. Those are the two best clues a tech has. Let the shop read them before anyone presses clear.

Old Advice That Stuck
Swap the oxygen sensor. The sensor is what reports lean, so it gets blamed. A trim of plus 20% means the engine truly needs 20% more fuel than the computer planned. Replace the sensor and the air leak is still there. Test it first, and replace it when it reads lazy or stuck.
Clean the airflow sensor and call it fixed. Cleaning is cheap and sometimes works. Our airflow sensor guide calls it one of the most replaced parts that didn't need replacing. If trim drops at higher rpm, the sensor was never the problem.
Start with the fuel pump. A weak pump and a vacuum leak both push trim positive, but in opposite patterns. Two minutes on the scan tool beats dropping a tank on a hunch.
Can You Keep Driving It
KBB says you can drive with a P0171 but strongly recommends against it, since the engine may lack power or stall. Some cars also drop into a reduced power mode.
Our take is a little softer for a car that still runs smooth. A short drive to a shop is usually fine. What isn't fine is months of it. Our airflow sensor guide notes that running lean for a long time can cause misfires and overheat the catalytic converter. If the engine stumbles, stalls at stops or the light starts flashing, stop and ask for a mobile mechanic or a tow.
Before You Approve the Job
Run this list with whoever quotes you.
- What did the trims do? Ask for the idle and 2,500 rpm numbers and what they pointed to.
- Was it smoke tested? A smoke test shows a leak you can see. Ask where the smoke came out.
- Was fuel pressure checked? Before a pump or injector quote, ask for the gauge reading.
- Diagnostic credit. The FTC notes many shops charge for diagnostic time. Ask what it costs and how it's handled if you go elsewhere.
- Written estimate. The FTC says it should name the problem, the parts and the labor. Ask for the old parts back.
- California drivers. The Bureau of Automotive Repair says you must OK the work before it starts and again before any added repairs.
Find a Shop for the Job
MechanicRank lists 48,054 repair shops and mechanics in 6,649 cities. Every listing shows the shop's phone, reviews and hours, and the phone rings the shop direct. Search your ZIP code and ask for a lean code diagnosis with a smoke test before parts. If you also have a misfire code, our page on a flashing check engine light covers what to do while you wait.
At Supercanic, our own shop, labor is $150 an hour, with a 90 day or 5,000 mile labor warranty.
Like this? Add MechanicRank to your Google sources
Reading List
| What We Cited | Where It Came From |
|---|---|
| Too much air and not enough fuel on bank 1, causes including exhaust leaks, driving risk and stalling | Kelley Blue Book, P0171 code |
| A maker's own lean limit, adaptation above 25% | Saab 9-5 2003 service information, DTC P0171 |
| Pending code on the first drive, light on the second, light off after three clean drives | California Code of Regulations, Title 13, Section 1968.2, via Cornell LII |
| Diagnostic fees, what a written estimate should list, old parts | FTC, auto repair basics |
| Approval before work and before added repairs | California Bureau of Automotive Repair, maintenance and repairs |
| Idle versus cruise trim test, one bank versus both | Our fuel trims lesson |
| 254 diagnostic visits, 15 fuel jobs, 953 paid jobs | Supercanic paid jobs in our mobile mechanic prices study |
| Prices for each fix, nationally and in California, posted diagnostic fees | MechanicRank repair cost guides, linked above |
Owners Ask Us
How much does it cost to fix P0171?
Start with the diagnostic, which had a median of $150 across our 254 paid visits. A cracked hose is often a small add on after that. A PCV valve runs $40 to $300 and an airflow sensor $120 to $430 on a midsize car. A fuel pump runs $290 to $870, and an intake gasket can reach $1,140.
What is the most common cause of P0171?
A vacuum leak, meaning air that gets in after the airflow sensor and never gets counted. Cracked hoses, a leaking PCV hose and intake gaskets are the usual spots. A dirty airflow sensor and weak fuel delivery come next. A smoke test and a look at fuel trims sort them out.
How do you fix the code P0171?
Find the cause first, then fix that part. Read the freeze frame, watch fuel trims at idle and at 2,500 rpm, smoke test the intake and check fuel pressure. Repair what fails, clear the code, and confirm the trims settle near zero on a test drive.
Can I still drive my car with a P0171 code?
A short, gentle drive to a shop is usually fine if the engine runs smooth. KBB advises against driving it, since the car may lose power or stall. Don't put months on it. Long lean running can cause misfires and hurt the catalytic converter.
What is the difference between P0171 and P0174?
P0171 is bank 1, the side with cylinder one. P0174 is bank 2 on a V6 or V8. Both together point at something the two sides share, like the airflow sensor or fuel pressure. One alone points at a leak, injector or exhaust leak on that side.
Can a bad oxygen sensor cause P0171?
It can, but it's less common than people think. The sensor usually reports a real lean mix caused by an air leak or weak fuel supply. A shop should test the sensor's reading and rule out leaks before it replaces it. A new sensor with the leak still there brings the code right back.
Picked for You
Own a shop or a mobile operation?
Your free MechanicRank listing is one of the citations this article talks about. Claimed listings get an owner badge, a photo gallery, and a green star on the map.
Claim Your Free Listing →