Jacob Salama Tax Lawyer Spain
Jacob SalamaInternational Tax Lawyer · Spain
Exit Tax

Exit Tax on Latent Capital Gains When Leaving Spain: A Technical Analysis

May 2026 Jacob Salama 13 min read

The Concept of Latent Gains in Spanish Tax Law

Spanish tax law is built on the general principle that capital gains are taxable only upon realisation — that is, upon an actual disposal of the asset giving rise to the gain. A taxpayer who holds shares worth €2 million that originally cost €200,000 has an unrealised gain of €1.8 million, but that gain is not taxable until the shares are sold, gifted, or otherwise transferred. This principle of realisation-based taxation is foundational to the personal income tax regime under the LIRPF and underpins the ordinary treatment of financial assets for Spanish tax residents.

Article 95bis LIRPF creates a deliberate and significant exception to this principle. When a taxpayer who qualifies under its scope departs from Spanish tax residency, they are deemed to have realised a gain equal to the difference between the market value of their qualifying assets on the date of departure and the acquisition cost of those assets. The gain is not real in the commercial sense — no transaction has occurred, no cash has changed hands, and the taxpayer retains full ownership of the assets after leaving Spain. Yet for Spanish tax purposes, the departure event itself is treated as equivalent to a disposal, crystallising a tax liability that must be paid as part of the final IRPF return.

Understanding why this exception exists, precisely how the gain is calculated, and how it interacts with other aspects of the Spanish and international tax framework is essential for anyone planning to leave Spain with a portfolio of shares or fund investments. This article provides a detailed technical examination of those questions.

The Calculation of the Latent Gain: Step by Step

The exit gain under Article 95bis is computed by reference to two figures: the market value of the qualifying assets at the date of departure (or, technically, on the last day of the last complete tax period during which the taxpayer was resident), and the acquisition cost of those assets as determined under the general IRPF valuation rules. The difference — market value minus acquisition cost — constitutes the gross exit gain. From this gross figure, any prior taxed losses or gains that are available for offset under the general rules are deducted to arrive at the net figure that is included in the base imponible del ahorro.

The determination of market value depends on the nature of the asset. For shares listed on a regulated securities market — whether the Bolsa de Madrid, the London Stock Exchange, or any other recognised exchange — market value for Article 95bis purposes is the quoted price on the last trading day of the final year of residency. Practitioners should note that this is not the price at the date of the individual departure event but rather the year-end price, which can differ significantly if departure occurs during the course of the year. A taxpayer who leaves Spain on 30 June and whose shares rise substantially in the second half of the year will find that the exit gain is computed by reference to the 31 December price, even though they were no longer resident at that date — a counterintuitive but legally correct outcome under the current statutory language.

For shares in unlisted entities — private companies, family businesses, start-up companies in which the taxpayer holds a significant stake — the valuation methodology follows the rules applicable under the general IRPF framework for valuing such interests. Specifically, the value is taken to be the greater of the following three figures: the theoretical net asset value per share as derived from the most recently approved balance sheet; the nominal value of the shares; and a capitalised earnings figure computed as five times the average profits of the entity over the three financial years preceding the date of departure. These rules can produce valuations that differ substantially from the commercial reality of a start-up that is loss-making but carries significant optionality value, and they can equally produce valuations that understate the value of a mature, profitable private business that trades at a high earnings multiple in practice.

For interests in collective investment institutions — Spanish fondos de inversión, SICAVs, Irish UCITS funds, and similar vehicles — the applicable value is the net asset value (NAV) per unit or share on the relevant date. For regulated funds that publish daily NAVs, this is typically straightforward. For less liquid fund structures, valuation may require specific enquiry with the fund administrator.

Acquisition Cost: The Starting Point

Acquisition cost is determined by reference to the taxpayer's actual historical cost, being the price paid for the shares or fund units at the time of original acquisition, adjusted for any subsequent qualifying corporate actions that affect the cost base. Costs of acquisition — broker commissions, taxes paid on acquisition — are added to the base cost. Costs associated with prior disposals that have been reinvested may also affect the computation depending on the circumstances.

A critical issue for many taxpayers is the treatment of assets that were acquired before the period of Spanish tax residency commenced. Article 95bis does not contain a specific provision limiting the exit gain to gains accrued during the period of Spanish residency. In principle, therefore, a taxpayer who acquired shares in 2010 for €100,000, became Spanish tax resident in 2018, and departs in 2025 when those shares are worth €1,000,000 would be subject to exit tax on a gain of €900,000, even though the vast majority of that gain — potentially all of it in economic terms — accrued before Spain had any claim to tax it.

