relocation

Exit Tax Spain: What Happens to Your Portfolio When You Leave Spain

You're planning to leave Spain – perhaps back to Germany, on to Portugal, or to another country. What many residents only notice shortly before departure: Spain taxes, under certain circumstances, unrealised gains on securities and company shares that you haven't actually sold yet. The so-called Spanish exit tax (Exit Tax) applies under Artikel 95 bis of the Spanish Income Tax Act (IRPF law, Ley 35/2006) and, depending on portfolio size and shareholding percentage, can trigger a considerable tax liability – purely on paper, without you having sold a single share. This guide explains who is affected, which thresholds apply, how the calculation works, what exemptions exist, and how you deal with the German equivalent – the exit tax under § 6 AStG – if you moved to Spain as a GmbH shareholder or founder and are now leaving again.

Spanish Exit Tax: Portfolios & Shareholdings 2026

Are you a resident in Spain with a larger investment portfolio or company shares and planning to leave?


What exactly is the Spanish exit tax?

The Spanish exit tax is not a separate tax, but a special mechanism within the regular IRPF (income tax for individuals). The underlying principle: anyone who has lived in Spain for years, accumulated unrealised gains on securities or company shares there, and is now moving to a low-tax country should not be able to take those gains out of Spain tax-free.

Technically, the law treats the departure as a deemed disposal of all qualifying assets on the day immediately before the relinquishment of tax residency. The difference between the market value on that reference date and the original acquisition cost is treated as a taxable capital gain – even if you continue to hold the shares or fund units for decades.

Spain introduced this provision in 2015, modelled on similar mechanisms in France, Germany, and the Netherlands. It is enshrined in law in Artikel 95 bis of the Ley 35/2006 (IRPF law) as well as in the associated implementing regulations.

Please note: The exit tax applies exclusively to individuals who were tax-resident in Spain – that is, residents. Anyone who, as a non-resident, merely owns a holiday property in Mallorca is not affected by this provision.


Who is affected? The three conditions

The Spanish exit tax only applies when all three of the following conditions are met simultaneously:

Condition Specific requirement
1. Tax residency You were tax-resident in Spain (Resident) for at least 10 of the last 15 tax years
2. Giving Up Residency You relinquish your Spanish tax residency and relocate your tax domicile abroad
3. Qualifying Assets You hold shares or securities above the statutory threshold values (see table below)

Those who have only lived in Spain for five years before leaving are generally not affected. The ten-year rule is the most important determining factor.

The Threshold Values in Detail

Case Type Shareholding in the Company Minimum Market Value Does Exit Tax Apply?
Concentrated Shareholding ≥ 25 % ≥ 1.000.000 € Yes
Diversified Portfolio / Any Shareholding Any (including < 25 %) ≥ 4.000.000 € Yes
Small Investor < 25 % < 4.000.000 € No
Short Residency (< 10 of 15 Years) Any Any No

Which Assets Are Covered? Shares in corporations, fund units (including ETFs and SICAV), and other collective investment schemes are all covered. A straightforward direct equity portfolio with a free float of under 4 million euros falls — even with a long period of residency — below the threshold. Real estate does not fall not within the scope of Article 95 bis; separate rules apply to real estate upon departure.


How is the tax calculated?

The taxable gain is derived from the difference between the market value of the shares on the day before departure and the original acquisition cost (including incidental acquisition costs). This gain is incorporated into the so-called Base del Ahorro (capital gains base) of the IRPF and is taxed at the standard rates applicable to capital gains.

Graduated tax rates of the Spanish Exit Tax (Base del Ahorro / IRPF): 19 % to 28 % on unrealised capital gains

Tax rates of the Base del Ahorro (IRPF)

Capital gain (banded) Tax rate
Up to 6.000 € 19 %
6.001 € – 50.000 € 21 %
50.001 € – 200.000 € 23 %
200.001 € – 300.000 € 27 %
Over 300.000 € 28 %

Please note: The tax rates cited here reflect the values documented in the research sources. As tax rates are subject to change by the legislature, you should verify the current applicable rates with a tax adviser.

Worked example (simplified): You have held shares in a Spanish S.L. since its incorporation in Spain, with a current value of 2.5 million euros and a historical acquisition cost of 300.000 euros. The latent gain amounts to 2.2 million euros. Since you hold a 30 % stake and the value exceeds 1 million euros, the exit tax applies. The tax liability is calculated on the banded rates of the Base del Ahorro – on 2.2 million euros this results in a considerable sum, even without having received a single euro in sale proceeds.


