How long will Arduino Uno remember the program I uploaded after powering off?

I'm not 100% sure, but I may have noticed the Arduino Uno 'forgetting' its program after it's been unplugged for a long period.

Can someone confirm how long Arduino Uno will remember a program when powered off? Is it variable?

According to the datasheet, "Reliability Qualification results show that the projected data retention failure rate is much less than 1 PPM over 20 years at 85°C or 100 years at 25°C.". If you have damaged the microcontroller chip, then of course it could be worse.

The failure mode is that the stored program will eventually 'leak' so that when you write data to the flash storage and then read it back again and again, eventually what you read back will contain a bit error. The more times you write to the flash memory the more it is likely to leak and the more quickly these bit errors would be expected. The nominal life of the flash memory is specified at 10,000 cycles. It doesn't simply stop working after ten thousand uploads, just that the probability of errors is initially negligibly small and the further you go past ten thousand uploads the greater the chance that errors will occur (i.e. the shorter the time that the flash storage will hold your program before a bit error occurs).

Ten thousand uploads represents an extraordinarily large number of uploads and it's unlikely that you have reached that number. In other words, the Arduino should hold your sketch in memory indefinitely (years).

It's possible that electrical damage to the flash storage could reduce that life, and symptoms would be that the board appears to lose its program after some time. However, in the past where people have suspected problems like this it has sometimes turned out that they had code which depended on real-world time and the problem was a design fault in the code and not a hardware fault.

Thanks for the info guys.

It seems likely then, that the Arduino didn't 'forget' my program, but rather I made some other mistake that stopped my project from working.

It's good to know the Arduino remembers the program for so long, it means it's definitely viable for the project I have in mind.