Capital gains tax in Spain explained

When selling a Spanish property, you are obliged to pay capital gains tax in Spain. However, capital gains tax also exists for other assets, such as shares. This article will be limited to the basics of the capital gains tax in Spain for immovable property.

When does capital gains tax apply in Spain?

The capital gains tax applies to both residents and non-residents and to any sale of property located in Spain. In certain cases, the tax also applies to donations of Spanish real estate, in addition to the gift tax paid. In the case of a donation, it is best to seek specialised advice.

Note: as a resident in Spain, you pay capital gains tax on capital gains realised on your worldwide assets. This means that capital gains realised in Belgium are in principle taxable in Spain. The double taxation treaty between Belgium and Spain stipulates that the Spanish capital gains tax is reduced by the capital gains tax actually paid in Belgium.

How do you calculate capital gains tax?

The taxable base of capital gains tax on property is calculated as follows. You take the actual sale price and reduce it by the costs associated with the sale, including the municipal plusvaliá. From this sales value, you deduct the original purchase price plus purchase costs such as notary fees and registration fees. If you have made renovations or improvements to the property, you can also deduct these costs from the sales value, provided you respect any depreciation. However, not all remodelling costs are deductible.

A simple example. You bought a property worth €200,000 in 2015. The Spanish taxes on the purchase of a second residence and costs totalled 25,000 euros. In 2018, you sell the property at a price of €240,000. The selling costs and the plusvaliá add up to 5,000 euros. The taxable base then comes to 10,000 euros (240,000 - 5,000 - 200,000 - 25,000 = 10,000).

Find more information on how to calculate the taxable base here. 

Note: it sometimes happens that people declare the official sales value lower than the actual sales value. This reduces the buyer's registration duties payable and the seller evades the capital gains tax payable in Spain. These practices are illegal. Since 2016, the Spanish tax authorities have been checking the sale value more intensively. Moreover, you risk high fines and in some cases even court proceedings for tax evasion.

Exemptions and reductions

However, there are a number of exemptions applicable. If you meet the conditions of an exemption, you do not have to pay capital gains tax in Spain. A first exemption concerns the family home. If, as a Spanish resident, you sell your family home with the aim of purchasing a new family home within two years of the sale, whether located in Spain or not, you will not pay capital gains tax.

A second exemption is for elderly over 65. Subject to conditions, you do not pay capital gains tax on your family home, whether or not you reinvest the proceeds. There is also an exemption on all your capital gains if you use the capital gains for the renta vitalicia or pension plan.

In addition to the exemptions, there are also reductions possible. If you meet the conditions of a reduction, the taxable basis will be reduced. If you sell a property after 1 January 2015 that you bought before 31 December 1994, you are entitled to a reduction of the taxable basis for the period between 31 December 1994 and 20 January 2006 under specific conditions. However, the sale price cannot exceed €400,000. The reduction is 11.11%. A reduction of 50% of taxable basis is also possible for purchases made between May 12, 2012 and December 31, 2012.

Read more about capital gains tax reductions.


For tax residents, there is a progressive rate with four brackets. There is a rate of 19% on the first bracket from 0 to 6,000 euros. The second bracket consists of a rate of 21% on capital gains between €6,001 to €50,000. Then the rate of the third tranche is 23% for amounts from €50,001 to €200,000. From €200,000 of capital gains, the rate is 26%.

For non-residents, a flat rate From 19%.


The Spanish tax authorities deduct 3% from the sale value when a non-resident seller sells a property. In practice, the buyer will 3% of the purchase price forward to the Spanish tax authorities, resulting in you receiving less. With this arrangement, the Spanish treasury wishes to ensure that, as a non-resident, you will pay the capital gains tax due.

If the 3% deduction exceeds the capital gains tax payable, you can pay the overpayment tax reclaim. However, it may take a while before you see your money back. Depending on the tax office, the repayment period ranges between four to 12 months.

We take back the example from above. The second residence was sold at a price of EUR 240,000. The taxable base was 10,000 euros. As a non-resident, a rate of 19% applies. This equates to 1,900 euros of capital gains tax due. However, the deduction amounts to 7,200 euros. In this example you pay 5,300 euros too much

Note: even as a Spanish tax resident, you risk the 3% deduction. Indeed, you need to explicitly prove to the notary that you are (1) resident in Spain and (2) tax liable in Spain.

Exit tax

In Spain, there is an exit tax. An exit tax is a tax you pay on unrealised capital gains when you change your tax residence. In other words, you pay capital gains tax on fictitious capital gains if you leave Spain to live in another country. The exit tax applies if you have been permanently resident in Spain for at least 10 years in the past 15 years. The exit tax only applies to shares and not real estate.

What about Belgian capital gains tax?

As a tax resident of Belgium, you are subject to Belgian personal income tax. In Belgium, in the income category miscellaneous income a capital gains tax on unbuilt and built-up property. The question arises whether this Belgian capital gains tax also applies to real estate located in Spain. Fortunately, no. Belgian capital gains tax is limited to real estate located in Belgium. In principle, if you sell your second residence in Spain, you pay no taxes in Belgium.


When you decide to sell your property in Spain, it is advisable to Tax advice on Spanish taxes inquire. After all, it is important that you can estimate the tax cost in advance and take the necessary measures to avoid paying too much tax as a non-resident. As a resident, you should take care to avoid penalties by declaring the tax due correctly.

Would you like more information about investing in Spain? Then feel free to get in touch.

Update November 2021

Share this post?


Legal notice: Blog posts enjoy copyright protection and may not be reproduced without written permission from the author.

English (UK)