There are a costs and taxes that have to be taken into account when selling a property in Spain, and these can vary depending on where the property is located and the local town hall policies.
Capital gains tax (CGT)
Calculated much the same as most European countries, where you pay tax on any gain made on a property sale, so basically the difference between the buying and selling price. If renovations and improvements have been made then these can offset the tax due PROVIDING THERE IS A VALID INVOICE WITH TAX AND VAT NUMBERS.
Tax due on this amount is on a sliding scale as follows
19% for first 6000 euros
21% 6000 to 50,000 euros
23% 50,000 euros upwards
Plusvalia land tax
Based on the Cadastral value of the property and paid when a property or land is sold or there is a change in ownership.
Not a simple tax to work out, and there is a % coefficient applied which depends on land values and the number of years the property has been owned. These can vary depending on areas, but in general you will be charged approximately 3% Plusvalia tax
Estate Agency fees
These can vary between 1 and 5 % and this fee is subject to 21% IVA ( VAT )
General guide line
This page will hopefully explain in more detail, and as previously mentioned, these costs can vary, but an easy calculation of selling costs are anywhere between 3% and 9% which will take into account tax retentions, estate agency fees, required paperwork and legal costs.
( please note that this cost can increase if there are outstanding planning or legal issues with your property )