How much is it worth investing in an appliance repair before you decide it's better to replace it? Would 20% of the cost of a new one be the limit?

I have a technician coming out to inspect my washer or dryer and provide an estimate for the repair cost. The service call is $75, but if the repair ends up costing more than $300 or $500, I’m probably better off replacing it with a new one.