2005 Mazda 6s

Car is not running needs the catalytic converter fixed. Is this something that is expensive? im buying this car and its cheaper because of this issue, is it worth buying?