If the Spanish tax authorities consider a vendor non-resident in Spain for tax purposes, the buyer has to withhold 3% of the sale price to cover the vendor’s tax liabilities resulting from the sale. The taxman wants the money in case the vendor does a runner without paying his taxes, something that almost all non-resident vendors have done in the past.
The tax in question is the vendor’s capital gains tax, which has to be declared in his or her annual income tax returns (known in Spain as La Renta), and is taxed at 21%. Non-residents used to be taxed on capital gains at 25% but this was reduced to 18% (same as residents) as of 01/01/08, then put up to 19% on 01/01/10, and finally raised to 21% in 2014
Capital gain derived from the sale of your Mallorca property: In case of a transmission of real property, being the seller a non-resident, he is taxed for the Income Tax on natural persons in respect of capital gains. The tax rate is 21% on the capital gain from the sale of the property.
In order to reduce the capital gain, as acquisition costs, the expenses for notary fees, registration, real estate fees, tax paid as well as the improvements that have been performed and thus increase the cost of transmission, can be added.