That depends on more than the age of the computer. The Mac’s generation, overall condition, repair cost, remaining usefulness, available parts, and what you need from the machine should all be considered before deciding whether repair or replacement makes better sense.