Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Physically, the Macs my family have owned have typically lasted 7-14 years with nothing more than an HDD or battery replacement.

Practically, they've lasted 5-8 years as primary machines before become too slow/outdated and getting replaced and repurposed.
 
My 7 1/2 year old iMac was fine but when I started trying to use it beyond web surfing (Xcode specifically) it was awful and I upgraded.
 
I also have a late 2015 27' 5k iMac that I still use everyday for multiple hours as my daily driver computer. It still do the job as a "traditional" computer and what I mean by that is everything runs fine, not too slow but not too fast either, but everything on it runs decently enough to not bother me much.

The only thing that makes me wanting to update is when I go to my 2018 iPad pro and found its faster and more fluid than my main computer, but in revenge, my computer RAM management is still way better. I'd say the Mac will be considered "obsolete" when Apple will stop releasing security updates for it (generally 2 years after they drop support for the latest major macOS release) so if I still use this computer at that time I'll probably upgrade at this moment.

But I'm in the fence of if I want to upgrade now or wait for the M1. I like the intel iMac for bootcamp, so I'm still thinking about the 2020 iMac instead, but its a hard decision to make because I buy computer once per 6 or 7 years usually. If it wasn't for the M1 Macs, I'll wait until I couldn't stand my 2015 iMac anymore.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.