Answer a few quick questions and get a straight recommendation, based on how old it is, what is wrong, and what the repair would cost.
This is a rough guide, not gospel. The honest rule of thumb: it is usually worth repairing if the fix is cheap next to a new machine (an SSD or memory upgrade, a clean-out, a battery), and usually not worth it if an expensive part fails on an older computer. Read the full repair or replace guide.