That question is asked all the time, however the answer depends on many different factors:
The Brand: Daikin, Mitsubishi, Fujitsu... these are the main brands with technical support and parts, including just replacing either the outdoor condenser or indoor evaporator.
The reason for the malfunction:
Voltage issues in the neighborhood
Refilling Freon every season or few months
Is there a Freon leak?
That means the units was not sealed and can cause failure and acid in the system.
Can we reuse the existing copper and commutation wires?
Sometimes contractors use:
•thermostat wire instead of 14/4 wire.
•they use pieces of copper instead of one long piece
All these things matter.
Are you going to replace the unit with the same size unit?
Usually 7k,9k and 12k evaporators or condensers use all the same materials and it could be either upsized or downsized
Do you need a crane with remove and replace the old unit?
Is there a staircase going to the roof or just a hatch?
All said and done... the cost could anywhere from $3000 to $25,000 it all depends on the above and how many units are being changed and if the previous installation was good or poor.