Go-Parts
Cart 0
Your cart is empty
Add an item to see it appear here.
Wrenchy
Go-Parts Garage
Expert guides for diagnosing, troubleshooting, and replacing auto parts Expert guides for diagnosing and replacing auto parts
Browse All →
🎬 Helpful Videos 🛍️ Shop This Part

P0171 on 2018-2023 Ford F-150: Causes and Fixes for System Too Lean (Bank 1)

Code P0171 on a 2018-2023 Ford F-150 most often means there's a vacuum leak, a dirty MAF sensor, or a software issue. Check for Ford TSBs first, as a simple PCM reflash may be the fix, especially on 3.3L and 5.0L engines per TSBs 23-2195 and 21-2443. Otherwise, inspect for cracked vacuum hoses (especially PCV lines) and clean the MAF sensor before replacing parts like O2 sensors.

19 minutes to read 2018-2023 Ford F-150
Most Likely Cause
Powertrain Control Module (PCM) Software
Difficulty
2/5
Est. Time
1.8 hrs
DIY Doable?
✅ Yes
Shop Labor
$100 – $650
Parts Price
$10 – $250
⚠️ Drivable, but... — You can drive, but it's not recommended for long. A lean condition can cause rough idling, poor acceleration, and reduced fuel economy. If ignored, it can lead to engine misfires, hesitation, and potential long-term damage to the catalytic converter from overheating.
Key Takeaways
  • Always check for applicable TSBs first for your 2018-2023 F-150; a simple software update at a dealership could be the entire fix.
  • The most common physical causes are unmetered air leaks from cracked vacuum hoses (especially PCV lines) or a dirty MAF sensor.
  • Do not replace the O2 sensor as a first step. It is usually correctly reporting a lean condition caused by another component.
  • If both P0171 (Bank 1) and P0174 (Bank 2) are present, the cause is almost certainly something that affects the whole engine, like the MAF sensor, a large vacuum leak, or a fuel delivery problem.
  • A DIY-friendly first step is to buy a can of MAF sensor cleaner and carefully clean the sensor, as this is a low-cost, high-impact potential fix.
The trouble code P0171 stands for "System Too Lean (Bank 1)". This means the Powertrain Control Module (PCM), your truck's main computer, has detected too much air and not enough fuel in the air-fuel mixture for the cylinders on Bank 1. Bank 1 is the side of the engine that contains cylinder #1, which is the passenger side on the F-150's V6 and V8 engines. The PCM tries to compensate by adding more fuel (a process called 'fuel trim'), but when it has to add more than 25% above the normal amount, it triggers the Check Engine Light with this code.

What's Unique About the 2018-2023 Ford F-150

Engine bay of a 2018-2023 Ford F-150, where P0171 is often caused by software rather than hardware.
Unlike older generations, a P0171 on the 2018-2023 F-150 is frequently a software issue requiring a PCM update rather than a physical vacuum leak.

For the 2018-2023 F-150, a P0171 code is frequently caused by a software issue, not a physical part failure. Ford has issued multiple Technical Service Bulletins (TSBs) for various engines in this year range. Specifically, TSB 23-2195 addresses P0171 on 2021-2023 3.3L engines, and TSB 21-2443 covers lean/rich codes on 2019-2020 5.0L flex-fuel engines, with the official fix being a PCM reprogram. Another TSB (SSM 49050) notes that on 5.0L engines, incorrect flex-fuel learning from refueling habits can also trigger these codes. This is a crucial first check that can save significant time and money compared to hunting for a non-existent vacuum leak. Beyond software, these trucks can still suffer from traditional causes like vacuum leaks from brittle PCV hoses or faulty intake manifold gaskets, which are common across many Ford trucks.

Diagnostic Flowchart

A cracked PCV hose assembly causing a vacuum leak.
If your F-150 doesn't fall under the PCM software TSBs, inspecting the PCV hoses and the plastic intake manifold for cracks is the next critical step.

