People often wonder if when to buy a new computer if their old one is still working. If you have a Mac there are some pretty specific guidelines regarding repairs by the manufacturer and even availability of parts.
Apple considers products that were discontinued (no further sales) 5 to 7 years old to be “vintage”, but they will still service those products within the USA. Products older than 7 years since discontinued are considered “obsolete” and they will not service them at all. So in terms of their support, it’s more about the date they stopped selling them than the date you bought it. Often that may give you a couple more years of service from Apple if something needs repair or replacement. Of course, you would have to pay for all parts and labor.
With machines that are 5 years or older, I would say, 1) If everything is working fine for your needs, no reason to replace. 2) At some point you may not be able to upgrade the machine to the latest operating system (macOS). 2) There are versions of macOS that don’t support current web browsers like Google Chrome, Mozilla Firefox and even Apple Safari. If that were the case, I would recommend getting a new computer, for security reasons. 3) If anything major goes dies on a machine that old, it’s probably a better investment to buy a new one. New computers have a lot of improvements that make them faster, especially if you get a solid state hard drive (SSD) rather than the conventional hard drive with spinning platters inside. New ones come with more memory as standard – at least 8GB, which helps to handle the requirements of new operating systems.
You can check if your model of Macs are vintage or obsolete by scrolling down on this page to the lists: