An amber check engine light on the instrument cluster in daylight, with the side mirror and a hillside beyond.

Check Engine Light Comes On and Off: Why It Keeps Returning

Short answer: A check engine light that goes off means the car saw a fault, then didn't see it on its last few trips. The lamp can go out after three trips without the fault, but the code stays for at least 40 warm-ups.

Iqbal Taher Written by Iqbal Taher Certified engine mechanic and parts trader since 2011
Fact checked

Key takeaways

  • Safety: A light that loses power, smells of burning or overheats means stop driving and get a tow.
  • The lamp can go out after three trips without the fault, but the stored code stays much longer.
  • Tighten the gas cap, note when the light came on and get the code read before buying a part.
  • A new sensor on a bad wire or connector can leave the fault in place, so have the wiring checked.

Your check engine light comes on and off intermittently: it came on last week, turned off by itself, and now it's back. Your car isn't being moody, it's reporting a fault it can only check some of the time.

Your car runs each self-test only on trips where its conditions are met. A trip where a test doesn't run doesn't count, so a fault can slip between drives without being fixed, and that's why the conditions on the days it lights tell you more than the lamp does.

What does it mean when a check engine light comes on and off?

It means your car found a fault and then stopped finding it, because the lamp and the stored code follow different rules. The lamp reports what the car saw on its last few trips, while the code keeps what it saw.

Carmakers' diagnostic rules set the timing, and the lamp and the stored code run on different clocks. Here's the order:

  • A self-test finds a fault. On most faults, the car stores a pending code right away and lights nothing.
  • The next trip checks again. If the same test sees the fault again before that trip ends, the lamp comes on and a confirmed code is stored.
  • If the test doesn't see it, the pending code is erased. That happens at the end of that trip, and the lamp never lit.
  • With the lamp on, three clean trips let it go out. A trip counts only if the test runs and finds the fault gone.
  • The stored code stays for at least 40 warm-ups. A warm-up is a drive long enough for the coolant to rise at least 40°F and reach at least 160°F.

A trip where the test doesn't run adds nothing to the count, and a fault that returns starts the count over. So you should have the stored code read even when your lamp is out.

The fuel tank, the vapor canister, the engine and the exhaust line laid out in the order fuel and exhaust flow through them show where the causes of a check engine light that comes on and off sit: the gas cap and vapor line, an ignition coil, a fuel injector and the pump in the tank, the two converters with their oxygen sensors and the intake duct, and a connector at the underhood fuse block, with the engine computer, the dash lamp and the OBD-II port marked where the code is read.
Where each cause sits, numbered as in Which faults make a check engine light come and go? Diagram: Oil & Miles
Use this image

Free to republish under CC BY 4.0: credit Oil & Miles and link to this page. The snippet does both.


              
              
            

Is it safe to drive when the check engine light keeps coming back?

Usually yes, while the light is steady and the car runs normally, but have it inspected soon. Stop driving if the car loses power, smells of burning or overheats, and get a tow.

A flashing light is stricter, because it usually means a misfire, and the hotter exhaust can damage the catalytic converter. If the check engine light flashes, ease off the throttle and pull over where it's safe. Read our flashing check engine light page for the steps.

When your lamp is off, you can't tell how the fault is doing, since the lamp only reports your last few trips. So the safest habit is to note each time it comes on and get the code read.

What should you do when the check engine light comes on and then goes off?

Tighten the gas cap, note what the car was doing and get the stored code read, even with the light off. Don't clear the code first, because clearing removes the freeze frame, the car's snapshot of the conditions, that the shop needs.

  1. Tighten the gas cap until it clicks. A light after a fill-up can go out once the car sees the cap is secure.
  2. Write down the conditions. The 5 notes below are what a shop needs to find a fault that comes and goes.
  3. Get the code read free. Big parts chains do it, and the code read section explains why it works with the light off.
  4. Run the VIN for open recalls. Our free VIN decoder shows them, and a young car's emission warranty may pay for the repair.
  5. Book a shop with your notes and the code. Ask for a test before any part, with the questions below.

A light that goes out on its own still means the car saw a fault, so these steps apply either way. The fix is in the code, not in the lamp going dark.

Which faults make a check engine light come and go?