This is one of the most contested aspects of Article 95bis from both a policy and a legal perspective. The Spanish tax administration's position is that the exit gain is computed on the full unrealised appreciation at the date of departure, without any apportionment for the pre-Spanish-residency period. This position has been maintained in DGT consultas and has not yet been definitively overturned by the courts, though academic commentary is largely critical of it. Taxpayers in this position should take specific advice, as the argument for an apportioned computation — limiting the Spanish exit charge to gains accrued during the period of Spanish residency — has merit under both domestic constitutional principles and EU law arguments concerning the proportionality of the charge.

The Tax Rate and Integration with the Savings Base

Once the net exit gain has been computed, it is integrated into the taxpayer's base imponible del ahorro for the final year of Spanish tax residency. This is the same base that accommodates capital gains from actual disposals, dividends, and interest income during that year. The progressive savings rate scale applies to the aggregate savings base, meaning that the exit gain effectively sits on top of any other savings income earned during the year of departure.

For the 2025 tax year, the savings income rate scale runs as follows: 19% on the first €6,000 of net savings base; 21% on the tranche from €6,001 to €50,000; 23% on the tranche from €50,001 to €200,000; 27% on the tranche from €200,001 to €300,000; and 28% on any amount above €300,000. A taxpayer with an exit gain of €3 million would therefore face an effective rate on that gain that blends all five tranches, with the great bulk of the gain taxed at 28% — approximately €833,000 of Spanish tax on the exit gain alone, before accounting for any other savings income in the final year.

This is a substantial liability, and the payment arises in the spring following the year of departure, when the IRPF return is filed. For a taxpayer who left Spain in 2024, the exit tax falls due when the 2024 Modelo 100 IRPF return is submitted — typically between April and June 2025. The tax must be paid in the ordinary way, with no instalment arrangement available under domestic Spanish law for departures to non-EU countries. If the taxpayer cannot pay, the normal enforcement mechanisms of the AEAT apply.

Subsequent Events: What Happens When the Assets Are Eventually Sold?

The most important practical question that follows from the payment of exit tax is how the eventual sale of the assets is treated — both in Spain and in the taxpayer's new country of residence. From the Spanish perspective, the logic of Article 95bis requires that the acquisition cost for any subsequent Spanish computation be stepped up to reflect the exit gain that was charged. Article 95bis.6 LIRPF expressly provides for this: if the taxpayer later transfers the assets while subject to Spanish tax (for instance, after returning to Spain), the cost base used to compute the gain on that transfer is the market value that was used to calculate the exit gain — not the original historical cost. This prevents double taxation under Spanish law in the event of a return to Spain.

However, the return-to-Spain step-up provision does not help the taxpayer in their new country of residence. Most jurisdictions do not give credit for Spanish exit tax against their own capital gains liability on the eventual disposal of the same assets. The United States, which taxes its residents on worldwide income including capital gains, does not recognise the Spanish exit tax as a creditable foreign income tax for Federal income tax purposes — at least not as a matter of current established practice under the Spain-US Tax Treaty of 1990. German, French, and UK tax law similarly do not have automatic mechanisms for crediting another country's exit tax against local capital gains liability.

This creates a scenario that practitioners sometimes describe as the "double dip": the taxpayer pays Spanish exit tax on a notional gain, then pays capital gains tax in their new country on the actual gain when the asset is sold — with the cost base in the new jurisdiction set at the original historical cost, not the market value used for the Spanish exit calculation. The aggregate tax cost can be severe, and it represents one of the strongest arguments for careful pre-departure planning, particularly around the timing and sequencing of departures and disposals.

The Return Mechanism Under Article 95bis.5

Article 95bis does contain one significant relief provision: if the taxpayer returns to Spain within five years of departure — or ten years, for departures to non-EU countries — and the assets for which the exit gain was charged are still held at the time of return, the exit tax liability is cancelled and any tax paid is refunded. This provision recognises the potentially punitive nature of the exit charge for taxpayers who leave Spain temporarily rather than permanently, and it provides an important safety valve for those who subsequently change their plans.

To benefit from this provision, the taxpayer must formally notify the AEAT of their return to Spain and request the cancellation of the exit tax assessment within the statutory period. The assets must still be held — if they have been sold in the interim, the cancellation does not apply, and the exit tax paid remains due. This creates an incentive to retain qualifying assets during the period of non-residence if return to Spain is contemplated, even if a disposal would otherwise be advantageous from a commercial or tax perspective in the new country of residence.

Illustrative Scenarios

