Depends on whether it is your main home, that is, you are a permanent resident in Spain. If so then the main home exemption comes into play. If the new property costs more than what you get in total for your other property then there is no CGT to pay. This will apply if you sell the previous property within 2 years of acquiring your new one.
To claim the exemption, you must be moving from a main home to a main home and the property is anywhere in the EU.
You can also claim expenses such as solicitors fees, notary fees, transfer tax and other taxes if you are a resident.
If you are a non resident then you will have 3% retention kept back to pay any taxes as CGT wukk be due and you cannot claim expenses on the sale.
ETA. Oh, and if you're over 65 and have had the property as your main home for more than 3 years then there is no CGT to pay.
This message was last edited by mariedav on 10/30/2023.