Engine code
P0340: Camshaft position sensor circuit fault
How much to fix P0340? Typically $100–$340.
How this range is built
| Part of the job | Low | High |
|---|---|---|
| Parts | $35 | $120 |
| Labor: 0.6 to 1.3 hours × $110 to $150 an hour | $66 | $195 |
| Fees: shop supplies, disposal, diagnostics | $0 | $20 |
| Total, rounded | $100 | $340 |
The hourly rate is the BLS Occupational Employment and Wage Statistics, May 2025 average pay for this trade in the US, $27.13 an hour, times 4 to 5.5 to cover what a shop bills (overhead, tools, insurance, profit). Parts are a band from budget aftermarket to the manufacturer part. Full method.
Not a repair shop, estimates only. Typical range, estimate. Not a quote. Your car, parts and shop change the number.
This is the range for the most common fix, camshaft position sensor replacement. Which repair your car needs depends on a proper diagnosis.
The camshaft position sensor tells the computer which stroke each cylinder is on so it can time the injectors and spark. For this code the signal is missing or garbled. Some cars start and run anyway using the crank sensor alone, while others stall or refuse to start.
- Safe to drive?
- Short trips only
- Most common cause
- Failed camshaft position sensor
It may run on a backup mode, but could stall or not restart, so avoid long trips.
Get quotes from local shops
Got P0340? Tell us your ZIP and a shop near you can quote the repair. Free, takes a minute.
Fair Price is not a contractor or a repair shop. Who sees your request
What you may notice
- Hard starting or long cranking
- Stalling at stops or while driving
- Rough running or hesitation
- Limp mode with limited power
Common causes, most likely first
- Failed camshaft position sensor
- Broken or chafed wire
- Oil-soaked connector
- Timing chain wear
- Computer fault
Check this first
Unplug and look at the camshaft sensor connector for oil, bent pins or a loose latch. Oil leaking from a valve cover can soak the plug, and cleaning it with electrical cleaner sometimes fixes the signal.
Other repairs that sometimes fix P0340
| Repair | Typical range, US |
|---|---|
| Crankshaft position sensor replacement | $110 to $360 |
| Timing chain replacement | $1,125 to $2,550 |
| Diagnostic scan (check engine light) | $55 to $250 |
Before you pay
- Ask the shop what test showed this part is the cause, not just that the code appeared.
- Ask for parts and labor listed separately, and for the hours.
- Ask for a written OK before any extra work. Many states require written authorization before repairs.
Got a quote already? Check it against the range. Want to see if your car has a recall tied to this problem? Check recalls by VIN.
Need to read a code yourself? OBD-II scanners on eBay (affiliate link, disclosure).
P0340 questions
What does the cam sensor do?
It reports the camshaft's position so the computer knows when each cylinder is on its intake or power stroke. With that, it can fire each injector and spark plug at the right moment.
Can the car restart if it stalls?
Often yes, after it sits for a few minutes, because the sensor may work again once it cools. But it can stall again with no warning, which is risky in traffic, so do not rely on a restart.
Is the sensor costly?
The part is usually a modest price. Labor depends on where it sits, since some are on top of the engine and easy, while others are behind the timing cover and take longer.
How much does it cost to fix P0340?
The most common fix, camshaft position sensor replacement, has a typical range of $100 to $340 across the US. It is an estimate built from parts prices and local labor wages, not a quote. Your car and shop change it.
Typical range in 10 metro areas
Only the labor rate changes between cities. Same parts, same hours.
| Area | Typical range, estimate |
|---|---|
| Boston area, Massachusetts | $110 to $370 |
| New York City area | $100 to $360 |
| Los Angeles area, California | $100 to $370 |
| Chicago area, Illinois | $100 to $350 |
| Houston area, Texas | $95 to $330 |
| Dallas-Fort Worth area, Texas | $95 to $330 |
| Phoenix area, Arizona | $100 to $340 |
| Atlanta area, Georgia | $100 to $350 |
| Miami area, Florida | $95 to $340 |
| Seattle area, Washington | $110 to $370 |
P0340 by make
Causes and fixes differ by brand. Pick yours:
Related codes
- P0341: Camshaft position signal out of range
- P0335: Crankshaft position sensor circuit fault
- P0016: Crankshaft and camshaft not lining up (bank 1)
- P0017: Crankshaft and exhaust camshaft not lining up (bank 1)
More engine codes
Code meaning written in our own words. Some codes mean different things on different makes, so check your scan tool or manual. Not a repair shop, estimates only.