An intermittent check engine light usually comes from a loose gas cap, a misfire, a fuel or sensor fault, or a bad connector. The fault shows up only under some conditions, or the car's test runs only under some, so a highway-only test can miss it on short drives.

Treat each row below as your first guess, one that a code read and a shop's test confirm or kill. Start with the row that matches when your light comes on.

Check engine light on and off causes: test each one before you buy a part
Cause and clue Test this first Don't replace yet
Gas cap or a vapor leak After a fill-up, and it may go out once the cap is tight. Tighten the cap, then read the code: P0455, P0456 or P0442. A part, before the cap check and the code read.
A misfire On or flashing at certain speeds or loads, with a stumble. Read the code: P0300 is random, P0301 to P0312 name the cylinder. A part, before the code names the cylinder.
A fuel system fault Tied to engine speed, load and warm-up, like a misfire. Read the code: P0171 or P0174 lean, P0172 or P0175 rich. A part, before the code is read.
Sensors, the converter and air leaks No pattern in the documents: the code points at the system, and a test names the part. Read the code, then open its page: P0420 or P0430 for the converter, P0101 for air flow, or our vacuum leak page for a lean code. A sensor or the converter, before the code is read.
A bad connector or wire A poor joint changes the signal the computer reads. Ask the shop to check the wiring and the connector along with the sensor, as one GM pickup bulletin tells dealers. A sensor, before the wiring and connector are checked.
Another system the car tests Its test runs only in set conditions, so one trip can miss it. Write down the conditions each time, and ask for the freeze frame. A part, before a code or freeze frame points at it.

The first row is the cheapest to rule out. After a fill-up, tighten the cap and look at its rubber seal before you pay for anything else.

A fuel cap off the filler neck, its rubber sealing ring cracked

A cap with a cracked seal

If your light comes on after a fill-up, suspect the cap or a leak in the fuel vapor system. Illustration by Oil & Miles

What should you write down each time the check engine light comes on?

When a check engine light goes on and off, the conditions each time are your best clue. Your car keeps some in the freeze frame and your note covers the rest, so write these down each time in the 5 steps below:

  • Write the date, the time of day and the outdoor temperature. A cold start and a hot afternoon point at different tests, and the car records warm-up status with the first fault.
  • Write what the car was doing. A cold start, steady highway speed, hard acceleration, a long idle or a hill, whichever fits.
  • Write your last fuel stop and whether the cap clicked. A light that follows a fill-up points at the cap, which has its own way out.
  • Write what you felt or smelled. A stumble, a rough idle, a loss of power or a fuel smell, or nothing at all.
  • Write when the light went out and how many trips it took. The count of trips is what the lamp goes by.

If you can't remember the conditions, ask the shop to read the freeze frame, which stores them. Your notes then fill in what the car doesn't record, like the fuel stop and the smell.

How do you get the code read when the light is off?

A code reader can still pull your stored code with the lamp off, because the confirmed code stays for at least 40 warm-ups. A pending code may also show. The permanent code, though, is erased when the lamp goes out on its own.

Big parts chains read codes free, so try one near you. A free read gives you the code, not the part, and further testing may be needed to confirm the cause.

Some chains' readers can also clear the codes, which may turn the light off for a while. The light is likely to return if the cause isn't fixed, so we'd skip clearing until you've read the code and written it down.

What turns the light off and what keeps the code?

Your lamp goes out after three clean trips in a row, but the code stays much longer. Misfires, fuel faults and the gas cap follow their own rules, and the stored and permanent codes leave last.

The lamp and the code leave on different rules in these four cases:

1. Misfire and fuel system faults

These two faults count differently. The lamp can go out after three trips under similar conditions without the fault, not after any three trips.

To judge similar conditions, the car stores the engine speed, load and warm-up status of the first fault. A highway-only misfire may not clear on three short trips around town, so the lamp can stay on until a shop finds it.

2. A loose gas cap

A leak caused by a missing or improperly secured fuel cap has its own exit. If the car can tell the cap caused it, the lamp can go out once the cap is verified as secure.

That's why tightening your cap can clear the light without three trips. A cap that clears it has fixed a cap problem, so if your light returns, read the code before you buy a part.

3. The stored code

