Mazda Crankshaft Position Sensor Replacement Guide
The crankshaft position sensor on most Mazdas sits at the same end of the engine as the serpentine belt, behind a loom held by plastic clips and 8 or 10 mm nuts depending on the model. The symptom that points at this sensor rather than at fuel or ignition is an engine that cranks at normal speed and never fires.
At a Glance
- Symptoms: no start, intermittent starting, stalling when hot and codes such as P0335.
- Mark the old sensor’s position before removing it. Its mounting holes are slotted, and the new one must sit in the same place.
- Check for oil first. An oil soaked connector causes the same symptoms as a failed sensor.
- Buy by the part number stamped on the old sensor. Mazda used several versions.
- Confirm the fault with live data before buying a sensor. Watch engine speed while cranking: zero means no crank signal. No i-stop relearn is needed here. Only disconnecting the battery triggers the i-stop battery condition initialization. And if your code is P1336, that points at a stretched timing chain rather than this sensor. A scanner such as the YOUCANIC UCAN-II Pro confirms the new sensor with live crank and cam data.
A problem that may cause no-start problems on a Mazda or lead to the engine running rough is a failed crankshaft position sensor. A Mazda crankshaft position sensor (CPS) monitors the position and rotation speed of the crankshaft.
Symptoms
Common symptoms of a bad Mazda crankshaft position sensor include:
🔧 Find out what is actually wrong before you pay someone to guess
Dealer level diagnostics at home with the YOUCANIC UCAN-II Pro.
- ✔ Covers most makes and models, including many luxury brands. Send us your VIN and we will confirm your car before you order
- ✔ Reads every module, not just the engine, so you find the faults a basic reader says are not there
- ✔ Commands the car: test a fan or pump, bleed ABS, retract an electronic parking brake, register a battery
- ✔ No subscriptions. Free lifetime updates, so the price you pay is the whole price
- ✔ Backed by real mechanics in the USA you can email before and after you buy
Featured in The Wall Street Journal
- Mazda won’t start
- Intermittent Starting
- Check Engine Light On
- Mazda cranks but won’t start.
- Engine idles rough
- Fault Codes: P0335, P0017, P0016
These symptoms may be intermittent in some cases. That makes a bad crankshaft position sensor hard to diagnose, especially if the check engine light has not come on.
Follow these steps to change the crankshaft position sensor on a Mazda.
You will need
- Mazda Crankshaft Position Sensor
- Jack Stands
- Vehicle Jack
- Mechanic Toolset Metric
Procedure
- Park your Mazda on level ground. Engage the parking brake. Let the engine cool down.
- Jack up the front right (passenger) side wheel. The CPS sensor is located on the same side where you have the serpentine belt. It is not on the transmission side.

- Remove the front wheel. Secure your vehicle with a good set of jack stands and block a tire so your car doesn’t roll.

- Remove the plastic wheel well liner. It is held with several plastic clips, 8mm or 10 mm nuts, depending on the Mazda model.
- Locate the crankshaft position sensor.
- Unplug the electrical connector.

- Remove the two 8mm bolts that hold the sensor.

- Before removing the old crankshaft position sensor, mark the old sensor’s exact position with a marker. You need to install the new CPS sensor in the same location.

- Install a new crankshaft position sensor on your Mazda engine block. Notice that the mounting holes are not round but oval. This allows the sensor to be moved slightly.
- Before you tighten the screws, make sure that the new sensor is in the same location as the old one.
Notes
- Use the bolt in the crankshaft center to turn the engine until cylinder 1 hits Top Dead Center (TDC) on the compression stroke.

- You will need to align the fifth tooth to the center of the sensor magnetic tip.

- Check with your Mazda dealer, as these instructions may vary between different 2.0, 2.3, and 2.5 Mazda engine sizes.
If the crank sensor fails on your Mazda, your car will refuse to start intermittently.
Related Problems
Fuel Pump
- If your Mazda is not starting, it is possible that the fuel pump has failed or is not generating enough pressure.
Ignition System
- Spark plugs and ignition coils can also be effective and could be another reason your Mazda does not start.
Check Engine Still On

