When I purchased a top of the line iMac in March 2010, I paid quite a lot of money for it, but my rationale was that it should last a long time, preferably till the end of the decade.
I tend to be a heavy user. I do tasks that are processor intensive. They used to say that computers were meant to be left on all the time, so I left mine on all the time. This is probably bad advice. The chickens have come home to roost. I recently paid to have the iMac cleaned out because it was full of dust and badly overheating. (This is a problem with all-in-one-computers, plus they tend to overheat anyway. Laptops can also have problems with overheating.) However, I have 4 major components either failing or about to fail, and the high cost of repair makes it look like it is time to get a different computer.