Your confirmed code stays until the car has warmed up at least 40 times without the fault, with the lamp off for it. At one warm-up a day, that's about six weeks.

The freeze frame is a snapshot of what the engine was doing when the fault was found, stored and erased with the code. If anyone clears the code, the snapshot goes too, so have it read before that happens.

4. Permanent codes

On 2012 and newer cars, and many 2010–2011 ones, the car also keeps a permanent copy of every confirmed code that is switching the lamp on. A scan tool can't erase it, and neither can disconnecting power to the car's computer.

A permanent code leaves only when your car runs the test itself and finds the fault gone. Clearing codes can turn your lamp off, but the permanent code stays.

Will a check engine light that comes and goes affect an emissions test?

Yes, it can. While the light is on, a test that reads the car's computer fails it. Clearing the codes first resets your readiness monitors, the car's self-tests on each emissions system, and some states, such as Delaware, fail a 2001 or newer car with more than one monitor not ready.

We didn't read each state's rule on a lamp that's lit during the test, so check your own program's page. Our check engine light meaning page walks you through the test and the monitors in full.

Outside the US

In the UK, a check engine light that is on during the MOT fails it as a Major defect, and so does one that doesn't light when the tester turns the ignition on (GOV.UK MOT inspection manual, sections 8.2.1.2 and 8.2.2.2). The check covers gas cars first used from July 1, 2003, and diesels first used from July 1, 2008.

What does it cost to fix a check engine light that comes and goes?

Often nothing at first, because the code read is free at the big parts chains and a loose cap costs nothing to fix. A young car's emission parts are under a federal warranty, as the documents section explains, so check that before you pay a shop.

If the read doesn't settle it, ask the shop what its diagnosis covers, what it costs and whether the fee counts toward your repair. Past that, the repair is priced by the code, and each code's page has its own cost section:

What should you ask the shop?

Take your notes and the code to the shop, and ask these three questions before you agree to a part. They keep your visit on tests rather than on a guess.

What to say to the shop

“My check engine light comes on and goes off, and I've written down when. Before you replace a part, can you read the stored and pending codes, show me the freeze frame, and tell me which test result points at the part you recommend?”

A shop that reads the codes and the freeze frame first, then names a part from a test result, is working the fault rather than guessing. If it names a part first, ask which test points at it.

From the carmakers

What do the rule and the carmakers say?

The lamp and the code leave on different schedules by rule, and a carmaker's guide says how soon to act. California's rule, 13 CCR 1968.2, calls the lamp the MIL and sets that timing, with its lines quoted below.

GM

Service bulletin 21-NA-032

DO NOT replace the MAF sensor.

Covers
2019–2021 Silverado and Sierra 1500 with the 5.3L or 6.2L, with P1682 and often P0101.
Fix
Repair the loose dual-crimp wire in the underhood fuse block connector instead of replacing the sensor.
Who pays
May be under warranty
Ford

Owner's manual 2024 F-150

Avoid heavy acceleration and deceleration, and have your vehicle checked as soon as possible.

Covers
A flashing check engine light on the 2024 F-150, which Ford ties to a misfire.
Fix
No part named: ease off and have the truck checked.
Who pays
Info only
CARB

Regulation 13 CCR 1968.2 (d)(2.2.2)

if the identified malfunction is again detected before the end of the next driving cycle in which monitoring occurs, the MIL shall illuminate continuously

Covers
How a pending code turns into a lit lamp: the fault must show again on the next trip.
Fix
None: the rule sets when the lamp lights, and the stored code shows the likely area of the fault.
Who pays
Info only
CARB

Regulation 13 CCR 1968.2 (e)(4.4.2)(B)

the MIL may be extinguished … once the OBD II system has verified that the fuel cap has been securely fastened

Covers
A fuel vapor leak the car can trace to a missing or loose gas cap.
Fix
Tighten the cap: on a car without a separate indicator, and if the lamp isn't lit for another fault, the car can clear the light once it verifies the cap, without three trips.
Who pays
Info only
CARB

Regulation 13 CCR 1968.2 (g)(4.4.6)(C)

Permanent fault codes … may not be erasable by any scan tool command (generic or enhanced) or by disconnecting power to the on-board computer.

