Back to Vehicles
Subaru2017-2023Code Combo

P0171 Code: Subaru Impreza (2017-2023) - Causes, Symptoms & Fixes

Complete guide to P0171 diagnostic trouble code on 2017-2023 Subaru Impreza - causes, symptoms, repair costs

Get Personalized Help

Ask about specific issues with your Subaru Impreza.

Ask MechanicGPT

No recalls found in NHTSA database.

No NHTSA complaints found for this make/model/year/issue combination. This guide relies on general automotive knowledge and typical P0171 behavior on Subaru Impreza 2017–2023 models, but actual occurrences may vary. Use live data from a scan tool whenever possible and consider local conditions and maintenance history.

CODE MEANING AND SEVERITY

  • Code meaning: P0171 = System Too Lean (Bank 1). The engine control unit (ECU) detected that the air-fuel mixture on Bank 1 is lean beyond expected limits, indicating too much air or too little fuel for the engine’s current operating conditions.
  • Bank design note: On a 4-cylinder Subaru Impreza (the 2017–2023 Impreza most commonly uses a 2.0L engine with a single bank path for OBD-II lean condition terminology), Bank 1 corresponds to the side of the engine containing cylinder 1. In practice, many 4-cylinder engines report P0171 as Bank 1; multiple sensors and fuel trims are used to determine lean conditions across the system.
  • Severity: Moderate. A lean condition can cause rough idle, reduced power, and elevated exhaust emissions. If the condition persists, it can stress the catalytic converter and fuel system, and may mask misfires. It is often caused by vacuum leaks, sensor issues, or fuel delivery problems rather than a single definitive fault.

COMMON CAUSES ON SUBARU IMPREZA (2017–2023)

The Impreza’s 2.0L engine (most frequently FB20 family) is susceptible to several lean-condition sources. Start with the most common and easiest to verify:

  • Vacuum leaks and PCV system
    • Loose, cracked, or disconnected vacuum hoses (including the brake booster line)
    • PCV valve or PCV hoses in poor condition
    • Intake ductwork cracks or loose clamps
  • Mass air flow (MAF) sensor issues
    • Dirty or contaminated MAF sensor element
    • MAF sensor wiring/connector problems
  • Fuel delivery problems
    • Low fuel pressure from a weak fuel pump or failing fuel pressure regulator
    • Clogged or dirty fuel injectors
    • Fuel filter restriction (if equipped, though many Subarus rely on in-tank filters)
  • Upstream oxygen sensor and related sensors
    • Faulty or slow-response upstream O2 sensor (Bank 1 Sensor 1)
    • Wiring or connector problems affecting O2 sensor signal
  • EVAP and purge system
    • Stuck or malfunctioning purge valve/solenoid allowing extra air or vapor flow
    • Evaporative system leak or vent issues
  • Intake system leaks beyond the MAF
    • Rail or manifold gaskets (including intake manifold gasket) with small vacuum leaks
    • Cracked throttle body or gasket
  • Fuel trim and engine management interactions
    • Prolonged lean condition may drive LTFT high; sometimes a secondary issue (e.g., a bad O2 sensor or MAF) is driving both LTFT and STFT higher
  • EGR (less common on NA Subarus but possible)
    • EGR valve or passages sticking or leaking could contribute to lean readings in some configurations
  • Misfire-related or ignition issues (secondary symptoms)
    • Misfire can co-exist and complicate fuel trim diagnosis; verify spark and coil health

SYMPTOMS

  • Check engine light (CEL) or malfunction indicator lamp (MIL) illuminated
  • Rough idle or stalling at idle
  • Hesitation, surging, or reduced power under acceleration
  • Decreased fuel economy
  • Possible misfire indicators (P0300, P0301–P0306) if the lean condition affects combustion stability
  • Audible vacuum leak sounds or hissing under the hood
  • Any related P0174 (if a second bank-specific lean condition is present) or P0172/P0175 (rich codes) could appear in some fault trees and diagnostic logs

DIAGNOSTIC STEPS

Important: Perform diagnosis with a modern scan tool capable of real-time data and freeze-frame data. Record live values for LTFT, STFT, MAF, RPM, fuel pressure (if possible), and O2 sensor readings.