Where you move to makes a difference: EU vs. third country

The distinction between relocating to an EU/EEA member state and relocating to a third country (Switzerland, UAE, USA, etc.) is fundamental – it determines whether and how you are required to pay the tax.

Relocation within the EU or to the EEA

When relocating to an EU or EEA member state, payment may be deferred upon request. The tax does not become immediately due as long as you continue to hold the qualifying assets. The liability is only settled once you actually sell the shares. This model protects the European freedom of establishment, which the European Court of Justice has also invoked in several rulings (including cases C-9/02 Lasteyrie du Saillant and C-371/10 National Grid Indus).

Relocation to a third country (tax havens / non-EU)

If you move to a country outside the EU/EEA, the tax is generally due immediately – in the tax year of departure. There is no automatic deferral. Exceptions and special rules may arise from double taxation agreements (DTAs); Spain has DTAs with numerous countries, the specific implications of which must be examined on a case-by-case basis.

Destination country Payment mode Special feature
EU member state (e.g. Germany, Portugal) Deferral until actual disposal possible Freedom of establishment provides protection
EEA state (e.g. Norway, Iceland) Deferral possible Similar to EU rules
Third country (e.g. Switzerland, UAE, UK) Immediately due in the year of departure DTA may reduce double taxation
Country classified as a "tax haven" Particularly strict treatment Spain may require additional documentation

Reporting obligations and procedure: what you need to do in practice

The Spanish exit tax is declared as part of the regular IRPF annual tax return for the year of departure. You therefore report it in the Declaración de la Renta, which you submit after leaving for the relevant year – typically between April and June of the following year.

8-step process: leaving Spain with Exit Tax – from the initial eligibility check through to annual reporting obligations

Step by step: departing Spain with exit tax

  1. Assessing your exposure: Check whether you meet the three conditions (10 out of 15 years of residence, relinquishment of residency, qualifying assets).
  2. Establishing the valuation date: The market value of the shares is determined as at the last day of Spanish tax residency – a professional valuation is recommended, particularly for privately held companies.
  3. Engaging a tax adviser: At the latest now, not after deregistering.
  4. Deregistration with the tax authorities (Modelo 030 / Censo de Obligados Tributarios): The relinquishment of tax residency must be reported to the AEAT (Agencia Tributaria).
  5. Submitting the IRPF return for the year of departure: Including the schedule for the exit tax event (Artículo 95 bis).
  6. When relocating to an EU country: applying for a deferral of payment: In writing to the AEAT as part of the tax return.
  7. Retaining documentation: Purchase receipts, valuation evidence, correspondence with the AEAT – for subsequent proof at the time of actual sale.
  8. After departure: reviewing annual reporting obligations: Under an EU deferral, Spain may require you to demonstrate annually that the conditions for deferral continue to be met.

Please note: The Empadronamiento-Abmeldung and the tax deregistration are two separate processes. Deregistering from the residents' register does not replace the tax deregistration with the AEAT.


The German exit tax (§ 6 AStG): what German founders need to know

Many people leaving Spain did not grow up there but previously relocated from Germany to Spain. For them, there is a second matter to contend with: the German exit tax under § 6 Außensteuergesetz (AStG).

This affects you if, at the time of your departure from Germany (i.e. when you moved to Spain or now when you are again moving to another country) you meet the following conditions:

Condition German rule (§ 6 AStG)
Tax liability in Germany Resident for tax purposes in Germany for at least 7 of the last 12 years
Shareholding threshold At least 1 % in a domestic or foreign corporation
Trigger Transfer of tax domicile abroad
Valuation Deemed disposal at market value on the date of departure

The 2022 reform: Until the end of 2021, relocations within the EU/EEA could be deferred indefinitely and interest-free. Since 1 January 2022, the indefinite deferral has been abolished. Instead, upon application, payment in seven equal annual instalments may be requested — interest-free, but potentially subject to a security deposit. The tax is therefore assessed from the very first moment, even if you move to Spain or Portugal.

Germany–Spain Double Taxation Agreement (DTA 2012): The DTA between Germany and Spain concluded in 2012 is designed to prevent the same gains from being taxed twice. In an ideal scenario, the exit tax liability paid (or paid in instalments) in Germany is credited against the subsequent taxation in Spain. In practice, this is often complex — the precise treatment depends on the structure of the shareholding, the timing of the departure, and the actual disposal.

