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 Articles →
🧭 Diagnostic Flowchart 🎬 Helpful Videos 🛍️ Shop This Part

P0171 on 2016-2021 Mazda CX-3: Causes for System Too Lean Code

For a 2016-2021 Mazda CX-3, code P0171 is most often caused by a vacuum leak from a failed intake manifold gasket (Part No. PE01-13-111) or a dirty MAF sensor. If those are ruled out, a Mazda technical service bulletin (MT-021/17) points to faulty fuel injectors as a known issue. A faulty EVAP purge valve is another confirmed cause. Expect to pay $150-$400 for a vacuum leak repair or MAF sensor, and potentially more for injector replacement.

20 minutes to read 2016-2021 Mazda CX-3
Most Likely Cause
Vacuum Leak (Intake Manifold Gasket)
Difficulty
3/5
Est. Time
2 hrs
DIY Doable?
✅ Yes
Shop Labor
$150 – $1500
Parts Price
$20 – $900
⚠️ Drivable, but... — It is not recommended to drive for an extended period. A persistent lean condition increases combustion temperatures, which can cause poor performance, hesitation, and potential damage to internal engine components, spark plugs, or the catalytic converter over time.
Key Takeaways
  • Code P0171 on your CX-3 means the engine is running with too much air or not enough fuel.
  • The most likely cause is a vacuum leak from failed intake manifold gaskets, a very common issue on this engine.
  • The second most likely cause is a dirty Mass Airflow (MAF) sensor; cleaning it is a good first step.
  • If leaks and sensors are not the problem, a Mazda service bulletin indicates that faulty fuel injectors are a known issue on this engine and may need to be replaced.
  • Do not ignore this code. A persistent lean condition can lead to more expensive damage to your engine or catalytic converter.
The trouble code P0171 stands for "System Too Lean (Bank 1)". This means the engine's computer, the Powertrain Control Module (PCM), has detected an air-fuel mixture with too much air and not enough fuel. The PCM tries to compensate by injecting more fuel, a process tracked by 'fuel trims'. When the long-term fuel trim correction exceeds a pre-programmed limit (typically around +20% to +25% for a sustained period), the Check Engine Light is triggered. For the inline-4 engine in your CX-3, Bank 1 is the only bank of cylinders.

What's Unique About the 2016-2021 Mazda CX-3

While most vehicles get a P0171 code from common issues like vacuum leaks or a dirty MAF sensor, Mazda has issued a Technical Service Bulletin (TSB MT-021/17, superseded by MT-004-22 for newer models) for SKYACTIV engines, including the one in the CX-3. This bulletin provides a specific diagnostic path that, after checking for intake leaks and sensor faults, points directly to replacing the fuel injectors as the solution. This suggests that failing fuel injectors are a more common and officially recognized cause on this platform than on many other vehicles.

Symptoms You May Notice

  • Check Engine Light is on
  • Rough or unstable idle, sometimes 'hunting' for RPM
  • Engine hesitation or stumbling on acceleration
  • Reduced engine power
  • Difficulty starting, may require long crank times
  • Hissing sound from the engine bay
  • Engine stalling at stops or idle
⚠️ Don't Waste Money on the Wrong Fix
  • Replacing the upstream oxygen (Air/Fuel) sensor. While a failing sensor can cause this code, it is far more common for the sensor to be correctly reporting a problem caused by a vacuum leak, dirty MAF, or fuel delivery issue. Rule out all other causes before replacing the A/F sensor.
  • 🎬 Watch: A breakdown of the most common P0171 causes.

