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 2016-2021 Mazda CX-3: System Too Lean Causes and Fixes

On a 2016-2021 Mazda CX-3, code P0171 is most often caused by a vacuum leak from a failed intake manifold gasket (OEM Part No. PE01-13-111) or a dirty MAF sensor. If those are ruled out, a Mazda technical service bulletin points to faulty fuel injectors (OEM Part No. PE01-13-250D) as a known issue. Expect to pay $150-$400 for a vacuum leak repair or MAF sensor, and potentially more for injector replacement.

15 minutes to read 2016-2021 Mazda CX-3
Most Likely Cause
Vacuum Leak (Intake Manifold Gasket)
Est. Time
2.2 hrs
Shop Labor
$150 – $1500
Parts Price
$20 – $840
⚠️ Drivable, but... — Yes, but it's not recommended for long. Driving with a lean condition can cause poor performance, hesitation, and stalling. Over time, the higher combustion temperatures can damage internal engine components, spark plugs, or the catalytic converter.
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 unmetered air entering the engine from a vacuum leak. Thoroughly check intake manifold gaskets and all vacuum hoses.
  • The second most likely cause is a dirty or faulty Mass Airflow (MAF) sensor. Cleaning it is a good first step.
  • A Mazda service bulletin indicates that if leaks and sensors are not the problem, faulty fuel injectors are a known issue on this engine.
  • 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 means "System Too Lean (Bank 1)". This indicates that the engine's computer, or Powertrain Control Module (PCM), has detected too much oxygen and not enough fuel in the exhaust gases. The PCM tries to correct this imbalance by injecting more fuel, a process called fuel trim. When the long-term fuel trim correction exceeds a certain limit (e.g., 25% or more) for a sustained period (e.g., 20 seconds or more), the PCM triggers the P0171 code and illuminates the Check Engine Light.

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

A 2016-2021 Mazda CX-3 or its SKYACTIV-G engine bay
The Mazda CX-3's SKYACTIV-G engine has a specific set of known issues that trigger a P0171 lean code, including a manufacturer TSB for the fuel injectors.

While most vehicles can get a P0171 code from common issues like vacuum leaks or a dirty MAF sensor, Mazda has issued a Technical Service Bulletin (TSB MT-004-22, superseding MT-021/17) 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 cause on this platform than on many other vehicles, a fix that some owners on forums have had to pursue after other repairs failed.

Diagnostic Flowchart

OBD2 scanner screen displaying high positive Long Term Fuel Trim (LTFT) data
A scan tool is essential for diagnosing a P0171 code. High positive fuel trims (typically +15% to +25%) confirm the engine computer is adding extra fuel to compensate for a lean condition.

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

What do you find when checking for vacuum leaks and the MAF sensor?
→ Replace the set of four intake manifold gaskets (OEM PE01-13-111, $20-$50). The rubber hardens over time, causing a very common SKYACTIV-G vacuum leak.
→ Clean the MAF sensor. If scan tool readings at idle aren't 2.0-2.5 g/s, replace the sensor (OEM PE01-13-215, $180-$250).
Is the upstream O2 sensor responding normally on a live scan tool?
→ Replace the upstream Air/Fuel O2 sensor ($80-$180). A lazy sensor slow to switch will incorrectly report a lean condition.
→ Replace the set of four fuel injectors (OEM PE01-13-250D, $150-$210 each). Mazda TSB MT-004-22 directs this repair when other causes are ruled out.

Symptoms You May Notice

  • Check Engine Light is on
  • Rough or unstable idle, sometimes fluctuating or 'hunting'
  • Engine hesitation or stumbling during acceleration
  • Reduced engine power
  • Poor fuel economy
  • Engine stalling at stops
  • Hard starting, requiring long crank times
⚠️ Don't Waste Money on the Wrong Fix
  • Replacing the O2 sensor before checking for vacuum leaks. A vacuum leak is a more common and cheaper fix, and it will cause the O2 sensor to report a lean condition even if the sensor itself is good.

Most Likely Causes

