All hardware will fail at some point. The typical lifespan of both laptop and desktop computers is in the 3-5 year range, and according to this study by Backblaze, 90% of hard drives will last 3 years, but after that there’s a 12% chance per year that your drive will die (always keep current backups).
If this is your home computer, you may want to make different choices than if these are business computers. Often you can delay replacing a home computer until a good deal comes along, and you may have other devices to fill the void in the meantime if you are waiting for a repair. But in business, time lost waiting for a repair can offset any potential savings.
So should you repair or replace?
This handy infographic by Lexicon Technologies shows there can be a decent amount of money saved when making the right choice between repairing and replacing broken technology.