How long does a Prius battery last?

The “Triangle of Death” came on in my 2002 Prius a few weeks ago with 145,000 miles on it. When I brought it in for diagnosis, I heard the battery failure news. The replacement cost was $2,900 installed; plus I needed a catalytic convertor to pass emissions inspection so i was looking at $4500 to get back on the road. The Kelly Blue Book trade in value was $3000. But because of the repair issues, they only gave me $2200. The service manager, whom I trust, as he’s always been straight with me the 8 years I’ve brought my car to him, told me it could be one cell in the battery or it could be more; there’s no way to tell. I could drive the car, but it the computer senses a major battery failure, it could shut me down at any time without warning. He also said that it was very rare to see; mine was the first battery needing replacement other than a wreck. He told me my car would probably be good for another 50k miles before the next unlikely item to fail would go, the transmission magnetic coil. Given the quirky history of my car, I decided to bail rather than repair. I looked at other cars, but decided to stick with the Prius. Was able to get a Certified Pre-Owned with 3400 miles on it. Paid the same price as for my 2002! In my first week of driving the car, I like it a lot. Since this is the 3rd generation, I’m optimistic its performance will far outlast its warranty.

I’ll add here that the battery on my early 2001 failed (one cell was under-spec) at about 80,000 - still under warranty.I was surprised (and pleased since it was still under warranty) that the entire array was replaced, and not just the bad cell.

Note: I have replaced the little starter battery twice. Pricey!