Depends on a lot of things. Resident or non-resident, main home or second home, purchasing another property in the EU, age and lenght of ownership for example. Buying a new home in the EU and no CGT if you use the profit to buy another home. Main home and over 65 living there for more than 3 years then no CGT and so on.
However, assuming you're resident and simply selling up, the CGT rates are:
- Up to 6.000 Euros, the tax rate is 19%.
- From 6.000 to 50.000 Euros, the tax rate is 21%.
- From 50.000 Euros an up, the tax rate is 23%.
The price written in the title deeds (not the IVA) is the basic charge and you can deduct expenses like IVA, land registry fees, Notary fees, transmission tax and lega fees from the profit.
If you've made improvements, like the pool, and done it properly then the deeds will be altered to reflect the increase in value. If the full 20k you mentioned is added to the value then the difference in value and selling price would be 40k. Deduct expenses of (say) 10% and the CGT would be based on 36.6 k.
First €6,000 -=1140
Next €30,600 = 6426
Total CGT 7566. Of course, I doubt if you'd pay anywhere near that if you get a decent solicitor.
And selling a property in Spain with those difference nowadays would mean that you either bought the property a long time ago (in which cas historic allowances come into play) or you've found a mug who is willing to pay well over the value.