A bit of a guess - but I'd expect it to last for a few years at least - say around 5 or so.
I'm thinking it might not have the same longevity as it would when new. Some of the lubricants may partially volatilized over that period. That might be a little less of a problem if the drive is still sealed in it's original static bag.
5 years is extremely conservative IMO. I've pulled out 10+ year old drives from a grocery bag when messing with old systems and never had an issue with a drive going bad while sitting around. And that's with drives from The late 80's to early 90's. I'd be quite shocked to find an unused 10yr old drive, let alone 5yr old drive non-functional unless it had been handled roughy.
I was thinking never, but never is a long time. I was guestimating around 20 years sealed in the bag/in a firesafe. Reason I asked, my boss wanted to know because I wanted to order some spares for hotswap on my servers rather than wait for the warranty replacement 24 hour turn around.
ditto. I have 15 year old ATA drives that technically would still work. I just no longer have a PC with an IDE interface to hook them up with, and they are so slow I wouln't want to anyway. I would say a good answer is "they will out live their usefulness".
HDD prices are coming down all the time, as are the capacities increasing.
Unless you use some special HDD's that are not readily available, the best thing to do is wait for a failure, then just pop out to your local PC shop and pickup a replacement.
If i was running a server without raid, and the whole system literally went down with a single failure, i would MAYBE keep a single drive lying around, but as we are on the same block as 2 pc shops i carry zero spares.