Home › Questions › Q&A › Spain's exit tax
Spain — the exit tax on leaving tax residency
Tax · Leaving Spain

Spain's exit tax: what happens when you leave

Spain can tax the latent gain on your shares the moment you stop being a tax resident — before you have sold anything. It only bites on large shareholdings held by long-term residents, but for founders and investors the numbers can be significant. Here is how the impuesto de salida works, who it hits, and how to plan a clean departure.

When people plan to leave Spain, they usually think about the practical side of moving — housing, schools, deregistering with the authorities. Fewer expect that the act of ceasing to be a Spanish tax resident can, by itself, trigger a tax charge. Yet that is precisely what Spain's exit tax — the impuesto de salida, set out in Article 95 bis of the Personal Income Tax Act — is designed to do. In narrow but important cases, it treats unrealised capital gains on large shareholdings as if they had been realised at the moment residency ends, so tax can fall due even though not a single share has been sold. This page explains, in general terms, when the charge applies, who it targets, how it is calculated, what deferral and exemption routes exist, how double-tax treaties interact with it, and why taxpayers under the Beckham Regime are generally outside its reach.

Jacob Salama, tax lawyer

"The exit tax rewards those who plan their departure and punishes those who improvise it. Map your residence years, your shareholdings and your destination before you go — not in the final tax return."

— Jacob Salama · International Tax lawyer, Ilustre Colegio de Abogados de Málaga (nº 11294)

What the exit tax actually is

The exit tax is not a general levy on everyone who leaves Spain. The overwhelming majority of people who move abroad — retirees, employees, digital nomads, ordinary savers — will never encounter it. It is a targeted anti-avoidance charge aimed at a specific situation: a long-term Spanish tax resident, sitting on very large unrealised gains in shares or holdings, who moves their residence abroad and could otherwise dispose of those shares in a jurisdiction where the gain would escape Spanish tax.

To address that, Article 95 bis provides that, in defined circumstances, the latent (unrealised) gain in qualifying shareholdings is deemed realised in the last tax period in which the person is still resident. The gain is treated as savings income for that final year, and taxed under the ordinary savings scale, even though there has been no actual sale and the taxpayer has not received a euro of cash. It is, in essence, a snapshot valuation taken on the way out of the country.

Americans should note that their own country runs a mirror image of this idea, pointing the other way: the section 877A mark-to-market regime treats a covered expatriate as having sold everything the day before they give up US citizenship. The two exit taxes are separate, use different tests, and — with sufficiently bad sequencing — can both be met. See renouncing US citizenship after retiring to Spain.

Who it hits: the residence test

The first filter is time. The charge only applies to individuals who have been Spanish tax residents in at least 10 of the previous 15 tax years. Someone who has lived in Spain for only a few years — for example a person who arrived under a visa and later moves on — will not usually meet this long-residence condition and therefore falls outside the exit tax entirely on that ground alone.

This is a deliberate design choice. The exit tax is meant to catch those who have built or accumulated substantial equity value while Spanish residents over a long period, not newcomers passing through. If you are contemplating a move and have not been resident for anywhere near a decade, the residence test alone may already put you out of scope — though the count of qualifying years, and how any Beckham years are treated within it, should always be confirmed for your particular history.

The shareholding thresholds

The second filter is size. Even a long-term resident is only caught if their shareholdings are large enough. Two alternative thresholds apply, and meeting either can bring the charge into play:

Threshold routeBroad condition (confirm for the year)
Market-value routeThe total market value of the qualifying shares exceeds around €4 million.
Significant-stake routeThe market value exceeds around €1 million and the holding represents more than 25% of a single entity.

These are high thresholds by design: the exit tax is aimed at founders and significant investors, not at ordinary portfolios or modest holdings.

The practical effect is that the charge concentrates on a narrow group — company founders sitting on large stakes in their own businesses, and investors holding concentrated positions of considerable value. A retiree with a diversified portfolio well below these figures, or an employee with a small parcel of vested shares, is generally nowhere near the trigger. The exact figures, the assets counted, and how holdings across several entities are aggregated must be checked against the rules in force for the relevant year, as thresholds and definitions can change.

