What Does P0040 Mean?
The ECM has determined that the Bank 1 Sensor 1 and Bank 2 Sensor 1 (upstream) oxygen sensor signals are swapped. This means the wiring connections for the two pre-catalytic converter O2 sensors have been crossed, so the ECM receives Bank 1 data from Bank 2 and vice versa. This causes incorrect fuel trim adjustments for each bank, leading to one bank running rich and the other lean. The driver may notice poor fuel economy, rough running, or a persistent Check Engine Light.
Common Causes
45%
O2 sensor connectors plugged into the wrong harness after a repair
25%
Wiring crossed during a harness repair or aftermarket installation
20%
Incorrect O2 sensor placement (sensors installed in wrong bank locations)
10%
ECM software error or calibration issue after reflash
Diagnostic Steps
1
Review recent repair history. This code almost always follows O2 sensor replacement, exhaust work, or engine work where sensor connectors were disconnected. Identify if any recent service could have crossed the connections.
2
With the engine running, monitor Bank 1 Sensor 1 and Bank 2 Sensor 1 O2 voltages simultaneously. Induce a lean condition on one bank (e.g., by pulling a vacuum hose on Bank 1) and verify the correct sensor responds — if the Bank 2 sensor responds instead, the sensors are swapped.
3
Physically trace the wiring from each upstream O2 sensor to its connector. Verify that the sensor physically located in the Bank 1 exhaust manifold connects to the Bank 1 harness connector, and Bank 2 to Bank 2.
4
If sensor placement is correct, check for crossed wires at any repair splice points or aftermarket wiring modifications. The sensor signal wires may have been crossed during a repair.
5
After correcting the swap, clear codes, drive through two warm-up cycles, and verify fuel trims normalize on both banks (long-term fuel trim within +/- 5%).
Estimated Repair Cost
$50 - $200
Parts + labor, varies by vehicle and location
The ECM has determined that the Bank 1 Sensor 1 and Bank 2 Sensor 1 (upstream) oxygen sensor signals are swapped. This means the wiring connections for the two pre-catalytic converter O2 sensors have been crossed, so the ECM receives Bank 1 data from Bank 2 and vice versa. This causes incorrect fuel...
The most common cause of P0040 (Oxygen Sensor Signals Swapped Bank 1 Sensor 1 / Bank 2 Sensor 1) is: O2 sensor connectors plugged into the wrong harness after a repair
Typical repair costs for P0040 range from $50 to $200, depending on the vehicle, location, and whether you do it yourself or go to a shop.
The vehicle can be driven, but fuel mixture will be incorrect on both banks — one running rich and one running lean. Prolonged driving with swapped signals can damage catalytic converters (rich bank) and may cause misfires on the lean bank. Correct as soon as possible to prevent converter damage.
Start by connecting an OBD2 scanner to read the code and any freeze frame data. Then follow the diagnostic steps specific to P0040 to identify the root cause.
OBDHut Mobile App
Scan codes directly from your car with the OBDHut app.
Coming Soon
Quick Info
Category
Powertrain
System
Fuel System / Emissions
Difficulty
Type
Generic (SAE)
Recommended Tools
OBD2 Scanner
A quality scan tool helps you read codes, view live data, and clear faults.