Important: German GmbH shareholders who move on from Spain to a third country (e.g. Dubai) could theoretically encounter both exit tax regimes: the Spanish one upon leaving Spain and — depending on individual circumstances — additional claims from Germany, should the German tax not yet have been settled in full.


Special case: returning to Spain

What happens if you leave Spain, exit tax is assessed, but you return within a few years? Spanish law provides that, upon a return to Spain within five years (and under certain conditions within ten years), the assessed exit tax can be reversed, provided the assets have not yet been disposed of. In that case, the tax is effectively 'put on ice' and cancelled upon a genuine return.

This principle protects individuals who go abroad only temporarily — for example for an overseas assignment. However, it also means that anyone who sells their shares after departing and then returns can no longer benefit from this provision.


What the exit tax does not cover: key exemptions

Not everything held in a portfolio triggers exit tax. The following is not covered by Artículo 95 bis:

  • Government bonds, corporate bonds, and other fixed-income securities – the exit tax applies only to equity instruments (shares, stocks, fund units).
  • Property – property is subject to separate tax rules upon departure; Article 95 bis does not apply.
  • Bank deposits – pure deposits are not equity.
  • Portfolios below the threshold values – anyone holding less than €4 million in a qualifying portfolio and owning no stake of 25% or more is not affected.
  • Residents with fewer than 10 years of residence – the ten-year threshold protects recent arrivals.

Note: Cryptocurrencies are mentioned in relevant sources as assets potentially covered. The precise tax classification of crypto assets under Article 95 bis is an evolving area of law – specialist advice is recommended here.


The most common mistakes when leaving Spain

From the day-to-day advisory experience of tax experts, the same mistakes crop up time and again on the subject of exit tax:

  1. Planning too late: The tax only becomes an issue once deregistration has already taken place. By then, the options for structuring are considerably more limited.
  2. Confusing municipal registration with tax residency: Deregistering with the Ayuntamiento (Empadronamiento) does not automatically mean that tax residency in Spain comes to an end.
  3. Missing acquisition records: Anyone who cannot demonstrate the price at which they originally acquired their shares risks the AEAT setting the acquisition price low – resulting in a correspondingly higher tax liability.
  4. Failure to apply for a deferral of payment: For departures to EU countries, the deferral is not granted automatically – it must be applied for.
  5. Double taxation not examined: Anyone who moved to Spain from Germany first and is now moving on may potentially have two countries with exit tax claims. The 2012 Germany–Spain double taxation agreement governs the allocation – but only if it is actually applied.
  6. Underestimating the valuation question: For non-listed companies, the "market value" is not automatically clear. The AEAT may carry out its own valuations, against which you would have to lodge an appeal.
  7. Ignoring the timing of departure: It can sometimes be worth scheduling the departure for a specific point in time (for example, following a drop in prices) in order to minimise latent gains. This is legitimate tax planning – but only possible if you start early enough.

What comes next? Tax obligations as a non-resident

After leaving Spain, the obligation to pay IRPF comes to an end – but not all tax-related points of contact with Spain. Anyone who still holds assets in Spain after departure (property, bank accounts, company shares) remains subject to certain reporting obligations and tax liabilities as a non-resident.

Specifically relevant:

  • Non-resident tax (IRNR): Non-resident tax is payable on rental income from Spanish properties or other income sourced from Spain. Find out more in our guide to non-resident tax in Spain.
  • Modelo 720 (overseas assets declaration): This form applies to residents who are required to declare assets held abroad – once you leave Spain, this obligation no longer applies. More information in our guide to the Modelo 720.
  • In the event of an EU deferral of the exit tax: Spain may require you to report annually to confirm that the deferred tax liability remains outstanding. The requirements and format are governed by the relevant administrative instructions issued by the AEAT.
  • Testamentary arrangements: Anyone leaving assets behind in Spain should consider drawing up a Spanish will. More on this: Spanish will.