Consider a UK national who relocated to Spain in 2010 and has been tax resident in Spain continuously since then. By 2025, they have been resident for 15 years and hold a portfolio of shares in a US technology company (listed on NASDAQ), acquired in 2008 for €200,000, now worth €3.5 million. They also hold a 30% interest in a UK private company, acquired in 2015 for €500,000, now worth approximately €2.5 million based on a recent independent valuation for commercial purposes.

If this individual departs Spain to return to the UK, Article 95bis applies — they have been resident for more than ten of the last fifteen years. The exit gain on the listed US shares is €3.3 million (market value of €3.5 million minus cost of €200,000). The exit gain on the UK private company interest requires a valuation under the IRPF rules — if the theoretical net asset value method produces a figure of €2.5 million, the exit gain on those shares is €2 million (€2.5 million minus cost of €500,000). Total exit gain: approximately €5.3 million, producing a Spanish tax liability in the region of €1.45 million at the blended savings rate, payable with the 2025 IRPF return in spring 2026.

Now consider a different scenario: a French national who became Spanish tax resident under the Beckham Law in January 2020 and whose regime expires at the end of 2025. During the Beckham period, they built a significant portfolio of shares in a French tech start-up, now worth €4.5 million (original cost: €50,000). If this individual decides to leave Spain at the end of their Beckham period rather than transition to the general IRPF regime, do they face an exit tax? The answer requires careful analysis: they have been tax resident in Spain for six years, which does not meet the ten-year threshold for the first limb of Article 95bis. However, the value of their portfolio substantially exceeds €4 million, which brings them within the second limb — provided the shares qualify as financial assets under the statutory definition and the taxpayer has been resident for at least one full year immediately before departure. In this case, the exit charge would apply, and the tax on a gain of approximately €4.45 million would be very substantial.

Important: The timing of actual disposals relative to Spanish departure can be decisive. Selling qualifying assets while still resident in Spain and paying IRPF on the realised gain may be preferable to paying exit tax on a notional gain and then facing capital gains tax in the destination country on the same value — particularly if the destination country does not credit the Spanish exit tax.

Interaction with Loss Relief

Where the taxpayer holds qualifying assets with unrealised losses at the date of departure — assets standing at a value below their acquisition cost — Article 95bis does not create a deductible exit loss in the same way as the exit charge creates an assessable exit gain. The asymmetric treatment reflects the general reluctance in Spanish tax law to allow loss relief in cross-border contexts where the losses may also be claimed in another jurisdiction. A taxpayer departing Spain with both appreciated and depreciated assets should consider whether to crystallise the losses by actual disposal before departure, so that those losses can be recognised and offset against gains within the ordinary IRPF framework for the final year of residency.

The interaction of exit gains with ordinary capital losses realised during the year of departure — whether from actual disposals or from the carried-forward losses of prior years — follows the standard rules for the base imponible del ahorro. Losses can offset gains within the savings base, subject to the limitation that loss carryforwards from prior years can only be applied against the current year savings base to the extent of 25% of that base (following the 2015 reform). This cap means that a taxpayer with large carried-forward losses may nonetheless face a significant current-year tax bill on the exit gain, with the residual losses potentially lost for ever once Spanish residency ends.

The AEAT's Enforcement Powers and Guarantees

The Spanish Tax Agency is well aware of the incentive to manipulate asset values downward in exit tax computations, and it has powers to challenge valuations that it considers to have been stated at below-market levels. For unlisted companies, the AEAT can conduct its own independent valuation under Article 57 LGT, using any of the permitted valuation methodologies — market price, expert opinion, capitalisation of earnings, or other recognised methods. Where the AEAT's valuation differs from the taxpayer's declared value, the difference gives rise to an adjustment and potentially to penalties if the understatement is found to have been intentional.

For departures to non-EU countries, there are currently no statutory deferral or instalment mechanisms under Spanish domestic law. The AEAT can require guarantees — letters of credit, pledges over assets, or other security — if there is a risk that the tax will not be paid, but in practice the primary enforcement mechanism is the ordinary debt collection process. Taxpayers who leave Spain without paying the exit tax and who have assets in Spain — real property, bank accounts, business interests — will find those assets subject to attachment by the AEAT in satisfaction of the outstanding liability.

Book a Free 30-Minute Consultation

Leaving Spain with a significant investment portfolio? Jacob Salama can model your exit tax exposure and identify strategies to minimise the overall tax cost of your departure.

Book via Calendly WhatsApp

Disclaimer: The content of this article is for general informational purposes only and does not constitute legal or tax advice. It does not create a lawyer-client relationship. Tax laws change frequently. Jacob Salama — Salama Legal SLP — is a registered Spanish lawyer (Colegiado nº 11.294, ICAMálaga).

Ask a question