Set of four rubber intake manifold gaskets for a Mazda SKYACTIV-G engine
The rubber intake manifold gaskets on the SKYACTIV-G engine are notorious for hardening and shrinking over time, creating a vacuum leak that allows unmetered air into the engine.
  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 and brittle, failing to seal properly and allowing unmetered air to enter the engine. This is a frequent topic in owner forums for cars with this engine.
    How to confirm: Listen for a hissing sound at idle. A DIY method is to carefully spray brake cleaner or unlit propane near the intake manifold gasket area; a change in engine RPM indicates a leak. A professional smoke test is the most definitive way to find the source of a leak. 🎬 See how to perform a professional smoke test for leaks.
    Typical fix: Replace the set of four intake manifold gaskets. The OEM part number is PE01-13-111.
    Est. part cost: $20-$50 for a set of four OEM gaskets.
  2. Dirty or Faulty Mass Airflow (MAF) Sensor 🔴 High Probability The MAF sensor (OEM Part No. PE01-13-215) measures air entering the engine. If the sensing element is contaminated with dirt or oil, it will under-report airflow, causing the PCM to command too little fuel. This is a common first-check for P0171 on Mazda forums.
    How to confirm: Remove and inspect the sensor. It can be cleaned with a dedicated MAF sensor cleaner spray; never touch the delicate sensor wires. 🎬 Watch: How to clean the MAF sensor on your Mazda. 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 under load are a key indicator of a bad sensor.
    Typical fix: Clean the sensor first. If the code returns or readings are still incorrect, replace the MAF sensor.
    Est. part cost: $100-$200 for an aftermarket sensor, $180-$250 for OEM.
  3. Faulty Fuel Injectors 🟡 Medium Probability Mazda TSB MT-004-22 specifically identifies replacing the fuel injectors as the final repair step for P0171 when other common causes are ruled out. The direct-injection injectors may become partially clogged or fail electronically, preventing them from delivering the correct amount of fuel. One owner on Reddit with a Mazda 3 was quoted $3,500 for this repair at a dealer after other parts failed to fix the code.
    How to confirm: This is typically diagnosed after confirming there are no vacuum leaks and the MAF/O2 sensors are working correctly, as per the TSB. A professional may perform a fuel injector balance test or follow the TSB's diagnostic flow.
    Typical fix: Replace the set of four fuel injectors. The OEM part number is PE01-13-250D, which supersedes earlier versions.
    Est. part cost: $150-$210 per OEM injector.
  4. Failing Air/Fuel Ratio (O2) Sensor 🟡 Medium Probability The front O2 sensor (an Air/Fuel sensor) provides the primary data for air-fuel mixture. If it becomes old and slow to respond, it can incorrectly report a lean condition, causing the PCM to add unnecessary fuel.
    How to confirm: Graph the sensor's voltage on a scan tool. A healthy sensor will show rapid fluctuations. A lazy sensor that is slow to switch or is biased towards a low voltage (lean) reading needs replacement.
    Typical fix: Replace the upstream (pre-catalytic converter) O2 sensor.
    Est. part cost: $80-$180

Rare But Worth Checking

  • Weak Fuel Pump or Clogged Fuel Filter: While less common, low fuel pressure from a failing pump or a clogged filter can starve the engine of fuel, causing a lean condition. This should be investigated if fuel trims are poor across all RPM ranges.
  • Exhaust Leak: A leak in the exhaust manifold or pipe before the first O2 sensor can draw in outside air, making the sensor think the engine is running lean.
  • Cracked Valve Cover or Leaking PCV system: The valve cover or its integrated Positive Crankcase Ventilation (PCV) system can crack or leak, creating a significant vacuum leak that triggers a P0171 code. This can sometimes be mistaken for an intake manifold gasket leak.

Diagnosis Steps