How the latent gain is calculated

Where both the residence test and a shareholding threshold are met, the taxable amount is the difference between the market value of the shares at the point residency ends and their acquisition cost — the same latent gain that would arise on a notional sale. Because there is no actual transaction, valuation is central: the market value has to be established, and for unlisted company shares that valuation is itself a technical exercise that can be contested.

The deemed gain is treated as savings income of the final resident year and taxed under the savings scale applicable to that year. Since the thresholds are high, the resulting gains — and therefore the tax — can be very substantial. This is why founders in particular need to understand the charge long before they plan to leave: a large paper gain that has never generated cash can still crystallise a real, payable tax liability simply because residence has shifted abroad.

Deferral and exemption routes

The exit tax is not always an immediate, unavoidable bill. Article 95 bis contains several relieving mechanisms, and whether one applies depends on where you are going and why. The most important are:

The direction of travel matters. A move to Portugal, France or the Netherlands is treated very differently from a move to a non-EU/EEA jurisdiction. Where you are going can be as important as what you hold when it comes to whether — and when — the exit tax actually bites.

Moving within the EU/EEA and temporary postings

The EU/EEA carve-out deserves emphasis because it changes the practical experience of leaving. For an EU-bound move with proper reporting, the exit tax typically does not require payment on departure; it sits in the background as a conditional charge that only materialises on a later triggering event, such as an actual sale of the shares or a subsequent move outside the EU/EEA within the monitoring window. Compliance is not optional, though — the deferral or hold-over generally depends on notifying the Spanish tax authorities and keeping the position reported for the required years. Missing those formalities can turn a deferred charge into a payable one.

Temporary postings work on a similar logic. If an employee or founder is sent abroad on a genuinely temporary basis and intends to return, the rules recognise that residence has not really been abandoned, and provide for deferral rather than immediate taxation. The key is that the temporary nature must be real and, where required, documented; a "temporary" move that quietly becomes permanent will not hold up.

Interaction with double-tax treaties

Exit taxes sit at an awkward intersection with double-tax treaties, and this is one of the more technical areas of the analysis. Most treaties, following the OECD model, allocate the right to tax capital gains on shares in a particular way, and a source or residence state's ability to impose an exit charge on a departing resident can raise questions about how the treaty allocates that gain — especially where the new state of residence also wishes to tax the same shares, potentially on a stepped-up basis.

The result is that the interaction between Spain's Article 95 bis and any applicable treaty needs to be examined for the specific destination country. Points that commonly arise include whether the deemed gain falls within the treaty's capital-gains article, how the departure timing lines up with the change of treaty residence, and whether relief or a value step-up is available in the new country to avoid the same gain being taxed twice. None of this can be assumed; it turns on the wording of the particular treaty and the domestic law of both states.

Why Beckham taxpayers are generally outside it

A point of real importance for the international clients who most often ask about this charge: individuals taxed under the Beckham Regime are generally outside the exit tax. The reason is structural. The exit tax is built around ordinary worldwide-resident taxation of capital gains — it exists to stop a fully taxed resident from exporting a latent gain untaxed. Beckham-regime taxpayers, however, are taxed broadly as non-residents on their foreign assets: their foreign shareholdings are not brought into Spanish worldwide-income taxation in the ordinary way.

Because the exit tax operates within the framework of worldwide resident taxation of those same latent gains, a person whose foreign equity has never been within that framework typically does not fall within the exit charge on those assets. In other words, the very feature that makes the Beckham Regime attractive — non-resident-style treatment of foreign assets — tends also to place a departing Beckham taxpayer outside the impuesto de salida on that foreign equity.

Not an automatic shield. This is a general position, not a blanket guarantee. The interaction depends on the assets involved, the years spent under the regime versus ordinary residence, how the 10-of-15-years residence count is applied, and the specific facts on departure. It should always be confirmed for the individual case, ideally before the move.