Most Likely Causes

  1. Vacuum Leak (Intake Manifold Gasket) 🔴 High Probability The rubber intake manifold gaskets on the SKYACTIV-G engine are a very common failure point. Over time, they become hard, shrunken, and brittle, failing to seal properly and allowing unmetered air to enter the engine. This is a well-documented issue on forums for all vehicles with this engine.
    How to confirm: Perform a smoke test to see smoke escaping 🎬 Watch: How to find a vacuum leak with a smoke machine. from the gasket area. A DIY method is to carefully spray brake cleaner or unlit propane near the intake manifold gasket with the engine idling; a change in engine RPM indicates a leak.
    Typical fix: Replace the set of four intake manifold gaskets. The OEM part number is PE01-13-111. 🎬 See this walkthrough on how to replace the intake manifold.
    Est. part cost: $20-$50
  2. Dirty or Faulty Mass Airflow (MAF) Sensor 🔴 High Probability → Shop Fuel Injection Air Flow Meter The MAF sensor can become contaminated with dirt, oil, or debris, causing it to under-report the amount of air entering the engine. This leads the computer to command less fuel, creating a lean condition.
    How to confirm: Monitor the MAF reading on a scan tool; it should be around 2.0-2.5 g/s at idle for this 2.0L engine. Abnormally low readings are a key indicator. Visually inspect the sensor for contamination.
    Typical fix: First, try cleaning the sensor with a dedicated MAF sensor cleaner. If the code returns or readings are still incorrect, the sensor must be replaced.
    Est. part cost: $100-$250
  3. Faulty Fuel Injectors 🟡 Medium Probability → Shop Fuel Injector Mazda TSB MT-021/17 (and the superseding MT-004-22) specifically identifies replacing the fuel injectors as the final repair step for P0171 when other common causes are ruled out, indicating a known issue with injector performance or clogging.
    How to confirm: This is typically diagnosed after confirming there are no vacuum leaks and the MAF and O2 sensors are functioning correctly. A professional may perform a fuel injector balance test or simply follow the TSB diagnostic procedure.
    Typical fix: Replace all four fuel injectors as a set. The OEM part number is PE01-13-250D.
    Est. part cost: $600-$900

Rare But Worth Checking

  • Faulty EVAP Purge Solenoid Valve: → Shop Vapor Canister If the purge valve sticks open, it can create a vacuum leak by pulling fuel vapors into the intake manifold at the wrong time. This may also cause difficulty starting the car immediately after refueling. Multiple owners on Reddit have confirmed this as the fix for their P0171 issue after other diagnostics failed.
  • Weak Fuel Pump: → Shop Fuel Pump A failing fuel pump may not provide adequate pressure, leading to a lean condition. Some 2019 CX-3 models were part of a recall (5321K / NHTSA 21V-875) for faulty low-pressure fuel pumps that could crack and fail, causing stalling and a Check Engine Light.
  • Exhaust Leak: A leak in the exhaust manifold or pipe before the first oxygen (A/F) sensor can draw in outside air, making the sensor think the engine is running lean.

Diagnosis Steps

  1. Check for any other stored trouble codes to provide more context.
  2. Visually inspect the engine bay for any obvious vacuum leaks, such as cracked hoses or a disconnected intake boot. Ensure the air filter box is properly sealed.
  3. Using a scan tool, observe the short-term (STFT) and long-term (LTFT) fuel trims at idle. High positive numbers (e.g., LTFT >15%) confirm a lean condition.
  4. Increase engine RPM to 2500. If the fuel trims decrease significantly towards zero, a vacuum leak is the most likely cause. If they remain high or get worse, a fuel delivery or MAF sensor issue is more likely.
  5. Remove and clean the Mass Airflow (MAF) sensor with dedicated MAF sensor cleaner. Reinstall and check if fuel trims improve. Monitor the MAF reading at idle; it should be stable and within the 2.0-2.5 g/s range.
  6. Perform a smoke test to definitively locate any vacuum leaks. Pay close attention to the intake manifold gaskets (a known failure point), PCV hoses, and the EVAP purge valve.
  7. Test the EVAP purge solenoid. With the engine at idle, the valve should be closed (0% duty cycle). Pinching the vacuum line to the valve should cause no change in fuel trims. If trims improve, the valve is likely stuck open.
  8. If no vacuum leaks are found and the MAF is clean/working, check fuel pressure to rule out a weak fuel pump or clogged filter. Check if your vehicle is part of recall 5321K.
  9. If all previous steps do not resolve the issue, the cause is likely the fuel injectors as per Mazda TSB MT-021/17. The TSB directs technicians to replace the fuel injectors at this stage.