Tap your situation to follow the diagnostic path that matches what you're seeing on this vehicle.

Which engine does your 2018-2023 Ford F-150 currently have?
→ Check with a dealer for TSB 23-2195 or 25-2342. A PCM software update ($100-$250, often covered by emissions warranty) is the most likely fix for this specific engine.
Do you use flex-fuel, or hear hissing from the engine?
→ Check SSM 49050 or TSB 21-2443. Adding small amounts of fuel causes flex-fuel learning errors requiring a PCM reflash ($100-$250).
→ Inspect the plastic intake manifold and IMRC linkage. The 5.0L is prone to cracks here, often requiring full manifold replacement.
→ Perform a smoke test to find hidden vacuum leaks, or clean the MAF sensor with dedicated spray ($10-$20).
Have you inspected the PCV hoses and Mass Airflow sensor?
→ Replace the leaking PCV valve hose assembly ($20-$90 for Motorcraft or Dorman) to resolve the unmetered air leak.
→ Clean the MAF sensor. If unresolved, test the canister purge valve ($30-$80) to see if it is stuck open.

Generation note: This range covers two F-150 generations: the 13th (2018-2020) and the 14th (2021-2023). While many causes are similar, specific TSBs for PCM software updates are often year and engine-specific. For example, TSB 21-2443 applies to 2019-2020 5.0L engines, while TSB 23-2195 (superseded by TSB 25-2342) applies to 2021-2023 3.3L engines. A major change for the 14th generation (2021+) 5.0L V8 was the introduction of Variable Displacement Engine (VDE) technology, a cylinder deactivation system.

Symptoms You May Notice

Comparison of a clean, properly functioning Mass Airflow (MAF) sensor versus a dirty, contaminated MAF sensor.
A dirty MAF sensor can under-report incoming air, leading to a lean condition and symptoms like hesitation or a rough idle. Cleaning it is a cheap and easy first step.
  • Check Engine Light is on
  • Rough or unstable idle, especially when warm
  • Hesitation or stumbling during acceleration
  • Reduced fuel economy
  • Engine misfires or a 'coughing' sound
  • Loss of power
  • Hissing sound from the engine bay indicating a vacuum leak
  • Difficulty starting the engine
⚠️ Don't Waste Money on the Wrong Fix
  • Replacing the upstream oxygen (O2) sensor. The O2 sensor is often doing its job correctly by reporting the lean condition. The code means the sensor is *detecting* a problem, not that the sensor *is* the problem. 🎬 Watch: A breakdown of common causes and fixes for P0171. Always diagnose vacuum, MAF, and fuel delivery issues first.

Most Likely Causes