Covers
A permanent copy of every confirmed code that is switching the lamp on.
Fix
No scan tool or battery cable removes it: the car erases it once its own test finds the fault gone.
Who pays
Info only
  • Pending code. 13 CCR 1968.2 (d)(2.2.1): “Upon detection of a malfunction, the OBD II system shall store a pending fault code within ten seconds indicating the likely area of the malfunction.”
  • Lamp off. For 2019 and newer cars, (d)(2.3.2) says the lamp “shall be extinguished after three subsequent sequential driving cycles during which the monitoring system responsible for illuminating the MIL functions and the previously detected malfunction is no longer present”.
  • Stored code. For 2019 and newer cars, (d)(2.4) says the car “shall erase a confirmed fault code” once the malfunction “has not been again detected in at least 40 consecutive warm-up cycles” and the lamp hasn't been lit for it. For 2004–2018 cars it “may erase” the code after “at least 40 warm-up cycles”.
  • Warm-up. The rule's definition is a trip where “the coolant temperature has risen by at least 40 degrees Fahrenheit” and “reaches a minimum temperature of at least 160 degrees Fahrenheit”.
  • Misfire. Under (e)(3.4.6) “The MIL may be extinguished after three sequential driving cycles in which similar conditions have been encountered without an exceedance of the specified percentage of misfire.”
  • Fuel system. Under (e)(6.4.6) “The MIL may be extinguished after three sequential driving cycles in which similar conditions have been encountered without a malfunction of the fuel system”.
  • Freeze frame. Under (d)(2.2.7) it holds the conditions “present at the time a malfunction is detected”. Under (d)(2.2.7)(A) they're stored and erased “in conjunction with storage and erasure of either pending or confirmed fault codes”.
  • Hyundai. Its Warning Lights guide says: “Have your vehicle inspected soon by your preferred Hyundai dealer to avoid possible damage.”
  • Free code reads. AutoZone, O'Reilly and Advance Auto Parts each advertise a free check engine light read, and O'Reilly says its code readers can clear codes, “which may temporarily turn off the Check Engine light”.
  • Complaints. Of 21,980 NHTSA complaints on 2010–2025 model years that name the check engine light, 573 describe it coming on and going off or coming back on, about 2.6%. They're owners' words, not diagnoses, and people file a complaint when something went wrong, so the share says nothing about how often the pattern happens across all cars. From NHTSA complaints on 2010–2025 models, in the complaint file dated August 25, 2026.
  • Owners' words. A 2023 GMC Yukon XL owner, whose dealer read code P0747, wrote Check engine light goes on and off relating to the same condition and sometimes having shift issues. A 2013 Buick Encore's light came back on hours after a dealer repair, and its owner wrote THE CHECK ENGINE LIGHT STAYED ON FOR 4 HOURS BEFORE IT WENT OFF, WELL THAT DIDN'T LAST LONG BEFORE I START HAVING THE SAME PROBLEM AGAIN. NHTSA complaints 11664657 (2023 GMC Yukon XL) and 11072142 (2013 Buick Encore), in the owners' own words, read October 9, 2026.

On a 1995 or newer car or light truck, federal law covers your emission parts against defects for 2 years or 24,000 miles. Only the catalytic converter, the engine computer and the onboard diagnostic computer get 8 years or 80,000 miles, and California sets its own periods.

On a valid claim at a dealer the carmaker authorizes, EPA says you can't be charged for the diagnosis or the repair. So check your warranty before you pay for either one.

Conclusion

What to do next about a check engine light that comes on and off

Check that the gas cap is fully tightened, write down what the car was doing and get the stored code read. Don't clear it first, because clearing removes the freeze frame. If the check engine light flashes, ease off the throttle and pull over where it's safe.

Oil & Miles checks each step here against California's OBD II rule, the carmakers' manuals and bulletins and NHTSA's complaint file.

Check engine light · what to read next

Flashing lights, codes and the fixes behind them

Common questions

Asked most often

Is it normal for the check engine light to come on when you start the car?

Yes, for a moment with the key on. The lamp lights before the engine cranks to show it works, and Ford's manual says a lamp that lights with the engine running means the car is detecting an emissions fault.

How many trips before the check engine light goes out?