Step-by-step approach:

  • Step 0: Confirm and contextualize

    • Confirm P0171 via scan tool, note freeze-frame data (engine RPM, coolant temp, observed LTFT/STFT values, driving conditions).
    • Check for other codes (P0174, P0172, P0131–P0134, P0138, P0139, P0130, P0300–P0306, etc.). Coexisting codes can guide the root cause.
    • Note engine temperature and weather/altitude, as those affect fuel trims.
  • Step 1: Visual inspection first

    • Inspect all vacuum hoses, PCV system hoses, brake booster line, intake ducts, and clamps for cracks, disconnections, or oil contamination.
    • Inspect throttle body gasket and intake manifold area for signs of leaks.
    • Inspect MAF sensor for contamination; check electrical connector for corrosion or loose fit.
  • Step 2: Check live data for lean indication

    • LTFT values: positive LTFT indicates retained lean condition; look for persistent +10% to +25% LTFT (or beyond) on Bank 1.
    • STFT values: should oscillate around zero if the system is self-correcting. Prolonged positive STFT with LTFT also positive is a stronger lean symptom.
    • MAF sensor reading: compare MAF g/s to engine load; abnormally high MAF reading with a lean code may indicate a dirty or faulty MAF.
  • Step 3: Vacuum leak confirmation

    • If a vacuum leak is suspected from visual checks, perform a smoke test or use carb cleaner/hedgehog spray around suspect areas with the engine at idle. A change in idle or stumble indicates a leak location.
    • Focus on PCV valve, PCV hoses, vacuum lines near the intake manifold, throttle body, and brake booster line.
  • Step 4: MAF sensor health check

    • If the MAF is suspected, unplug the MAF sensor with the engine running at idle. If the engine runs significantly worse or stalls, the MAF is likely functioning; if the engine runs better or returns to normal, the MAF may be dirty or faulty.
    • Clean the MAF element with a proper MAF cleaner; do not spin or touch the element with metal objects.
  • Step 5: Fuel delivery verification

    • Check fuel pressure with a proper gauge. Compare to the manufacturer’s spec for the 2.0L Subaru Impreza (consult the service manual for exact values; generally in the 50–60 psi range when the engine is running). If pressure is low, diagnose the pump, fuel filter (if serviceable), and return/regulator system.
    • If safe, check fuel trims after a fuel-system-related repair to confirm improvement.
    • Consider injector health: listen for injector tapping (noisy or 4-port injection clogs) and consider testing injector resistance and flow; dirty or restricted injectors can cause a lean condition.
  • Step 6: O2 sensor and downstream effects

    • If LTFT/STFT indicate a persistent lean condition and MAF checks out, test the upstream O2 sensor (Bank 1 Sensor 1) response time and switch speed. A stuck or slow upstream O2 sensor can falsely indicate lean.
    • Check wiring and connectors to upstream O2 sensor for damage or corrosion.
  • Step 7: Evap and related systems

    • Inspect the purge valve and related EVAP hoses. A stuck purge valve or an EVAP leak can introduce extra air or alter readings, contributing to lean conditions.
    • Look for loose fuel cap, cracked hoses, or vacuum related to EVAP that may affect readings.
  • Step 8: Mechanical checks

    • If all sensors and vacuum systems check out, perform a compression test to rule out head gasket or piston issues that could indirectly cause fuel trim instability, though this is less common for isolated P0171.
    • Ensure ignition is clean and stable; misfires can co-exist and complicate fuel-trim interpretation.
  • Step 9: Recheck after repairs

    • Clear codes, drive under varied conditions, and monitor LTFT/STFT and O2 sensor behavior. Ensure no new codes appear and that LTFT returns toward zero after repairs.

Tips and thresholds to interpret data:

  • LTFT consistently above +10% (and not returning toward zero after driving) strongly suggests a lean condition source beyond transient issues.
  • STFT should oscillate around zero and respond quickly to changes in load; slow or non-responsive O2 sensors can mask or exacerbate lean conditions.
  • MAF readings should be reasonable for engine load and RPM; a MAF that reads abnormally high without corresponding RPM increase can indicate a faulty sensor or calibration issue.

RELATED CODES

  • P0171 System Too Lean Bank 1 (the primary code)
  • P0174 System Too Lean Bank 2 (for 4-cylinder engines with dual banks; not always present on all Subaru setups, but check if a second bank designation is reported in vehicle data)
  • P0172/P0175 System Too Rich Bank 1/Bank 2 (can occur if the MIL moves back and forth between lean and rich with intermittent sensor readings)
  • P0131, P0132, P0133 (O2 Sensor issues; Bank 1 Sensor 1) and P0134 (O2 Sensor not switching) may accompany lean conditions
  • P0300 P0301–P0306 (Random/Misfire-related codes) can appear if lean mixture causes misfires
  • P0440–P0446 EVAP-related codes may appear if EVAP system issues contribute to lean readings

REPAIR OPTIONS AND COSTS (2025 PRICE RANGE)

