Define the failure first
Do not compare replacement cost until the actual problem and repair estimate are understood.
Compare total remaining value
A low-cost repair on a reliable item can be very different from repeated repairs on an obsolete product.
Consider availability and downtime
Parts lead time and the importance of the item can influence the practical decision.
Safety-critical faults need professionals
Do not continue using equipment with suspected electrical, gas or other serious safety problems while deciding.
General household information only. Follow product labels and manufacturer instructions. Electrical, gas, structural, hazardous-material and other safety-critical work belongs to appropriately qualified professionals.