What a crankshaft sensor does and why it fails
A crankshaft sensor reads the position and speed of your engine's crankshaft and sends that data to the engine control computer. The computer uses this information to time the fuel injection and ignition precisely. When the sensor fails, your engine cannot fire at the right moment, so you get a rough idle, poor fuel economy, hard starting, or a check engine light.
Crankshaft sensors fail because they sit near heat and vibration. The sensor itself is a small magnetic or Hall-effect device mounted on the engine block, usually near the crankshaft pulley or inside the timing cover. Over time—typically 80,000 to 150,000 miles, though this varies by vehicle—the internal electronics degrade or the connector corrodes, and the sensor stops sending a clean signal.
You will know replacement is necessary when the check engine light comes on and a code reader shows a crankshaft position sensor fault (codes P0335, P0336, P0337, or similar). A mechanic can confirm this with a multimeter test, but if the code points to the crankshaft sensor and your symptoms match, replacement is almost always the answer.
Key Takeaways
- The crankshaft sensor mounts on the engine block near the crankshaft pulley or inside the timing cover, and replacement usually takes one to three hours depending on engine layout.
- You will need the correct sensor for your vehicle year, make, and model, a socket set, a wrench, a screwdriver, and sometimes a gasket scraper and new gasket material.
- The hardest part is usually access—some sensors require removing the timing cover, harmonic balancer, or other engine components first.
- Disconnecting the battery before you start prevents accidental short circuits, and clearing the check engine code after replacement confirms the repair worked.
Gather the right sensor and tools before you start
Order the correct crankshaft sensor for your vehicle. The sensor type and location vary widely: some vehicles have one sensor, others have two. Go to an auto parts store with your vehicle identification number (VIN) or your year, make, model, and engine size, and the parts counter will pull the exact sensor you need. Expect to pay $40 to $150 for the sensor itself, depending on the vehicle.
Collect your tools: a socket set and ratchet, an open-end wrench, a Phillips or flathead screwdriver (whichever your sensor mounting bolts use), a gasket scraper or old credit card, and a clean rag. Some sensors sit in a cavity that needs a gasket or seal; check your parts receipt or the sensor packaging to see if one comes with the sensor or if you need to buy it separately. You will also want a multimeter if you want to test the old sensor before removing it, though this is optional.
Park on a level surface and let the engine cool completely. Disconnect the negative battery terminal using a wrench—this prevents accidental electrical shorts while you work. Wait five minutes for the engine computer to power down fully.
Locate the sensor and remove what is in the way
Open your hood and locate the crankshaft sensor. On most vehicles, it sits near the crankshaft pulley at the front of the engine, or inside the timing cover. Your vehicle's service manual will show the exact location; if you do not have one, search online for "[your year, make, model] crankshaft sensor location" and you will find diagrams and photos from other owners.
Some sensors are accessible when ready. Others require removing the harmonic balancer (the large wheel on the front of the crankshaft), the timing cover, or the serpentine belt. If your sensor is buried, you may need a harmonic balancer puller—a specialized tool that costs $30 to $50 to buy or rent from an auto parts store. If removal looks complex, this is the point to decide whether to do the work yourself or take the vehicle to a mechanic.
Once you have clear access, unplug the electrical connector from the sensor by squeezing the tab or clip and pulling straight back. Take a photo of the connector orientation so you can plug the new one in the same way. Remove the mounting bolt or bolts holding the sensor to the engine block using your socket set or wrench. The sensor will come free in your hand.
Install the new sensor and reassemble
Before you install the new sensor, check whether the mounting cavity has an old gasket or seal stuck to it. If it does, scrape it off gently with a gasket scraper or old credit card so the new sensor sits flush. Wipe the cavity clean with a rag.
If your new sensor came with a gasket or O-ring, install it now. Some sensors have the gasket pre-installed; others require you to place it in the cavity first. Check the packaging or instructions that came with the sensor.
Position the new sensor in the mounting hole and hand-tighten the bolt or bolts first. Once you are sure the sensor is seated correctly, tighten the bolts with your socket set or wrench. Do not over-tighten—these bolts are usually small and can strip easily. Tighten until snug, then stop.
Plug the electrical connector back into the new sensor, making sure it clicks into place. Reassemble any components you removed to reach the sensor: reinstall the timing cover, harmonic balancer, or serpentine belt in reverse order. Reconnect the negative battery terminal.
Start the engine and clear the check engine light
Turn the ignition to the on position (do not start yet) and listen for the fuel pump to prime—you will hear a brief whirring sound. Then start the engine and let it idle for 30 seconds. The engine should start smoothly and idle without rough shaking. If it does, the replacement worked.
The check engine light may stay on for a few minutes while the computer runs its self-test. If it goes out on its own, you are done. If it stays on after five minutes of driving, the code needs to be cleared manually. You can do this yourself with a code reader (available at auto parts stores for $25 to $60, or free if you borrow one) by connecting it to the diagnostic port under the steering wheel and selecting "clear codes." Alternatively, a mechanic or auto parts store can clear it for you.
Drive the vehicle for 10 to 15 minutes at normal speeds so the computer can relearn engine parameters. If the check engine light does not return, the sensor replacement is complete.
What to do if the new sensor does not fix the problem
If the check engine light returns with the same crankshaft sensor code after replacement, the new sensor may be defective, or the wiring harness or connector may be damaged. Inspect the connector pins for corrosion or bent contacts. If the connector looks corroded, clean it with electrical contact cleaner and a small brush, then try again.
If the connector is damaged or the wiring is broken, you will need to repair or replace the harness. This is more involved and usually requires a mechanic. If the new sensor itself is defective, return it to the parts store for a warranty replacement.
If the light comes back with a different code, the original problem may have been masking a second issue—for example, a bad fuel injector or ignition coil. A code reader will tell you which code is now showing, and you can address that separately.
When to take the vehicle to a mechanic instead
If the sensor is buried under the harmonic balancer or timing cover and you do not have the specialized tools or experience to remove them safely, a mechanic is the faster choice. Harmonic balancer removal requires a puller, and timing cover removal can expose you to coolant and other fluids if you are not careful.
If you do not have a code reader and cannot borrow one, a mechanic can confirm the sensor is the problem before you buy parts. If the check engine light returns after your replacement and you cannot diagnose why, a mechanic with a full diagnostic scanner can pinpoint the issue faster than trial and error.
A shop will typically charge $150 to $400 for crankshaft sensor replacement, depending on the vehicle and how buried the sensor is. If the sensor is straightforward to reach, doing it yourself saves most of that labor cost. If it requires removing the harmonic balancer or timing cover, the labor savings may not be worth the time and risk.
Frequently Asked Questions
How do I know if my crankshaft sensor is bad before I replace it?
A code reader will show a crankshaft position sensor fault code (P0335 or similar). You can also test the sensor with a multimeter before removal: disconnect the connector and measure the resistance across the sensor terminals. A good sensor usually reads between 200 and 900 ohms, depending on the type. If the reading is zero or infinite, the sensor is dead.
Can I drive with a bad crankshaft sensor?
You can drive short distances, but the engine will run rough, start hard, and use more fuel. Some vehicles will not start at all if the sensor fails completely. Do not drive long distances or on the highway—the engine may stall without warning.
Do I need to clear the check engine code myself, or will it go away?
The code will not clear on its own. You must use a code reader to clear it, or take the vehicle to a mechanic or auto parts store. Some auto parts stores clear codes for free as a service.
What if I install the sensor backwards or upside down?
The sensor will not fit into the mounting hole if it is oriented wrong, so you will notice when ready. The connector also only plugs in one way, so you cannot make that mistake either. Take your time seating the sensor and you will not have this problem.
How long does a new crankshaft sensor last?
A quality replacement sensor should last 80,000 to 150,000 miles, the same as the original. If you buy a cheap aftermarket sensor, it may fail sooner. OEM (original equipment manufacturer) sensors and well-reviewed aftermarket brands are more reliable.