Comparison of a clean, new MAF sensor element versus a dirty, contaminated MAF sensor element
A clean MAF sensor (left) accurately measures incoming air. A dirty MAF sensor (right) gets insulated by soot and oil, causing it to under-report airflow and trigger a false lean condition.
  1. Read the trouble codes with an OBD-II scanner and check the freeze frame data to see the engine conditions when the code was set. Note the RPM, engine load, and temperature.
  2. Observe the Long Term Fuel Trim (LTFT) and Short Term Fuel Trim (STFT) data. Consistently high positive values (e.g., LTFT + STFT > 25%) confirm the lean condition.
  3. Perform a smoke test to definitively identify any vacuum leaks. Pay extremely close attention to the four intake manifold gaskets, the PCV hose, the air intake boot, and the valve cover.
  4. If no leaks are found, inspect the air filter box for proper fitment. Then, remove and clean the Mass Airflow (MAF) sensor with dedicated MAF sensor cleaner. Reinstall and check if fuel trims improve.
  5. With a scan tool, graph the upstream O2 (A/F) sensor voltage to check if it is responding correctly. A lazy or biased sensor is a likely culprit if no vacuum leaks are present.
  6. Check the fuel pressure at the fuel rail to ensure the fuel pump and filter are supplying adequate pressure, ruling out a fuel delivery issue.
  7. If all previous steps do not resolve the issue, the cause is likely the fuel injectors as per Mazda TSB MT-004-22. The TSB directs technicians to replace the fuel injectors at this stage.

