Do you know what happens when you change your tax residence? You may need to familiarize yourself with the Exit Tax, a levy that regulates the taxation of unrealized capital gains when a person moves his or her residence outside Spain.
In other words, it is designed to prevent taxpayers from avoiding the payment of taxes on their accumulated gains due to the change of tax jurisdiction; something preventive.
That is why, in this article, we are going to explain what exactly the Exit Tax consists of, who it directly affects and how it should be calculated. We will also look at different situations in which it can be applied and various precautions to be taken into account.
What does the Exit Tax entail in Spain?
Index of contents
This tax, which has been applied in Spain since 2015, is nothing more than a measure to tax latent capital gains that a person has generated while being a tax resident in Spain, but which have not yet materialized in a sale. In other words, it forces to be taxed as if certain assets had been sold just before changing the tax residence abroad.
It is regulated by Article 95 bis of the Personal Income Tax Law (IRPF). And, it should be noted that this tax is only due immediately when the change of tax residence is made to a country that is not part of the European Union (EU) or the European Economic Area (EEA).
To give a better example: If an entrepreneur, resident in Spain for 12 years, owns 30% of a company valued at 1.5 million euros. When he moves to Thailand, he must declare and pay the latent gain on his shares as if he had sold them just before the move, as Thailand is not in the EU and the deferral does not apply.
When does the Exit Tax have to be paid in Spain and who is affected?
First of all, it is important to point out that it always depends on whether you are an individual or a legal entity. For natural persons, the tax is only applied on certain shares or social participations. These must be declared as ”Capital Gains” in the Personal Income Tax return.
In order to qualify for this taxation, it is necessary that the taxpayer has been a tax resident in Spain for at least ten years out of the fifteen years in which any of these circumstances apply:
- That the market value of its shares exceeds 4 million euros.
- And if this first condition is not met, that the percentage of participation in an entity exceeds 25%, provided that the value of such participations exceeds 1 million euros.
However, as mentioned above, if the transfer of residence takes place to an EU or EEA Member State, the capital gain is not immediately included in the tax return. In this case, the payment is deferred and will only be due if, within the following ten years, one of these situations occurs:
- Subsequent change of tax residence to a country outside the EU or EEA.
- Effective transfer of the shares.
- Failure to comply with the communication obligations regarding the quantification of the gain, the new tax domicile or the ownership and transfer of the shares.
In the case of legal entities, the cases subject to taxation are broader and more complex. Law 7/2021 on the Prevention of Tax Fraud introduced important modifications to this regime. Currently, Article 19.1 of the Corporate Income Tax Law establishes that companies must include in their taxable income the difference between the book value and the tax value of their assets when there is a transfer of tax residence outside Spain.
However, there are exceptions for certain transfers of assets related to financing, guarantees, or prudential capital requirements, provided that such assets are expected to return to Spanish territory. In addition, in the event of a transfer to another EU or EEA Member State, the resulting debt may be divided into five tax periods.

How can the Exit Tax be calculated?
It should be noted that the exact calculation is neither immediate nor universal, since it will depend a lot on the assets and circumstances of each taxpayer; however, there are several key points:
1. Identify the assets subject to taxation:
Once it has been determined whether the wealth meets the thresholds that trigger the application of the tax, as we have seen before, we proceed.
2. Valuation of the assets:
After having identified such assets, it is important to assign them a market value updated to the time prior to the change or transfer.
3. Calculation of the unrealized gain:
Next, the unrealized gain is calculated, i.e. the difference between the market value determined in the previous step and the acquisition value (the purchase price or the value declared at the time). This gain does not refer to an actual sale, but to a “theoretical” gain on which taxation is required, as if the sale took place just before leaving the tax residence in Spain.
4. Application of the tax rate:
The resulting amount is integrated into the IRPF savings base and is subject to the progressive rates in force for capital gains: they range from 19% to 28% (from 2024).
In short, the Exit Tax is not only a technical tax figure, but a tool with important strategic implications. Whether for individuals with significant shareholdings or companies reorganizing their international structure, this tax can significantly affect liquidity, estate planning and exit schedules.
Therefore, a good understanding of when it applies, how it is calculated and what deferral mechanisms exist is essential to avoid tax surprises and make informed decisions.
At LEIALTA we work to anticipate these scenarios. If you are considering a change of residence, having specialized tax advice can make the difference between a viable operation and an unnecessary cost.