Ford diagnostic software screen showing a Powertrain Control Module (PCM) reprogramming in progress.
Multiple TSBs for the 2018-2023 F-150 point to PCM software calibrations incorrectly triggering a P0171 code. A dealer reflash is often the official fix.
  1. Powertrain Control Module (PCM) Software 🔴 High Probability Ford has issued multiple TSBs indicating that the PCM software calibration can incorrectly trigger a P0171 code. TSB 23-2195 (and its successor TSB 25-2342) targets the 2021-2023 3.3L engine. TSB 21-2443 addresses lean/rich codes on the 2019-2020 5.0L flex-fuel engine due to software parameters. Another bulletin, SSM 49050, points to incorrect flex-fuel learning on the 5.0L.
    How to confirm: Check with a Ford dealership or a qualified shop with access to Ford's service database (OASIS) to see if your vehicle's VIN has an open TSB for a PCM reflash related to P0171.
    Typical fix: Reprogramming the PCM with the latest software version using a Ford-specific diagnostic tool (IDS or FDRS). This is often covered under the vehicle's emissions warranty.
    Est. part cost: $0
  2. Vacuum Leak 🔴 High Probability Plastic and rubber components in the engine bay become brittle over time with heat cycles. Common leak points include the PCV valve hoses and elbow fittings, intake manifold gaskets, and the air intake boot after the MAF sensor. These leaks introduce unmetered air into the engine, which the PCM can't account for.
    How to confirm: Perform a visual inspection of all vacuum lines and intake hoses for cracks or disconnections. A professional method is to use a smoke machine to feed smoke into the intake system and watch for where it escapes. A DIY method involves spraying short bursts of brake cleaner or starter fluid around suspected leak areas while the engine is idling; a change in engine RPM indicates a leak. 🎬 See this quick trick to confirm if you have a vacuum leak.
    Typical fix: Replace the cracked hose, leaking gasket, or faulty valve. The PCV hose assembly is a very common point of failure.
    Est. part cost: $20-$150
  3. Dirty or Faulty Mass Airflow (MAF) Sensor 🟡 Medium Probability The MAF sensor wire can get contaminated with dirt, dust, or oil, causing it to under-report the amount of air entering the engine. The PCM then injects too little fuel based on this faulty data, creating a lean condition.
    How to confirm: Remove the sensor and visually inspect the small wires inside. If they appear dirty, cleaning may resolve the issue. A scan tool can monitor MAF readings (g/s) to see if they are erratic or out of specification at different RPMs.
    Typical fix: Clean the sensor using only dedicated MAF sensor cleaner spray. Do not touch the delicate wires. If cleaning doesn't work, the sensor must be replaced.
    Est. part cost: $10-$20 (cleaner), $75-$200 (new sensor)
  4. Failing Canister Purge Valve 🟡 Medium Probability The EVAP purge valve (or solenoid) can fail by sticking open, creating a constant vacuum leak as it pulls fuel vapors from the charcoal canister into the intake manifold at the wrong time.
    How to confirm: A purge valve stuck open acts as a vacuum leak. You can test it by applying vacuum to the intake port with a hand-held vacuum pump; it should hold vacuum when not energized. You can also disconnect it and temporarily plug the vacuum line to see if fuel trims improve on a scan tool.
    Typical fix: Replace the canister purge valve. The Motorcraft part number varies by engine; for example, some 3.5L engines use CX-2400. 🎬 Watch: How to replace the canister purge valve on a 5.0L.
    Est. part cost: $30-$80

Rare But Worth Checking

  • Weak Fuel Pump or Clogged Fuel Filter: If the engine is starved for fuel due to low pressure, it will run lean. This is less common than vacuum leaks but should be checked if other causes are ruled out. Often accompanied by P0174 (Bank 2 Lean) as well. Check fuel pressure with a gauge to confirm.
  • Leaking Intake Manifold or Gaskets: On the 5.0L V8, the plastic intake manifold itself can crack or the gaskets can fail, causing a significant vacuum leak. This can sometimes be accompanied by issues with the Intake Manifold Runner Control (IMRC) linkage, which may require replacing the entire manifold assembly.
  • Exhaust Leak: A leak in the exhaust manifold or pipe before the upstream O2 sensor can pull in outside air, making the sensor read a false lean condition. This is more common on older or high-mileage vehicles.

Diagnosis Steps

  1. Check for Technical Service Bulletins (TSBs) for your specific year and engine. A PCM reflash may be the required fix, especially for 3.3L and 5.0L engines.
  2. Use a scan tool to check Long Term Fuel Trim (LTFT) and Short Term Fuel Trim (STFT) values at idle. A combined value (LTFT + STFT) consistently above +25% confirms the lean condition and triggers the code. High positive numbers at idle that decrease with RPM often indicate a vacuum leak.
  3. Perform a thorough visual inspection of the engine bay. Look for any cracked, disconnected, or brittle vacuum hoses, especially the PCV lines and the air intake tube between the MAF sensor and the throttle body.
  4. If no obvious leaks are found, use a smoke machine to pressurize the intake system and pinpoint the source of any unmetered air.
  5. Remove and inspect the Mass Airflow (MAF) sensor. If dirty, clean it with dedicated MAF sensor cleaner and re-test.
  6. Test the canister purge valve to ensure it is not stuck open, creating a hidden vacuum leak.
  7. If no vacuum leaks are found and the MAF is clean, check fuel pressure to rule out a weak fuel pump or clogged filter.
  8. Inspect the intake manifold gaskets for signs of leaks, especially on 5.0L engines.
  9. As a last resort, inspect the upstream O2 sensor for lazy operation using a scan tool's live data graph, but do not replace it without ruling out all other causes.