Parts You'll Likely Need

  • Intake Manifold Gasket (OEM #PE01-13-111) — A very common source of vacuum leaks on the SKYACTIV engine as the original rubber hardens over time. They are sold individually and four are required.
    Trusted brands: Mazda OE, Fel-Pro, Mahle
    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.
    Trusted brands: Denso, Spectra Premium (MA333), Mazda OE
    OEM price range: $180-$250
    Aftermarket price range: $80-$150
  • 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, Bosch
    OEM price range: $211 per injector.
    Aftermarket price range: $80-$120 per injector
  • Air/Fuel Ratio Sensor (Upstream O2 Sensor) — A failing sensor can send false lean signals to the computer, directly causing the code.
    Trusted brands: Denso, NGK/NTK, Bosch
    OEM price range: $200-$280
    Aftermarket price range: $80-$180

Related Codes That Often Appear With This One

  • P0300, P0301, P0302, P0303, P0304 — A severe lean condition can lead to incomplete combustion, causing the engine to misfire. The Mazda TSB for P0171 specifically notes that misfire codes (P030X) may also be present.

Technical Service Bulletins (TSBs) & Recalls

Mazda SKYACTIV-G direct injection fuel injectors
Mazda TSB MT-004-22 points directly to replacing the set of four direct-injection fuel injectors if vacuum leaks and MAF sensor issues have been ruled out.
  • MT-004-22 / MT-021/17: Check Engine Light ON with DTC P0171 (Fuel Trim too Lean). This TSB provides a specific diagnostic flow for SKYACTIV engines, leading to the potential replacement of fuel injectors.

Platform-Specific Known Issues

  • Mazda TSB MT-004-22 (supersedes MT-021/17): Mazda issued a technical service bulletin that applies to 2016-2021 CX-3 models, among other SKYACTIV vehicles. 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

  • Mass Airflow (MAF) Rate at Idle — expected: Approx. 1.89 g/s to 2.25 g/s (after warm-up). Failure: Significantly higher (e.g., 3.0 g/s) or lower readings at idle can indicate a sensor fault or a vacuum leak.
  • Mass Airflow (MAF) Rate at 2,000 RPM — expected: Approx. 5.02 g/s. Failure: Readings that do not increase linearly with RPM or are significantly off this value suggest a faulty MAF sensor.
  • High-Pressure Fuel System Pressure (Direct Injection) — expected: Above 40 MPa (5,802 psi) and below 60 MPa (8,702 psi) under load.. Failure: Pressure outside this range indicates a problem with the high-pressure fuel pump or its control module.
  • Total Fuel Trim (LTFT + STFT) — expected: Should be less than +25% total correction.. Failure: A sustained total correction of +25% or higher will trigger the P0171 code. Some service documents note the trigger threshold can be as high as 40%.

Scan Tool Commands That Help

  • M-MDS (Mazda Modular Diagnostic System): Fuel Injector Simulation Test — To individually turn each fuel injector off to see if engine idle vibration changes. If turning off one injector does not worsen the idle, that injector may be clogged or faulty, helping to pinpoint a single bad injector.
  • M-MDS (Mazda Modular Diagnostic System): PID Monitoring (PRG_DUTY) — To monitor the duty cycle of the purge solenoid valve. This can help diagnose if the valve is stuck open or operating incorrectly, which would cause a vacuum leak.

Real Owner Repair Stories

  • Reddit user on r/MazdaCX30 (2019 Mazda 3 Skyactiv-X (similar EVAP system)) — Persistent P0171 code, occasional engine stalling at idle. Check engine light sometimes appeared in heavy rain.
    ❌ Tried (didn't work) Smoke test for intake leaks (none found), Lambda (O2) sensor check (passed), MAF sensor replacement, ECU calibration / fuel injection reset
    ✅ What actually fixed it The issue was a faulty EVAP system, specifically the EVAP canister or purge valve. After suggesting this to the service center, they confirmed the fault and the repair solved the code.
  • YouTube Channel 'Nuts & Bolts with Tone' (Mazda with Skyactiv engine) — P0171 code, high fuel trims at idle.
    ❌ Tried (didn't work) Thorough smoke test of the intake system (no leaks found)
    ✅ What actually fixed it The MAF sensor was not properly secured in the airbox with stripped screws, allowing unmetered air to leak past it. Replacing the faulty upper airbox and the dirty MAF sensor (which was reading high at 3 g/s at idle) brought the idle reading down to a normal ~2.2 g/s and resolved the lean condition.

"I Checked Everything" — The Actual Cause

  • In one documented case on a similar Mazda platform, the car passed a smoke test and had multiple parts replaced (MAF, O2 sensors) without success. The final root cause was a faulty EVAP system (purge valve or canister), which can introduce a vacuum leak that is sometimes missed during a standard intake smoke test.
  • A cracked or failing PCV valve integrated into the valve cover can cause a significant vacuum leak. This may not always be obvious during a smoke test, but can sometimes be diagnosed by a whistling sound or by blocking the PCV port and observing a change in fuel trims.

OEM Part Supersession History

  • PEAR-13-250, PE01-13-250B, PE01-13-250CPE01-13-250D — Revision to improve performance and reliability, likely related to the issues addressed in TSB MT-004-22.
  • PE21-20-3F0PE22-20-3F0 — Revision for the high-pressure fuel pump.
    Heads up: Fitment notes indicate checking the stamp on the original part is critical before ordering a replacement.

Model Year Variations Within This Range

  • 2019-2021: For the 2019 model year, the 2.0L SKYACTIV-G engine received minor tweaks to reduce internal friction, which resulted in a slight power increase from 146 to 148 hp and improved low-end torque. While not a direct cause, these internal changes could subtly affect baseline diagnostic values compared to 2016-2018 models.
How to Clean MAF sensor // Mazda CX5 Mazda CX3 Mazda 2 Mazda 3 Mazda 6 Biante
How to Clean MAF sensor // Mazda CX5 Mazda CX3 Mazda 2 Mazda 3 Mazda 6 Biante
How to Fix P0171 Engine Code with MAF Sensor Cleaner
How to Fix P0171 Engine Code with MAF Sensor Cleaner
P0171 SYSTEM TOO LEAN BANK 1 Mazda 3 Troubleshooting
P0171 SYSTEM TOO LEAN BANK 1 Mazda 3 Troubleshooting
Vacuum Leak EVAP Diagnosis - Smoke Testing Machine (P0171)
Vacuum Leak EVAP Diagnosis - Smoke Testing Machine (P0171)
Smoke testing for codes P0171  P0174
Smoke testing for codes P0171 P0174
P0171 P0174 lean codes smoke test, Diagnosis and repair
P0171 P0174 lean codes smoke test, Diagnosis and repair
04-09 Mazda 3 engine tick FIX! - Intake manifold diagnosis and replacement
04-09 Mazda 3 engine tick FIX! - Intake manifold diagnosis and replacement
Fuel Injectors Replacement : Fixing the P0171 Engine Error Code
Fuel Injectors Replacement : Fixing the P0171 Engine Error Code
How to Fix P0171 Engine Code with Fuel Injectors Replacement
How to Fix P0171 Engine Code with Fuel Injectors Replacement
FUEL INJECTOR FUEL RAIL REPLACEMENT REMOVAL MAZDA CX-7 MAZDASPEED 3 6 2 3 CX7 2.3
FUEL INJECTOR FUEL RAIL REPLACEMENT REMOVAL MAZDA CX-7 MAZDASPEED 3 6 2 3 CX7 2.3
Mazda Protege Fuel Injector Replacement Guide
Mazda Protege Fuel Injector Replacement Guide
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:
  • Mazda CX-3: 201620172018201920202021
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