This is a great question and I get it a lot. Of course like much in HVAC there is no straightforward answer. It depends. In my experience the Air conditioners and heat pumps seem to live right around the 15 year mark. Past that and you are definitely in the money and earlier than the 15 year mark is not uncommon.
Now when I say ‘last’ I mean when a major component fails or it begins to leak. Compressors can lock up, short a winding or just go bad at virtually any time. Usually there is something to blame to make that compressor die an early death. The typical AC compressor is a $1500 to $1700 replacement and with R-22 freon price going through the roof than replacing the whole unit is typically the best bet.
Also with the newly mandated R -410a mandates and it’s ‘earth friendly’ nature we are seeing many coils that are prematurely leaking. I am talking evaporator coils on those units. I don’t think manufacturers were up to designing a coil that would operate under twice the pressures that r-22 had to.
So when I say lifespan it means the major components. We can change a condenser fan motor in Phoenix for relatively cheap ($300 - $400) and replace run capacitors for not much either. But when it comes to the biggies like that compressor and indoor coil often times it can tip the scales to get a new unit.
The last thing you should take into account is the operating efficiency of the unit. If you are running an 20 year old heat pump and upgrade event to a 13 SEER (which is the minimum now) you will enjoy a large drop in electric bills during the summer.
So if you are at the 15 year mark, then yes, start thinking about new. If you are at the 20 year mark than you have beaten the odds and you can keep coasting or look for that new higher efficiency and give us a chance to seal all of those leaky ducts and balance out those hot rooms.