Checklist: leaving Spain when exit tax may apply

  • Residency duration reviewed: have I been resident for 10 out of the last 15 years?
  • Portfolio assessment: do I exceed the €4 million threshold, or the €1 million threshold with a ≥ 25 % shareholding?
  • Tax adviser (Asesor Fiscal / Gestoría) engaged – ideally 6–12 months before the planned departure
  • Acquisition records compiled for all qualifying assets
  • Valuation report commissioned for non-listed shareholdings
  • Destination country assessed: EU/EEA or third country?
  • For departure to an EU country: application for payment deferral prepared
  • Modelo 030 (tax deregistration with the AEAT) prepared
  • IRPF return for the year of departure noted (April–June of the following year)
  • Double taxation agreement between Spain and the destination country reviewed
  • German exit tax (§ 6 AStG) reviewed separately if you previously moved from Germany to Spain
  • Non-resident obligations following departure (IRNR) recorded in respect of remaining Spanish assets
  • Possibility of returning within 5 years considered (tax liability could be reversed)

Conclusion: exit tax in Spain is manageable – but only with advance planning

The Spanish exit tax does not affect everyone. Those who have lived in Spain for just five years, or who hold a portfolio worth less than €4 million, have no immediate need to act. However, for anyone who has been resident for a decade or more and has built up a significant securities portfolio or a business shareholding during that time, Article 95 bis represents a genuine tax exposure that needs to be planned for well in advance.

The good news is that moving to an EU country can be planned for. The payment deferral protects against an immediate liquidity crisis. And with the right timing – before a planned sale of the shares – the tax impact can often be significantly reduced. What does not work is rushing through the deregistration and ignoring the tax side of things. The AEAT is increasingly scrutinising the departures of high-net-worth individuals.

Seek advice from an Asesor Fiscal specialising in international tax law before you sign anything – not afterwards.



Official Sources

  • Article 95 bis of the IRPF Act (Ley 35/2006): Legal basis of the Spanish Exit Tax – Sede de la Agencia Tributaria (AEAT)
  • AEAT – Agencia Tributaria: The competent tax authority for filing the IRPF return and applications for deferral of payment – www.agenciatributaria.es
  • EU Anti-Tax Avoidance Directive (ATAD, 2016/1164/EU): Directive of the European Parliament and of the Council, Article 5 (Exit Taxation) – EUR-Lex
  • § 6 Außensteuergesetz (AStG) – German Exit Tax: Federal Ministry of Justice – www.gesetze-im-internet.de
  • Double Taxation Agreement Germany–Spain (2012): Double taxation treaty applicable to cross-border matters between both countries – Federal Ministry of Finance
  • ECJ Ruling C-9/02 (Lasteyrie du Saillant) and ECJ Ruling C-371/10 (National Grid Indus): Landmark decisions on the compatibility of exit tax provisions with the European freedom of establishment
When exactly does the Spanish exit tax apply?
The exit tax applies when you have been tax-resident in Spain for at least 10 of the last 15 tax years, you give up your residency, and you either hold shares with a market value of at least 4 million euros or own a stake of 25% or more in a company worth at least 1 million euros.
Do I have to pay the exit tax immediately if I move to Germany?
No. When relocating to an EU member state, you can apply for a deferral of payment. The tax only becomes due when you actually sell the shares.
What happens if I return to Spain after leaving?
If you return to Spain within five years (or, under certain conditions, ten years) and have not yet sold the assets, the assessed exit tax can be reversed.
Are the shares in my portfolio affected by the Spanish exit tax?
Only if the total market value of your qualifying portfolio exceeds 4 million euros. A standard portfolio of shares and ETFs in the six-figure or low seven-figure range typically falls below this threshold.
Does the exit tax also apply to cryptocurrencies?
Crypto assets are mentioned in relevant sources as potentially covered assets. However, the precise legal classification under Artículo 95 bis is an evolving area of law — specialist advice is particularly important here.
I moved from Germany to Spain as a GmbH shareholder. Could I face a double exit tax when leaving Spain?
Possibly, yes. The German exit tax (§ 6 AStG) either applied when you left Germany or will apply upon a further move to a third country. The double taxation agreement between Germany and Spain of 2012 is intended to prevent double taxation, but the specific crediting mechanism is complex and must be assessed on a case-by-case basis.
How do I report the exit tax in Spain?
You declare it as part of your regular IRPF annual tax return for the year of departure — supplemented by the specific annex for Artículo 95 bis. The return is generally filed between April and June of the following year.
Does the Spanish exit tax also cover property?
No. Artículo 95 bis applies only to equity interests such as shares, company stakes, and fund units. Property is subject to different tax rules upon leaving Spain.