If the check engine light is still on after replacing the crankshaft position sensor, the stored code needs clearing and then the car needs watching to see whether it returns. That distinction matters: a code that comes straight back is a live fault, while one that stays away was simply history. Reading live crankshaft and camshaft signal data while cranking is what separates the two, because it shows whether the module is actually seeing a signal. A tool that reads the engine module properly, such as the YOUCANIC UCAN-II Pro, gives you both the clear and the live data rather than just switching the light off.
Check the sensor for oil before replacing it
This sensor sits low on the engine, close to the timing cover and the oil pan, which puts it directly in the path of any oil leaking from the seals above it. Oil soaks the sensor body, wicks along the inside of the harness and collects in the connector, and the resulting signal faults come and go in a way that looks exactly like a failing sensor.
When you pull the old one out, look at it. If it is wet with oil, clean the connector properly and find where the oil is coming from, because a new sensor fitted into the same oil bath will be back in the same condition before long. Check the connector pins for the green discolouration that follows oil contamination, and replace the sensor O ring rather than reusing it.
While the sensor is out, look at the toothed trigger wheel it reads. A chipped, bent or rust damaged tooth produces a gap in the signal that the module interprets as a fault, and no replacement sensor will fix that. Debris stuck magnetically to the sensor tip does the same thing and wipes off in seconds.
Fit a sensor made for the car
This is one of the components where the cheapest option is a false economy. Crankshaft position sensors have to produce a clean signal at everything from cranking speed to redline and at every temperature in between, and budget copies are a well known source of exactly the intermittent stalling you were trying to cure. A sensor from the vehicle manufacturer or a recognized original equipment supplier costs more and saves doing the job twice.
Buy against the part number stamped on the old sensor rather than by model name. Mazda used several variants across engines and model years, and they are not interchangeable even where the plug looks identical.
i-stop: what actually needs relearning
Mazda’s documented procedure here is the battery condition initialization setting, and what triggers it is disconnecting the battery, not replacing the crankshaft sensor. Mazda service information lists no i-stop relearn tied to crank sensor replacement. If you disconnect the negative terminal to do this job, that disconnection is what puts i-stop to sleep, and the sensor work itself is not the cause.
The procedure teaches the PCM the battery’s state of charge through the current sensor. Mazda requires the BATT_SOC value to read 75 percent or higher before you begin, and once the battery has been reconnected it needs somewhere between 6 and 48 hours to settle before that figure means anything. On SKYACTIV-G engines an idle air control learning step follows, carried out by bringing the engine to full operating temperature with the lights, climate control and rear defogger switched off.
The symptom when this has been skipped is a car that drives perfectly while i-stop never activates again. Owners generally blame the battery, or assume something went wrong during the sensor replacement. It is neither.
Where a scan tool earns its place on this particular job is verification rather than any relearn. Reading live crankshaft and camshaft signal data while the engine cranks shows whether the new sensor is producing a clean output, and clearing the stored code deliberately rather than waiting for it to drop out tells you whether the fault was live or merely history.
Do not replace the sensor for P1336
If the code you are chasing is P1336, stop before buying a sensor. Mazda defines P1336 as a CKP sensor and CMP sensor malfunction, and the way the PCM sets it is by watching the phase difference between the crankshaft and camshaft position sensors. Once that difference passes the specified value, the PCM concludes that the timing chain has stretched.
On the SKYACTIV-D 2.2 the only cause Mazda lists for this code is a stretched timing chain. On the 1.5 the list is wider and takes in a dirty crank sensor, a damaged pulse wheel, connector and terminal faults at either sensor or at the PCM, and incorrect valve timing. Either way, P1336 is a timing complaint rather than a sensor complaint, and fitting a crankshaft sensor to make it go away is how a chain job becomes a chain job plus a wasted part.
One detail catches people out: Mazda states that the check engine light does not illuminate for P1336. The code sits in memory while the car appears to behave normally, which is why it usually surfaces during a scan carried out for some other reason. Finding it that way is a reason to inspect the chain, not a reason to dismiss it.
These definitions come from Mazda service information for the SKYACTIV-D 1.5 and 2.2 diesel engines. If your car has a gasoline SKYACTIV-G engine, confirm the code definition for that engine before acting on it, because codes in the P13xx range are manufacturer specific and do not always carry across engine families.
What to do next: confirm it before you buy the sensor
Knowing that a crankshaft position sensor can cause a no start does not tell you whether yours has failed. This is the fault people pay for twice, because the sensor that strands you tests perfectly on a bench and perfectly on a cold engine. The only thing that settles it is watching the signal disappear while the engine cranks.
- Connect a scanner that reads the engine module and open live data.
- Put engine speed and the camshaft sensor signal on screen together.
- Have a helper crank the engine while you watch. A healthy sensor produces an immediate, steady engine speed figure the moment the starter turns.
- Zero engine speed while cranking means the module is seeing no crank signal at all. That points at the sensor, its connector or its wiring, and rules out fuel and ignition as your starting point.
- Test it when the fault is present. If your Mazda only fails hot, a cold test proves nothing. Drive it until it stalls, then test it where it sits.
- After fitting the new sensor, clear the stored code deliberately rather than waiting for it to drop out, then watch whether it returns. A code that comes straight back is a live fault. One that stays away was history.
The YOUCANIC UCAN-II Pro reads the engine module live data described above and clears the codes afterwards, and it is also available as a seven day rental if this is a one off job. Coverage varies by model and year, so email support with your VIN before ordering and we will confirm your car first.
When you do not need a scan tool for this
If the engine starts and runs normally and you only want to read a stored code, a basic code reader is enough, and most large United States parts chains lend one free. Use that instead.
And if the code you are chasing is P1336, no scan tool changes the outcome. That is a timing chain complaint rather than a sensor complaint, as covered above, and fitting a crankshaft sensor to clear it is how people spend money twice.
What the job costs
This is one of the better value repairs on the car. An aftermarket crankshaft position sensor for a Mazda typically runs between thirty and ninety dollars, with a genuine Mazda part usually in the one hundred to one hundred and fifty range. Access varies considerably by engine: on some the sensor is reachable in twenty minutes, on others the intake or an engine mount has to come out of the way first, so independent shop labor ranges from half an hour to a couple of hours. All in, most owners are looking at somewhere between one hundred and fifty and three hundred and fifty dollars at a shop, and well under a hundred doing it themselves.
The expensive mistake is not the part
An intermittent no-start is one of the most commonly misdiagnosed faults there is, and the crank sensor gets blamed for a lot of problems that turn out to be a fuel pump, an ignition switch, a bad ground or a failing immobilizer. Because the symptom comes and goes, people replace parts in sequence until it stops, which is how a hundred dollar repair becomes six hundred. Confirming the sensor has actually stopped producing a signal before you buy anything is the single thing that keeps this cheap.
When to stop
If the new sensor has not fixed it, resist fitting a second one. Go back to the basics: check the sensor connector and its wiring for oil contamination and chafing, check that the trigger wheel teeth are intact, and verify you have fuel pressure and spark while the fault is present. A no-start that persists through a known good sensor and a clean signal is a different problem, and on a car that has already had parts thrown at it, a proper diagnosis is cheaper than continuing to guess.
Frequently Asked Questions
Can a bad crankshaft position sensor cause a no start on a Mazda?
Yes. Without a crank signal the engine computer cannot time the spark and fuel, so the engine may crank but not start, or stall once it warms up.
What code does a failed Mazda crank sensor set?
P0335 is the most common code for a crankshaft position sensor circuit fault. Read the codes before buying parts, since cam sensor faults can look similar.
Do I need to do anything after replacing the sensor?
Clear the codes and take a test drive. If the check engine light returns, check the wiring and connector at the sensor for oil or damage.









My 02 mazda 626 lx won’t start …got spark..interesting. No power at crank position sensor got ground .ck fuses and relays are good ..i even put the ecm opened nothing burned..vehicle has 141000 miles
I PURCHASED A 2003 MAZDA 3 WITH A 3.0L IN IT. THE SELLER TOLD ME THE ENGINE CODE WAS FOR A CAM SENSOR. I BOUGHT THE CAR AND FOUND THAT THE ENGINE HAS BEEN REPLACED WITH A NEWER YEAR ENGINE. THE PROBLEM IS THAT THE NEW ENGINE HAS ONLY ONE CAM SENSOR. THE 2003 CAME WITH TWO CAM SENSORS. HOW DO I WIRE IT?