Parts You'll Likely Need

  • Intake Manifold Gasket Set (4 required) (OEM #PE01-13-111) — These gaskets are a very common failure point on the 2.0L SkyActiv-G engine, leading to vacuum leaks that cause code P0171. They harden and shrink over time.
    Trusted brands: Mazda OE, Fel-Pro, Mahle, Victor Reinz
    OEM price range: $8-$12 per gasket
    Aftermarket price range: $4-$8 per gasket
  • Mass Airflow (MAF) Sensor (OEM #PE01-13-215) — A dirty or failed MAF sensor is a primary cause of incorrect fuel mixture calculations leading to a P0171 code. Cleaning is often attempted first.
    Trusted brands: Denso, Hitachi, Bosch, NTK
    OEM price range: $180-$250
    Aftermarket price range: $100-$200
  • Fuel Injector (OEM #PE01-13-250D) — Identified by a Mazda TSB as a likely culprit for P0171 on this engine after more common issues are ruled out. They are typically replaced as a set of four.
    Trusted brands: Mazda OE
    OEM price range: $150-$220 per injector
    Aftermarket price range: $80-$150 per injector

Related Codes That Often Appear With This One

  • P0300, P0301, P0302, P0303, P0304 — A severe lean condition can cause incomplete combustion, leading to cylinder misfires. The Mazda TSB for P0171 explicitly notes that it may appear alongside misfire codes (P030X) due to failing fuel injectors or severe vacuum leaks.
  • P2187 — This code means "System Too Lean at Idle (Bank 1)" and is very common on Mazda vehicles. If you see P2187 with P0171, it strongly points towards a vacuum leak, which has a more pronounced effect at idle RPM when intake vacuum is highest.

Technical Service Bulletins (TSBs) & Recalls

  • MT-021/17: Check Engine Light ON with DTC P0171. This TSB provides the main diagnostic flow for a wide range of Skyactiv engines, leading to the replacement of fuel injectors.
  • MT-004-22: A newer TSB that supersedes previous versions for some models, also addressing P0171 possibly with misfire codes (P030X) and outlining a similar diagnostic procedure.
  • Recall 5321K: Addresses a faulty low-pressure fuel pump on 2019 models that can cause stalling and may trigger a check engine light.

Platform-Specific Known Issues

  • Mazda TSB MT-021/17 & MT-004-22: Fuel Injector Replacement: → Shop Fuel Injector Mazda issued a technical service bulletin applicable to 2016-2021 CX-3 models. It outlines a specific procedure for diagnosing P0171: first, inspect the air intake system, MAF sensor, and A/F sensor. If fuel trims remain abnormal after these checks, the TSB explicitly directs the technician to 'Replace the fuel injectors'. This indicates a known issue with injector performance on these engines.

Mechanic-Grade Diagnostic Values

  • High-Pressure Fuel Rail Pressure (at idle) — expected: 3.0 MPa (435 psi) or more. Failure: Pressure significantly below 3.0 MPa at idle suggests a failing high-pressure fuel pump.
  • Mass Airflow (MAF) Sensor Reading (at idle) — expected: Approximately 2.0 - 2.5 g/s for the 2.0L engine.. Failure: Readings significantly below 2.0 g/s at idle, or readings that do not increase smoothly with RPM, indicate a dirty or faulty sensor.
  • EVAP Purge Solenoid Coil Resistance — expected: Generally between 12 and 130 ohms, with a more common range being 15-30 ohms for many solenoids.. Failure: A reading of 0 ohms (short circuit) or infinite/OL (open circuit) indicates a failed solenoid coil. A reading significantly outside the expected range (e.g., 10 ohms) can also indicate a fault.
  • Total Fuel Trim (LTFT + STFT) — expected: As close to 0% as possible, with a normal operating range typically within +/- 10%.. Failure: Sustained total correction exceeding +25% to +35% will trigger the P0171 code, indicating the system is at its maximum compensation limit.

Scan Tool Commands That Help

  • Mazda M-MDS / FORScan: EVAP Purge Solenoid On/Off Actuation Test — Use this bidirectional control to command the purge valve to open and close while the engine is off. A clicking sound should be heard, confirming the solenoid is mechanically responding to the electrical command. This helps separate a faulty solenoid from a wiring or PCM driver issue.
  • Mazda M-MDS / FORScan: Monitor 'FUEL_PRES' PID — This live data PID is essential for diagnosing the high-pressure fuel system on this GDI engine. It allows you to directly monitor the fuel pressure at the rail to confirm if it meets the minimum 435 psi spec at idle, ruling out the HPFP.

Wiring & Ground Locations

  • Engine Bay Ground Points — Key factory ground points are typically found on the body near the passenger side, on a motor mount stud, on the valve cover, on the intake manifold, and on the transmission housing.. A poor ground for the PCM or critical sensors (like the MAF or O2 sensors) can cause incorrect readings, leading to fuel trim issues. Verifying these grounds are clean and tight is a crucial step in diagnosing elusive electronic faults.
  • Primary Chassis Ground (for Jump-Starting) — The owner's manual specifies a dedicated, unpainted ground point in the engine bay for jump-starting, which serves as a known-good main chassis ground.. This point can be used as a reference for testing the integrity of other ground connections with a multimeter (voltage drop test).

Real Owner Repair Stories

  • YouTube channel 'Gears and Gasoline' (Mazda with SkyActiv engine (model similar to CX-3)) — P0171 lean code returned after a previous repair attempt.
    ❌ Tried (didn't work) A thorough smoke test, which passed with no leaks found.
    ✅ What actually fixed it The MAF sensor mounting screws were stripped, preventing it from seating securely in the airbox. This allowed unmetered air to leak *around* the sensor's body. Properly securing the sensor (and replacing it as it was also faulty) resolved the code.
  • YouTube channel 'MorFab Industries' (2009 Mazda 3 (similar diagnostic principles)) — P0171 with total fuel trims maxed out at +35%.
    ❌ Tried (didn't work) Initial visual inspection.
    ✅ What actually fixed it A smoke test revealed a massive vacuum leak from the O-ring at the point where the brake booster vacuum hose connects to the intake manifold. Replacing the faulty O-ring was the primary fix.
  • YouTube channel 'unnamed' via Go-Parts article (2016 Mazda 6 (same engine family)) — P0171, engine shaking, misfiring, poor acceleration, stalling.
    ❌ Tried (didn't work) Replaced all ignition coils, Replaced all spark plugs, Performed a smoke test (no leaks found), Checked low-side fuel pressure (was good at 60 PSI), Replaced the MAF sensor with a new aftermarket part
    ✅ What actually fixed it The final fix was replacing the *new, but defective* aftermarket MAF sensor with another brand new one. The first replacement part was faulty out of the box.

"I Checked Everything" — The Actual Cause

  • In multiple documented cases, a smoke test passed with no leaks found, but the P0171 code persisted. The actual cause was a faulty MAF sensor that was either defective out of the box (even when new) or not seated properly in its housing, allowing air to leak around the sensor body itself.
  • A leaking internal diaphragm in the power brake booster can cause a significant vacuum leak that a smoke test might not reveal if the test is not performed correctly or if the leak only occurs under vacuum, not pressure.
  • Clogged or partially restricted fuel injectors, as identified in the Mazda TSB, will not be found by a smoke test but will cause a lean condition that the PCM tries to correct.

When the Usual Fixes Don't Work

  • In a Reddit thread for a 2016 Mazda6 with a persistent P0171, the owner replaced the O2 sensors, purge valve, MAF sensor, and the entire fuel pump based on a dealer diagnosis, and also performed a smoke test and used injector cleaners, all without resolving the code. This highlights that even following common diagnostic paths and replacing multiple likely components may not fix the issue, pointing towards either a very obscure cause (like a wiring fault or cracked manifold) or a faulty replacement part.

OEM Part Supersession History

  • PE01-13-250B, PE01-13-250C, PEAR-13-250PE01-13-250D — Internal revisions by the manufacturer to improve performance or reliability.
    Heads up: While older versions may fit, the existence of multiple supersessions for a part identified in a TSB strongly suggests using the latest revision (PE01-13-250D) is critical for a lasting repair.

Model Year Variations Within This Range

  • 2019-2021: The 2.0L SkyActiv-G engine was 'tweaked' for the 2019 model year, increasing horsepower from 146 to 148 and improving torque across the RPM range. This implies minor differences in PCM software and fuel mapping compared to 2016-2018 models.
  • 2016-2018 vs 2019-2021: Part listings for the intake manifold gasket (PE01-13-111) differentiate between '2016-18 Japan Built' and '2019-21 Mexico Built' vehicles, suggesting a potential manufacturing or supply chain difference, even if the part number remains the same.

Diagnostic Flowchart

Other Known Issues on This Vehicle

Issues unrelated to this code that are worth knowing about as an owner of this generation:

  • Infotainment 'Ghost Touch' or Freezing 🟠 Medium — Common on earlier models (2016-2018). The screen may register phantom touches, change settings, or become unresponsive. (Ref: Mazda issued a Customer Service Program (CSP13) extending the warranty for this issue on some models, which may include the CX-3.)
  • A/C Condenser Leak 🟠 Medium — Frequently reported on 2016-2017 models, leading to loss of cooling. The condenser is prone to leaks from road debris or defects. (Ref: Mazda extended the warranty for this part on 2016-2017 models under Special Service Program SSPB8.)
  • Low-Pressure Fuel Pump Failure 🔴 High → Shop Fuel Pump — Specific to 2019 models, a defective fuel pump impeller can crack, causing the engine to stall while driving. (Ref: Mazda Recall 5321K / NHTSA 21V-875.)
  • Noisy Wheel Bearings 🟡 Low — A humming or grinding noise from the wheel area, especially at highway speeds, is a commonly reported problem.
  • Jerky Automatic Transmission 🟡 Low — Some owners report harsh shifting or jerking from the 6-speed automatic, particularly at low speeds or when starting from a stop. It can sometimes be addressed with a software update.
  • Carbon Buildup on Intake Valves 🟡 Low — As a direct-injection (GDI) engine, some carbon deposit on intake valves is expected over high mileage (approaching 100,000 miles). However, Mazda's SkyActiv-G design is considered less prone to problematic buildup than many other GDI engines.

Used vs. New Parts: Buying Guide for This Vehicle

When a used part is the smart pick: For this repair, used parts are generally only recommended for large, non-wear, structural components like the plastic intake manifold itself or the air filter box assembly, should they be cracked or damaged.

Donor-vehicle mileage cap: roughly under 80000 miles for the part to have meaningful remaining life.

What to inspect on the donor part:

  • Inspect plastic parts for hairline cracks, especially around mounting points and threaded inserts.
  • Ensure rubber components like attached hoses are still pliable and not hardened or brittle.
  • Verify gasket mating surfaces are clean, flat, and free of deep scratches or gouges.

OEM-only on this vehicle (don't cheap out):

  • Fuel Injectors: Due to the TSB and multiple part number revisions, using new OEM (Mazda) injectors is the most reliable way to ensure the problem is fixed per the factory procedure.
  • Mass Airflow (MAF) Sensor: Multiple owner stories report new-but-defective aftermarket MAF sensors causing persistent issues. Using an OEM or a trusted OEM-supplier brand like Denso or Hitachi is strongly advised.

Aftermarket brands forum-validated for this vehicle:

  • Gaskets: Fel-Pro, Mahle, Victor Reinz
  • Sensors: Denso, Hitachi, NTK, Bosch

Brands owners have reported issues with on this vehicle:

  • Unbranded or 'white-box' electronic sensors (like the MAF sensor) have a documented history of being defective out-of-the-box for this application and should be avoided.

Real Owner Stories

Aggregated from forums and TSBs cited above. Mileages and costs reflect what owners reported in those sources.

2013-2023 Mazda CX-5 2.0L/2.5L SkyActiv-G

Symptoms: Check engine light with P0171, potentially accompanied by misfire codes (P030X).

What fixed it: Following the diagnostic procedure in TSB MT-004-22, which may lead to fuel injector replacement or addressing intake gasket failure.

Source hint: TSB MT-004-22

2019 Mazda CX-3 2.0L

Symptoms: Engine stalling while driving and check engine light illumination.

What fixed it: Replacement of the low-pressure fuel pump under recall 5321K.

Source hint: Recall 5321K / NHTSA 21V-875

Frequently Asked Questions

Is there a Technical Service Bulletin for the P0171 code on my 2016-2021 Mazda CX-3?
Yes, Mazda issued TSB MT-021/17 (and the superseding MT-004-22) specifically for the P0171 code. It outlines a diagnostic flow that often leads to the replacement of all four fuel injectors if intake and sensor checks pass.
Could the 2019 Mazda CX-3 fuel pump recall be related to my lean condition?
Yes, Recall 5321K (NHTSA 21V-875) addresses a faulty low-pressure fuel pump on 2019 models. A failing pump can cause stalling and may trigger the P0171 code due to inadequate fuel delivery.
What is the specific MAF sensor reading I should look for on my 2.0L SkyActiv-G engine?
At idle, the Mass Airflow (MAF) sensor for this specific 2.0L engine should typically report between 2.0 and 2.5 g/s. Readings significantly lower than this often indicate a dirty or faulty sensor.
Why are the intake manifold gaskets a common suspect for P0171 on the CX-3?
The rubber gaskets on the SkyActiv-G engine are known to become hard, shrunken, and brittle over time. This creates a vacuum leak by allowing unmetered air to enter, which is a well-documented issue for this engine platform.
What part number do I need if the TSB confirms I need new fuel injectors?
According to the vehicle-specific data, the OEM part number for the replacement fuel injectors is PE01-13-250D.
If I suspect a vacuum leak at the intake manifold, what is the recommended OEM replacement part?
The recommended fix is to replace the set of four intake manifold gaskets using OEM part number PE01-13-111.
Mazda Lean Code p0171
Mazda Lean Code p0171
How to Find a Vacuum Leak with a Smoke Machine - Fixing Rough Idle or P0171 Code
How to Find a Vacuum Leak with a Smoke Machine - Fixing Rough Idle or P0171 Code
How to Replace Intake Manifold 2014-2021 Mazda 6
How to Replace Intake Manifold 2014-2021 Mazda 6
P0171 Trouble Code: System Too Lean Bank 1 (The Most Common Causes)
P0171 Trouble Code: System Too Lean Bank 1 (The Most Common Causes)
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 May 12, 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 (Deep Dive) for:
  • Mazda CX-3: 201620172018201920202021
In this article
🧭 Diagnostic Flowchart
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