Breaking tax residency cleanly

Whether or not the exit tax is in play, anyone leaving Spain needs to break tax residency properly, because a botched departure can leave you taxed as a Spanish resident on your worldwide income for a year you thought you had left. Spanish tax residency turns primarily on the 183-day rule — broadly, spending more than 183 days of the calendar year in Spain — together with the centre-of-economic-interests test and a family-based presumption. Our dedicated note on the 183-day tax residency rule walks through how those tests actually work.

Leaving cleanly means more than buying a plane ticket. Because Spanish residency is generally assessed by whole calendar years, the timing of departure within the year matters, and the authorities look at the substance of where your life has moved — your home, your family, your economic base — not just a headcount of days. Retaining a home, a family in Spain, or a Spanish economic centre can keep you resident even after you have physically left, which in turn keeps you exposed to Spanish worldwide taxation and, potentially, to the exit-tax analysis.

The final Modelo 100

The last formal step in a clean exit is usually the final IRPF return, Modelo 100, for the last year of Spanish residence. This is the return in which a resident reports their worldwide income for the year — and, where the exit tax applies, it is the mechanism through which the deemed gain on qualifying shareholdings is declared and settled for that final resident period.

Filing the final Modelo 100 correctly matters for two reasons. First, it is where any exit-tax charge (or any elected deferral or hold-over) is formally reflected, so errors or omissions here are precisely where problems later surface. Second, a properly filed final return is part of the evidential record that you did in fact become non-resident from the following year, which supports the clean break you are trying to achieve. For the broader picture of how Spanish taxation applies to internationally mobile individuals, our guide to taxes for expats in Spain gives the wider context.

Planning your departure

The recurring lesson of the exit tax is that the analysis belongs before you leave, not after. Once residency has ended and the shares have moved with you, the room to manage the position narrows sharply. The exit tax is only one strand of the wider wind-down — see our guide to moving back to the US after living in Spain for the padrón, the TIE, the final Spanish return and the Medicare side. A sensible pre-departure review for anyone with substantial equity generally covers:

Done in advance, this exercise replaces anxiety about an unexpected charge with a clear, defensible plan. For most people leaving Spain the exit tax will simply not apply — but for the founders and investors it targets, understanding it early is the difference between a clean departure and a surprise liability.

Frequently asked questions

Does everyone who leaves Spain pay an exit tax?

No. The charge only applies to long-term residents (resident in 10 of the last 15 years) holding very large shareholdings above the thresholds. Most people leaving Spain never encounter it.

Do I pay it if I move to another EU country?

Generally not up front. For moves within the EU/EEA the latent gain is broadly held over and only becomes chargeable on a later sale, a move outside the EU/EEA, or a breach of the reporting conditions — subject to notifying the tax authorities.

Am I affected if I am on the Beckham Regime?

Generally not, because Beckham taxpayers are taxed as non-residents on their foreign assets, which places them outside the worldwide-resident framework the exit tax operates within. This should still be confirmed for your specific facts.

Is the exit tax charged even if I have not sold my shares?

Yes — that is the point. Where it applies, the latent (unrealised) gain is deemed realised in your last resident year and taxed as savings income, even though no sale has taken place.

General information, not tax advice. Grounded in Article 95 bis of the Personal Income Tax Act (LIRPF). The thresholds, residence tests and deferral rules described here are indicative and change; the figures flagged (broadly €4M, and €1M with a >25% stake) and the 10-of-15-years test must be confirmed for your circumstances and year.

Free exit-position review

Find out if the exit tax reaches you

Tell us about your residence history and shareholdings and a Málaga Bar–registered lawyer will reply within 24 hours — in confidence.

✓ Thank you. We'll review your position and reply within 24 hours.

Confidential · No obligation · Reply within 24 hours

Plan a clean departure from Spain

Book a private consultation and we'll map your residence years, shareholdings and destination before you leave.

iMessage WhatsApp