When selling a Spanish property, you are legally obliged to pay capital gains tax on the profit realised. This applies to both tax residents and non-residents. It is crucial to distinguish between the national capital gains tax (Impuesto sobre la Ganancia Patrimonial) and the municipal capital gains tax (Plusvalía Municipal), as both are applicable when sold.
In this article, we focus on national capital gains tax on real estate and how to calculate and optimise it correctly.
When does Spanish capital gains tax apply?
Capital gains tax is payable on any sale or donation of real estate located on Spanish territory, regardless of whether the seller lives in Spain or abroad (such as Belgium or the Netherlands).
However, the tax treatment differs based on your residency status:
-
Non-residents: You only pay tax on the capital gain of the Spanish property.
-
Residents: You are taxable in Spain on your worldwide income. Capital gains realised in Belgium (e.g. sale of shares) are in principle also taxable in Spain.
Expert Tip: "The double taxation treaty between Belgium and Spain provides that capital gains tax already paid in Belgium may be deducted from Spanish tax. However, since Belgium often does not levy capital gains tax on private assets, the full tax is usually due in Spain."
How to calculate taxable base (Formula & Example)
The taxable base is the difference between the net sales value and the net purchase value. So you do not pay tax on the full sale price, but on the 'pure' profit after expenses.
The formula is as follows:
-
Sales value: The actual selling price minus selling costs (broker, municipal Plusvalía, energy scifi).
-
Acquisition value: The original purchase price plus purchase costs (notary, registration fees/ITP, VAT/IVA).
-
Renovations: Costs of substantial improvements (with invoice) may be added to the purchase value (taking depreciation into account).
Calculation example:
Suppose you bought a property in 2015 and sell it in 2024.
| Post | Amount | Notes |
| Sales price (2024) | € 240.000 | |
| Min: Cost of sales & Plusvalía | – € 5.000 | Broker, municipality, etc. |
| = Net Sales Value | € 235.000 | |
| Purchase price (2015) | € 200.000 | |
| Plus: Acquisition costs | + € 25.000 | Notary public, ITP, lawyer |
| = Net Acquisition Value | € 225.000 | |
| Taxable base | € 10.000 | (€ 235.000 – € 225.000) |
Note: It is illegal to put a lower sale value in the deed than the actual price (paying under the table). Since 2016, the Spanish tax authorities (Hacienda) strictly on market conformity. In case of fraud, you risk heavy fines and criminal prosecution.
Capital gains tax rates (2024/2025)
The rate you pay depends on your tax residence.
1. For non-residents (Belgians/Dutch nationals with second residence)
For non-residents, a fixed rate of 19% on net capital gains.
-
In the example above (base €10,000), you pay € 1.900 tax.
2. For Fiscal Residents in Spain
Residents pay according to a progressive rate (the Renta del Ahorro). The profit is aggregated with other investment income.
| Disc (Profit) | Rate |
| €0 to €6,000 | 19% |
| €6,001 to €50,000 | 21% |
| €50,001 to €200,000 | 23% |
| €200,001 to €300,000 | 26% |
| Above €300,000 | 28% |
The 3% Withholding (Retención) for Non-Residents
When sold by a non-resident, the buyer is obliged to withhold 3% of the total purchase price and pay it directly to the Spanish tax authorities. This is an advance on your capital gains tax to prevent foreigners from leaving without paying.
-
Scenario A (Too much withheld): The 3% withholding is higher than the actual tax (19% on profits). You can reclaim the difference through a tax return.
-
Term: Repayment takes on average 4 to 12 months after application.
-
-
Scenario B (Understated): Your profit tax is higher than the 3% withholding. You must top up the remaining amount within 4 months of sale.
Case study: In our calculation example, the sale price was €240,000. The 3% deduction is € 7.200. The actual tax was only € 1.900. You are entitled to a recovery of € 5.300.
Exemptions and Reductions
There are specific situations where you no or less capital gains tax paid.
Full Exemptions (Residents only)
-
Reinvestment Family home: Do you sell your main residence and reinvest all the proceeds in a new main residence (in Spain or EU) within 2 years? Then you are exempt. Note that this is a proportional exemption.
-
65-plus: Are you over 65 and selling your main residence (you have lived there for at least 3 years)? Then the capital gain 100% is exempt, even without reinvestment.
-
Annuity (Renta Vitalicia): For other properties (not the family home), over-65s can enjoy exemption if the capital gain is converted into a lifetime annuity (up to a maximum amount).
Reduction (Coeficientes de Abatimiento)
For properties acquired before 31 December 1994 applies a complex transitional arrangement whereby part of the gain can be exempt. This only applies to a sale value of up to €400,000 per taxpayer.
Frequently asked questions (FAQ)
1. Do I also have to pay taxes in Belgium on the sale of my house in Spain?
Take. Belgium generally does not levy capital gains tax on the sale of foreign property belonging to private assets. There is no double taxation on sale.
2. What is the difference between the Plusvalía Municipal and the capital gains tax?
The Plusvalía Municipal is a municipal tax on the increase in value of the land, regardless of whether you make a profit or a loss (although this is debatable in the case of a loss). The national capital gains tax (Ganancia Patrimonial) looks at the actual commercial gain on the entire property. You usually pay both.
3. When will I get my 3% withholding back from the Spanish tax authorities?
If you made no profit or the tax is lower than the withholding, you must actively file a refund (Modelo 210). Processing time varies by region, but is usually between 6 and 12 months after filing.
4. Does Exit Tax apply to property in Spain?
No. Spanish Exit Tax is a tax on unrealised capital gains on shares (value portfolio) when you move your tax residence to another country. It does not apply to real estate, as real estate remains taxed in Spain on a subsequent sale.
About the author: Glenn Janssens is a lawyer specialising in Spanish real estate transactions and tax regulations. Since 2017, he has been helping Belgian and Dutch individuals and entrepreneurs to safely purchase and structure real estate in Spain. He guides files from A to Z: from due diligence, ownership and tax control to estate planning and optimisation for residents and non-residents. Thanks to his years of experience, hundreds of handled files and focus on transparent communication, Glenn makes complex Spanish legislation understandable and practically applicable for every property buyer.
Update: December 2025