Note: Actual labor rates and part costs vary by region, dealer vs independent shop, and vehicle condition. The ranges below are approximate and meant as a guide.

  • Vacuum leaks and hoses (PCV lines, vacuum hoses, clamps)
    • Parts: $5–$50
    • Labor: $40–$150
    • Total rough range: $45–$200
  • PCV valve and PCV hose replacement
    • Parts: $5–$30
    • Labor: $50–$150
    • Total: $55–$180
  • MAF sensor cleaning or replacement
    • Cleaning (DIY): $0–$15 in cleaner
    • Cleaned by shop: $20–$60
    • Replacement: $150–$350 parts; labor $40–$120
    • Total: $190–$470
  • Fuel system (pressure test, pump/regulator, or injector work)
    • Fuel pressure test: labor $50–$150 (test only)
    • Fuel pump replacement: $250–$700 parts; labor $200–$500
    • Fuel injector cleaning: $50–$150
    • Injector replacement (per injector): $120–$350 parts; labor $60–$120 per injector
    • Total range (depending on work): $150–$1,200+
  • Intake manifold gasket or related intake leaks
    • Parts: $20–$150
    • Labor: $300–$900 (may be higher if manifold removal is required)
    • Total: $320–$1,050
  • O2 sensors (upstream Bank 1 Sensor 1, possibly downstream)
    • Parts: $60–$150 each
    • Labor: $60–$140 per sensor
    • Total per sensor: $120–$290
  • EVAP purge valve or EVAP hose repairs
    • Parts: $40–$150
    • Labor: $60–$150
    • Total: $100–$300
  • EGR valve or related plumbing (less common on NA 2.0L)
    • Parts: $80–$250
    • Labor: $100–$250
    • Total: $180–$500
  • Compression checks or head gasket issues (if diagnosed)
    • Diagnostic: $100–$200
    • Major mechanical work (head gasket etc.) can be $1,000–$2,500 or more

Note: If the issue is intermittent or due to an evaporative system leak, costs can vary widely. A simple vacuum leak repair is often the lowest-cost fix, whereas manifold gasket or fuel-delivery fixes can be more expensive.

DIY vs PROFESSIONAL

  • DIY-friendly tasks (lower risk and cost):
    • Visual inspection of hoses and intake connections
    • Cleaning the MAF sensor with proper cleaner
    • Unplugging the MAF sensor to observe engine behavior (to diagnose MAF health)
    • Smoke testing for leaks (requires equipment, but can be done by a capable DIYer)
    • Replacing a PCV valve or a small vacuum hose
    • Checking and topping off fuel quality (but avoid driving long distances on poor fuel)
  • Moderate to high difficulty (professional recommended):
    • Fuel pressure testing and diagnosing fuel-delivery problems
    • Replacing intake manifold gaskets or other complex intake work
    • Replacing O2 sensors (especially if multiple faults are involved)
    • Injector cleaning/replacement or extensive vacuum system work
    • EVAP system diagnostics (purge valve or leaks)
  • Safety notes:
    • Work safely around fuel system components and hot engine parts.
    • If you’re not confident with fuel pressure testing or high-pressure systems, seek professional help.

PREVENTION

  • Regular maintenance helps reduce the likelihood of P0171:
    • Replace air filters on schedule; a dirty filter can affect airflow and fuel trims.
    • Use good-quality gasoline and avoid frequent short trips that don’t fully warm the engine.
    • Inspect and replace cracked vacuum hoses and PCV hoses as part of routine maintenance.
    • Keep the MAF sensor clean; avoid oil or ad-blur sprays that can contaminate it.
    • Periodically inspect EVAP system hoses and the fuel cap seal to prevent EVAP leaks.
    • If you notice rough idle or reduced performance, address it promptly to prevent progression to a lean condition.
    • Ensure ignition system (spark plugs, coils) is in good condition so misfires don’t confound lean diagnostics.
  • Proactive diagnostics:
    • If LTFT starts trending high on one bank, preemptively check for vacuum leaks or sensor faults before a MIL triggers.

Final notes

  • The data provided here reflects the stated NHTSA data (No recalls found) for 2017–2023 Subaru Impreza and no owner complaints for this issue in the available dataset. That means real-world occurrences may be underrepresented in this data, and other sources (customer experiences, independent shops) may reveal different patterns.
  • Always corroborate code-based diagnosis with live data, mechanical inspection, and, when needed, professional fuel-system testing. If the vehicle is under warranty or extended coverage, consult the dealer for coverage of sensors, valves, or gasket replacements that fall under warranty terms.

Frequently Asked Questions

The 2017-2023 Subaru Impreza has several known issues that vary by model year. See our detailed guide for specific problems, causes, and repair costs.

Vehicle Info

MakeSubaru
ModelImpreza
Years2017-2023

DISCLAIMER: This information is for educational purposes only. MechanicGPT is not a licensed mechanic. Always consult a certified mechanic for diagnosis and repair. Improper repairs can be dangerous.