This depends on the condition of your AC. If it’s a small problem that you have identified early on, then repairing is better than replacement as it is less expensive and saves the trouble of new purchase, dismounting, reinstalling, and labor cost. If the filters and coils are cleaned regularly, then you can also save on expensive maintenance and part repairs. However, if your AC is constantly breaking down, never cooling the home properly, operating very loudly, or inviting contaminants into the indoor air, then repair may be more expensive and strenuous. In this case, replacing the damaged unit is better than investing in it.