Three in a row where the test runs and the fault stays gone. Misfire and fuel system faults count three trips under similar conditions, and if the car can tell a loose cap caused it, the lamp can clear once the car verifies the cap is secure.

Can I drive 4 hours with a check engine light on?

No carmaker document gives hours or miles, and Hyundai says to have the car inspected soon when the light stays on or comes on while driving. If it flashes, avoid heavy acceleration and deceleration and have it checked as soon as possible, as Ford's manual says, and have it towed if it keeps flashing, or the car shakes, loses power, smells of burning or overheats.

Can a loose gas cap make the check engine light come on and go off?

Yes. If the car can tell the cap caused the leak, the car can clear the light once it verifies the cap is secure.

Does a check engine light that turned off by itself still show a code?

Yes: the confirmed code stays stored for at least 40 warm-ups without the fault, so a reader can pull it with the lamp off. The permanent code is erased when the lamp goes out on its own.

Sources

  1. California Code of Regulations, Title 13, section 1968.2, for the lamp check, pending, confirmed and permanent codes and reading them, the three-trip and 40 warm-up rules, oxygen sensors, readiness after clearing, the misfire, fuel and cap exceptions, the freeze frame and the other systems the car must test, (e)(5) to (e)(15). Cornell Legal Information Institute, read October 6, 2026
  2. Hyundai Warning Lights guide, for what Hyundai tells a driver to do about a lit lamp. Read at source for our check engine light meaning page, September 16, 2026
  3. 2024 Ford F-150 Owner's Manual, edition August 2023, for what Ford tells a driver about a lamp lit with the engine running and a flashing lamp. Ford, read October 9, 2026
  4. GM bulletin 21-NA-032, as cited on our P0101 code page, for the fuse block crimp behind P0101 on 2019–21 Silverado and Sierra 1500 pickups. GM via NHTSA, read October 2, 2026
  5. EPA, Frequent Questions related to Transportation, Air Pollution, and Climate Change, EPA-420-F-15-035, Questions and Answers: Emissions Warranties (October 2015) and Clean Air Act section 207, 42 U.S.C. 7541, for the federal emissions warranty periods and what a valid claim covers. EPA and govinfo.gov, read October 7, 2026
  6. California Air Resources Board, California Vehicle and Emissions Warranty Periods, for California's own periods. CARB, read October 7, 2026
  7. Delaware Division of Motor Vehicles OBD-II inspection guidance, for what a car with cleared monitors faces at inspection and how long they take to run again. Read September 5, 2026, for our check engine light meaning page
  8. Delaware DMV form MV 210 (A), 11/2025, "Application for an Out-Of-State Inspection to renew a Delaware Registered Vehicle", for the readiness rule and its counts: a 2001 or newer car fails with more than one monitor not ready. Read November 3, 2026
  9. AutoZone free parts testing, O'Reilly free check engine light testing and Advance Auto Parts free scan, for the free code reading each chain describes. Each chain's own page, read October 6, 2026
  10. MOT inspection manual, sections 8.2.1.2 and 8.2.2.2 (engine malfunction indicator lamp), for the UK MOT result on a lit or dead check engine light. GOV.UK, read November 4, 2026

Illustration by Oil & Miles

How this was compiled

The rule is quoted from the current text of California's regulation. Its lamp and code lines change wording for 2019 and newer cars, and the documents section names the years. Where the current text says a lamp may or shall go out, we write that it can go out.

The complaint count comes from NHTSA's complaint file dated August 25, 2026, on 2010–2025 model years. It covers complaints that name the check engine light or service engine soon and describe it coming on and off, coming and going or coming back on, with a flashing lamp left out.

What we didn't do

We didn't read the federal rule's wording, or check how each carmaker follows the California text. The model years on this page are the ones that text names. We didn't test a car, and we give no failure rate for any fault, because the documents give none.

We didn't read AutoZone's or Advance Auto Parts' own statement on clearing codes, only O'Reilly's. We recommend no brand of code reader and no shop. We found no document that ties heat or moisture to a connector failing on and off, or that says disconnecting the battery clears stored codes. The page claims neither.

Figures are drawn from California's OBD II rule, US federal complaint data and US-market owner's guides, compiled in November 2026. This article is general information, not advice about your specific vehicle. See the disclaimer.