Parts You'll Likely Need

  • PCV Valve Hose — These rubber/plastic hoses are a frequent source of vacuum leaks as they become brittle from engine heat and crack, especially at the elbow fittings.
    Trusted brands: Motorcraft, Dorman
    OEM price range: $40-$90
    Aftermarket price range: $20-$50
  • Mass Airflow (MAF) Sensor Cleaner — Often, the MAF sensor is just dirty and cleaning it is a cheap and effective first step before replacement.
    Trusted brands: CRC, WD-40 Specialist
    Aftermarket price range: $10-$20
  • Canister Purge Valve (OEM #Motorcraft CX-2627 (example, verify by VIN)) — A common failure item that can get stuck open, creating a hidden vacuum leak.
    Trusted brands: Motorcraft, Bosch
    OEM price range: $50-$80
    Aftermarket price range: $30-$60

Related Codes That Often Appear With This One

  • P0174 — System Too Lean (Bank 2). This code is the counterpart for the other engine bank. When both P0171 and P0174 are present, it strongly suggests a problem affecting the entire engine, such as a major vacuum leak (like an intake manifold gasket), a faulty MAF sensor, or low fuel pressure.
  • P0300-P0308 — Cylinder Misfire codes. A severe lean condition can prevent proper combustion, leading to misfires on one or more cylinders.

Technical Service Bulletins (TSBs) & Recalls

  • TSB 25-2342: For 2023 3.3L engines, notes P0171 may be due to PCM software level.
  • TSB 23-2195: For 2021-2023 3.3L engines, states P0171 may be due to PCM software and requires a reprogram.
  • TSB 22-2393: For 2021 5.0L engines, lists P0171 as one of many DTCs that may be stored.
  • TSB 21-2443: For 2020 5.0L flex fuel engines, states P0171 may be due to PCM software parameters.
  • TSB 20-2324: For 2018 models, lists P0171 as one of many DTCs that may be stored due to PCM software.

Platform-Specific Known Issues

  • Intake Manifold and IMRC Issues: The plastic intake manifold on the 5.0L engine is a known potential failure point. It can develop cracks, and the intake manifold gaskets can leak. Furthermore, the Intake Manifold Runner Control (IMRC) linkage, which is integrated into the manifold, can break. A broken IMRC actuator or linkage often requires the replacement of the entire intake manifold assembly to resolve the associated vacuum leak and performance issues.
  • Flex Fuel Learning Errors: According to Ford's Service Bulletin SSM 49050, incorrect flex fuel learning can trigger P0171/P0174 codes. This can be caused by refueling habits, such as adding only small amounts of gasoline, which can confuse the PCM's alcohol content estimation. A PCM reset or reflash may be required to correct the learned values.
  • PCM Software Calibration: As per TSB 23-2195 and its successor, 2021-2023 F-150s with the 3.3L engine are prone to an erroneous P0171 code due to the PCM's software calibration. The official and often only fix is a software update performed by a dealer.

Mechanic-Grade Diagnostic Values

  • Long Term Fuel Trim (LTFT) + Short Term Fuel Trim (STFT) — expected: Near 0% at idle and 2500 RPM. Total correction should not exceed +/- 25%.. Failure: A sustained positive value of +25% or more will trigger the P0171 code. If trims are high at idle but improve at 2500 RPM, a vacuum leak is likely. If trims worsen at 2500 RPM, a fuel delivery or MAF issue is more probable.
  • Mass Airflow (MAF) Sensor Reading — expected: Approximately 4-5 grams/second (g/s) at idle for a 5.0L V8, increasing proportionally with RPM (e.g., ~13 g/s at 2500 RPM).. Failure: Readings that are significantly lower than expected for a given RPM, or readings that are erratic. A dirty sensor often under-reports airflow, causing the PCM to command less fuel, leading to a lean condition.
  • Fuel Pressure (Low-Pressure System) — expected: For 5.0L engines, typically 35-45 PSI at the fuel rail with key-on, engine-off. With the engine idling, pressure should be around 32-39 PSI. Some Coyote engines may run higher, around 55 PSI.. Failure: Pressure that is significantly below the expected range (e.g., under 30 PSI) indicates a weak fuel pump, clogged filter, or failing regulator.
  • Upstream Oxygen Sensor (O2) Voltage — expected: Rapidly fluctuating between approximately 0.1V (lean) and 0.9V (rich) once the engine is in closed loop.. Failure: A sensor that is stuck low (e.g., < 0.2V) is reporting a lean condition. This does not mean the sensor is bad; it is likely doing its job. A 'lazy' sensor that switches slowly or not at all may be faulty, but this should be the last item to check after ruling out all other causes.

Hidden / Shadow Codes Worth Checking

  • P2BEC, P2BED, P2BEE, P2BEF: These are Ford-specific codes related to fuel trim imbalance between cylinders. They often appear alongside P0171/P0174 and can indicate a more specific issue like a single faulty injector or a localized vacuum leak that a generic P0171 code doesn't capture. They are mentioned in TSB 20-2324. (see via Ford-specific scanners like IDS/FDRS or advanced aftermarket tools like FORScan.)

Scan Tool Commands That Help

  • FORScan / Ford IDS: Reset All Adaptations / Clear Transmission Adaptive Tables / Reset KAM — After performing a repair like replacing a MAF sensor, fixing a vacuum leak, or cleaning injectors. This command forces the PCM to relearn fuel trims from a clean slate, which can resolve persistent high fuel trim readings that were learned due to the previous fault.
  • Ford IDS / Advanced Scan Tools: Power Balance Test — When a lean condition is suspected to be caused by a single weak or clogged fuel injector. This test individually disables cylinders and measures the RPM drop. A cylinder with a clogged injector will show a smaller RPM drop than healthy cylinders, helping to pinpoint the specific problem cylinder.

Wiring & Ground Locations

  • PCM Grounds — On many F-150s, the primary PCM grounds are located on the firewall in the engine bay, often near the brake booster or on the passenger side.. A poor ground connection for the PCM can cause erratic sensor readings and incorrect calculations. While not a common cause for P0171, if all other diagnostics fail, checking the integrity of the PCM grounds (clean, tight, no corrosion) is a valid final step.
  • Main Battery Ground — Typically located on the chassis frame rail in the engine bay, just forward of the windshield washer fluid reservoir.. The main chassis ground is the return path for all electrical components. A corroded or loose main ground can create system-wide voltage issues, potentially affecting sensor readings and fuel pump performance, leading to a variety of codes including P0171.
  • PCM Connector C175B — This is one of the main multi-pin connectors plugging into the Powertrain Control Module (PCM).. This connector carries signals for critical sensors like the MAF and O2 sensors. Pinpoint testing for voltage, resistance, or continuity at this connector is necessary for diagnosing a suspected wiring issue between a sensor and the PCM. For example, pins for the MAF sensor signal and O2 sensor heaters are located here.

Real Owner Repair Stories

  • f150forum.com user (2018 F-150 5.0L) — P0171, P0174, P2005, P2007 codes. Rough idle, stalling, and poor performance.
    ❌ Tried (didn't work) Replacing MAF sensor, Replacing O2 sensors, Smoke testing (no leaks found)
    ✅ What actually fixed it The Intake Manifold Runner Control (IMRC) actuator linkage was broken on both banks. The plastic linkage is a known failure point. The entire intake manifold had to be replaced as the IMRC assembly is integrated into it. This fixed all lean and IMRC-specific codes.
  • Ford F150 Forum user (2012 F-150 (similar issue applies to 2018+)) — Recurring P0171 code, pinging under acceleration.
    ❌ Tried (didn't work) Cleaning MAF sensor, Replacing air filter, Replacing spark plugs and wires, Seafoam treatment, Checking vacuum lines with a hand pump
    ✅ What actually fixed it A leaking brake booster. The internal diaphragm had a tear, creating a vacuum leak that was most prominent when the brakes were applied. Pressing the brake pedal caused the O2 sensor voltage to drop to 0 and short-term fuel trims to max out at +25%, confirming the leak was related to the booster. Replacing the brake booster resolved the lean code and pinging.

"I Checked Everything" — The Actual Cause

  • A common scenario where a smoke test comes back clean is a failing canister purge valve that is stuck open. It acts as a controlled vacuum leak by design, so a smoke test may not reveal it as a fault. The valve must be commanded closed with a scan tool or disconnected and plugged to see if fuel trims improve.
  • Another case is a failing brake booster. The internal diaphragm can leak vacuum into the intake manifold, but this leak may only be present or significant when the brake pedal is depressed. A standard smoke test with the engine off and brakes not applied will not find this leak.
  • On 5.0L engines, a broken Intake Manifold Runner Control (IMRC) actuator or linkage can cause a lean condition that a smoke test won't detect. The broken plastic parts can allow the runner flaps to sit in a position that disrupts airflow, leading to lean codes without an external vacuum leak.

Model Year Variations Within This Range

  • 2021-2023: The 5.0L V8 engine in the 14th generation (2021+) F-150 introduced Variable Displacement Engine (VDE) technology, a form of cylinder deactivation. This adds complexity to the valvetrain and engine management system. While not directly linked as a common cause for P0171 yet, issues with this system could potentially lead to unusual combustion events or sensor readings.
  • 2021-2023: The 5.0L V8 in the 14th generation also switched to a belt-driven oil pump, from a chain-driven one in previous years, and has a slightly smaller oil capacity. This is a mechanical change that alters engine architecture but is not a known direct cause of P0171.
  • 2018-2020 vs 2021-2023: As noted in the TSBs, software-related causes for P0171 are highly specific to engine and model year ranges. TSB 21-2443 applies to 2019-2020 5.0L engines, while TSB 23-2195 and TSB 25-2342 apply to 2021-2023 3.3L engines, highlighting the software differences between generations and even within them.
Ford F150 P0171 P0174 Lean Condition Diag and Repair | How to Diagnose Lean Condition
Ford F150 P0171 P0174 Lean Condition Diag and Repair | How to Diagnose Lean Condition
Canister Purge Valve Replacement 2018-2022 F150 5.0L
Canister Purge Valve Replacement 2018-2022 F150 5.0L
How To Quickly Determine If Your Vehicle Has A Vacuum Leak!
How To Quickly Determine If Your Vehicle Has A Vacuum Leak!
Causes and Fixes Ford P0171 Code: System Too Lean (Bank 1)
Causes and Fixes Ford P0171 Code: System Too Lean (Bank 1)
Wrenchy
Article researched & written by
Go-Parts' AI research assistant. Every article is backed by live web research, verified OEM data, and real technician knowledge — so you get accurate, up-to-date information you can trust.
Meet Wrenchy → Updated Jul 21, 2026

The information in this article is provided for general reference and educational purposes only. Vehicle specifications, procedures, and part compatibility can vary by production date, trim level, and region. Always consult your vehicle's factory service manual and verify part numbers before purchasing or performing repairs. Safety-critical components such as airbags, seat belts, and braking systems should be installed by a qualified professional.

Year Coverage
This article covers the OBD-II Code P0171 for:
  • Ford F-150: 201820192020202120222023
In this article
🎬 Helpful Videos
Jump to ▴

Email This Guide

We'll send you a link to this article so you can read it later or share it.

Added to cart · Part