P0304 OBD-II Diagnostic Guide for 2017-2023 BMW 5-Series
Data note and limitations
- REAL NHTSA DATA FOR BMW 5-Series (2017-2023): OWNER COMPLAINTS — No NHTSA complaints found for this make/model/year/issue combination.
- OFFICIAL RECALLS — No recalls found in NHTSA database.
- No recalls found in NHTSA database.
- This guide uses general automotive knowledge for technical explanations and is not model-specific to a single engine type within the 2017–2023 5-Series lineup. If you own a specific engine (e.g., B46/B48 4-cyl, B58, N55, N63, etc.), some symptoms and service procedures will map more directly to that powertrain.
CODE MEANING AND SEVERITY
- What the code means: P0304 is a cylinder 4 misfire detected by the engine control module (ECM/PCM). The engine is not firing properly on cylinder 4, causing unburned fuel to enter the exhaust.
- Severity: Moderate to high. A continued misfire can cause rough idle, reduced power, and elevated emissions. If left untreated, repeated misfires can damage the catalytic converter and exhaust system, and may lead to catalytic overheating or further engine wear.
- What typically triggers a reset to “no fault” after clearance: intermittent wiring, dirt on the coil boot, or temporary misfire conditions that disappear during a drive cycle. Sustained misfires will usually return the fault if the underlying issue persists.
COMMON CAUSES ON BMW 5-SERIES
BMW 5-Series vehicles in the 2017–2023 window use several coil-on-plug ignition configurations and various inline-6 and V8 engines. For cylinder 4 misfire, common causes include:
Ignition system
- Faulty spark plug on cylinder 4 (worn, fouled, oil-fouled, or incorrect heat range).
- Faulty ignition coil for cylinder 4 (coil-on-plug; cracked coil boot or weakened secondary winding).
- Wiring/connector problems to the coil or spark plug (corrosion, damaged pins, loose connection).
Fuel delivery
- Faulty or dirty fuel injector for cylinder 4 (sticking, not opening properly, or leaking).
- Low fuel pressure or fuel pump issues affecting cylinder 4’s injector supply.
- Contaminated fuel or clogged fuel rail affecting cylinder 4.
Air and intake
- Vacuum leak around cylinder 4 intake path (PCV hoses, gasket leaks, cracked intake manifold, or loose clamps).
- Mass Air Flow (MAF) sensor or MAP sensor issues causing incorrect air-fuel mixture.
Mechanical and compression
- Low compression in cylinder 4 due to valve/seal issues, burnt valve, piston ring wear, or head gasket problem.
- Timing-related issues (cam/crank synchronization) are less common but possible in rare scenarios.
Other
- Electrical noise or a faulty engine control module can occasionally contribute to a misfire diagnosis.
- Oil fouling from a bad valve cover gasket or excessive oil consumption can contaminate a plug in some BMWs.
SYMPTOMS YOU MAY NOTICE
- Rough idle or vibrating engine at idle.
- Noticeable reduction in power and acceleration when driving (especially under load).
- Engine may feel like it’s running on fewer cylinders; occasional hesitation or stumble during throttle input.
- Check Engine Light (CEL) with P0304 stored and possibly other P030x codes.
- Misfire may be more pronounced at certain temperatures or after engine load changes.
- Secondary symptoms could include increased fuel consumption or mild roughness during gear shifts.
DIAGNOSTIC STEPS (SYSTEMATIC APPROACH)
Note: This is a practical, step-by-step approach. Some steps require a BMW-compatible scan tool (e.g., ISTA, INPA, BimmerCode with appropriate hardware, or a capable OBD2 scanner with BMW enhancements).
Step 1: Confirm and contextualize
- Use an advanced OBD-II scanner to confirm P0304 and check freeze-frame data (engine load, RPM, coolant temp, fuel trims, misfire counters).
- Note any additional related codes (P0300, P0301, P0302, P0303, P0305, etc.). If many cylinders show misfires, look for a common cause (vacuum leak, fuel pressure issue, or ECM problem).
Step 2: Inspect ignition components on cylinder 4
- Remove and inspect the spark plug on cylinder 4: look for wear, fouling, oil/fuel deposits, or damage. Replace if needed with the correct BMW plug and torque spec.
- Inspect the ignition coil for cylinder 4: check for cracks, moisture, or heat damage. Check the coil boot for cracks or signs of arcing. Consider swapping the 4th coil with another cylinder’s coil to see if the misfire follows the coil (diagnostic swap test).
- If available, test coil coil primary/secondary resistance and verify proper operation using manufacturer specifications.
Step 3: Inspect the fuel system for cylinder 4
- Check injector 4 operation: listen for a clicking injector, test electrical resistance, and verify consistent injector pulse width on cylinder 4 with a BMW-compatible scan tool.
- If injector is sticking or not opening, consider cleaning or replacing the injector. Compare with other cylinders’ injector behavior.
- Check overall fuel pressure with a high-pressure fuel rail gauge. Ensure rail pressure is within spec for the engine family and look for pump/regulator issues or a failing fuel filter.
Step 4: Check for air intake and vacuum issues
- Inspect PCV system hoses and connections around the intake manifold and cylinder 4 path for leaks or disconnections.
- Inspect intake manifold gaskets, vacuum hoses, and the TB/throttle body area for leaks.
- Check MAF and MAP sensor readings; abnormal readings can contribute to misfire symptoms by creating an incorrect air-fuel mixture.
Step 5: Check compression and mechanical health
- Perform a compression test on cylinder 4 and surrounding cylinders for comparison.
- If compression is low, identify mechanical causes (valve seat, piston rings, head gasket) and consider leak-down testing for precise diagnosis.
- If timing is suspect (rare for a misfire-only symptom), verify cam/crank timing with the appropriate BMW service tooling.
Step 6: System-level and software considerations
- Ensure battery health is adequate; weak battery can cause misfires or misinterpretation by the ECU during cranking.
- Software/ECU: Ensure the vehicle has the latest available software for fuel and ignition timing as recommended by BMW. Note: This is a general maintenance consideration and not a cited recall/TSB reference.
Step 7: Decision point and actions
- If the misfire clearly follows the spark plug or coil in the cylinder 4 path (swap test results), replace the faulty component(s) and re-run the test.
- If fuel injector is the culprit, replace or service the injector and retest.
- If compression is low or mechanical issues are found, plan for appropriate repair (valve work, piston/seal work, or head gasket) and re-test.
- After any repair, clear codes and perform a road test under varying loads to verify no recurring misfire.
RELATED CODES
- Primary related codes: P0300 (random/multiple misfires), P0301 (cylinder 1 misfire), P0302 (cylinder 2 misfire), P0303 (cylinder 3 misfire), P0305–P0308 (cylinders 5–8 misfire) depending on engine size.
- Supporting/diagnostic codes that may appear with a misfire: P0171/P0174 (fuel trim limits/lean/balance), P0304 often appears with misfire-related fuel trim or oxygen sensor codes if there’s ongoing combustion issues.
- Cylinder-specific context: P0304 is specifically for cylinder 4, but misfires can cascade to other sensors and oxygen trims, so review related fuel and air system codes when diagnosing.
REPAIR OPTIONS AND COSTS (2025 PRICES)
Note: Prices vary by engine configuration (4-, 6-, or 8-cylinder), local labor rates, and whether work is done at a dealer vs. independent shop. The ranges below are typical U.S. market ranges as of 2025 and assume parts are OEM or equivalent.
Spark plug replacement (cylinder 4, part of a typical inline-6 or V-series BMW engine)
- Parts: $15–$40 per plug (BMW direct-injection engines often use specific plugs; cost varies by heat range and coil compatibility)
- Labor: 0.5–2.0 hours depending on engine layout and access
- Total ballpark: $120–$350
Ignition coil replacement (cylinder 4)
- Parts: $60–$125 per coil
- Labor: 0.5–1.0 hour if coil is readily accessible; 1.5–2.5 hours if intake manifold removal or more extensive access is required
- Total ballpark: $120–$350 (per coil)
Fuel injector replacement or cleaning (cylinder 4)
- Parts: $100–$350 for a new injector
- Labor: 0.5–1.5 hours
- Total ballpark: $200–$700
Fuel system service (high-pressure fuel pump related issues, cleaning, or regulator work)
- Parts: 0–$500 depending on component
- Labor: 1–3 hours
- Total ballpark: $150–$1,500
Vacuum/PCV system repair
- Parts: $20–$150 for hoses and gaskets
- Labor: 0.5–1.5 hours
- Total ballpark: $80–$350
Mechanical/low-compression repair (valve, piston, head gasket)
- Parts: highly engine-dependent; could be substantial
- Labor: 6–20+ hours depending on scope
- Total ballpark: $1,000–$4,000+ (major repair)
Diagnostics and shop fees
- Diagnostics charge ranges: $100–$150 (some shops waive with repair)
- Combined with repairs, some shops may charge a diagnostic fee that is credited toward the repair bill
Notes:
- These ranges are rough estimates intended to help with budgeting. Actual prices depend on your exact engine code (e.g., B46/B48, B58, N55, N63, etc.), access complexity, and local labor rates. Dealers often quote higher labor rates than independent shops.
- On many BMWs, cylinder 4 access may require removal of the intake manifold or other components, increasing both parts accessibility and labor time. This can push costs toward the upper end of the ranges above, especially for coil and injector work.
DIY VS PROFESSIONAL
- DIY feasibility
- Spark plugs and ignition coils are common DIY tasks on many BMW engines, particularly if you have the right tools (torque wrench, basic hand tools, appropriate BMW plug sockets).
- Cylinder 4 injector or coil replacement is doable for experienced DIYers, but may require extra time on engines with restricted clearance or integrated intake manifolds.
Safety considerations: disconnect the battery before working, avoid high-voltage coil disassembly without proper procedure, and follow BMW-recommended torque specs to avoid thread damage or mis-seating plugs.
- When to call a professional
- If you are seeing persistent P0304 after replacing plugs/coils, or you suspect a mechanical issue (low compression, valve issue, timing problem), a professional diagnosis is advised.
- If the job requires special tools or BMW software (ISTA, OEM data, precise fuel trim analysis), a dealership or experienced independent shop is recommended.
- If you’re not comfortable with high-pressure fuel system work or injector testing, seek professional help to avoid safety hazards and ensure accurate diagnosis.
PREVENTION
- Regular maintenance aligned with BMW service intervals, including:
- Spark plug replacement at the recommended intervals for your engine (often every 60,000 to 100,000 miles depending on model and driving style).
- Coil-on-plug replacement or inspection at recommended intervals or if signs of weakness appear (rough idle, misfires, or trouble starting).
- Fuel system care: use high-quality fuel, consider periodic fuel system cleaning if recommended for your engine, and address contaminated fuel promptly.
- PCV system and vacuum hoses: inspect for leaks and cracks; replace hoses as subject to wear.
- Air intake and MAF/MAP sensors: keep sensors clean and free of contamination to prevent oscillating air-fuel mixtures.
- Monitor for oil leaks around the valve cover gasket (oil fouling can contaminate plugs in some BMW engines); fix leaks promptly.
- Pay attention to torque specs and proper fastener installation when performing any ignition or fuel system work to avoid mis-seating components.
Conclusion
P0304 indicates a misfire in cylinder 4. Because misfires can arise from ignition, fuel, air, or mechanical issues, a systematic diagnostic approach is essential. The data you provided shows no recalls or owner complaints specific to this code for 2017–2023 BMW 5-Series in NHTSA records, so treat this as a general misfire diagnosis rather than a model-wide service bulletin. If you follow the diagnostic steps above and verify the faulty component, you can typically restore proper engine function without unnecessary replacement. If the problem persists after the basics (spark plug and coil) are addressed, pursue deeper diagnostics (injector, compression, or mechanical issues) with a qualified technician to protect against longer-term damage.