In "proper" Maintenance Management records are kept of all maintenance activity, and all new work is costed (cost forecasted).
Then we have the well-known (we hope) concept of "Beyond Economic Repair" (BER). That is, the sad point in the life of a piece of equipment when any further expenditure on it is deemed to be uneconomic (that is, unjustifiable from the bean-counting point of view).
I have always used 60% as the magic BER level (or trigger point). That is, once accumulated maintenance expenditure on an item exceeds (or is set to exceed) 60% of the cost of buying a new one.
So two figures need to be known:-
1) Accumulated maintenance expenditure
2) Cost of like-for-like replacement
In my experience this state of affairs is rarely actually reached for (what I call) decent* kit. In fact, life-times in excess of twenty years are achievable for well-maintained equipment. And that has always been my default "planned equipment lifetime":- twenty years.
Any decent Maintenance Management (computer) System will also be able to forecast the anticipated "BER Date" based upon historic maintenance expenditure on each item.
But (as Billy has mentioned) perfectly good - from the engineering point of view - is often scrapped for what we might call "clinical reasons". That is, because some Consultant or other has been shown the latest wussorama
"must have" piece of kit.
Personally, I don't mind "progress" like that, just as long as the medics condemn the equipment themselves, rather than bringing pressure to bear on the biomed(s) to do the dirty deed for them.
* Well designed, quality medical equipment, such as that typically found in operating theatres; and imaging equipment, most laboratory equipment and the like (rather than the plastic junk that often passes for medical equipment out on the Wards).