Leaving Spain: how to end your tax residency cleanly in 2026

To leave Spanish tax residency in 2026, stay 183 days or fewer, move your economic base and get a foreign tax certificate. Steps, forms and exit tax.
Leaving Spain: how to end your tax residency cleanly in 2026

Quick answer

To stop being a Spanish tax resident in 2026, you must spend 183 days or fewer in Spain in the calendar year, move your main economic interests abroad and prove residence elsewhere with a foreign tax certificate. Residence is all-or-nothing per year, so leaving in July usually still means a full Spanish year. Large shareholdings can trigger exit tax.

Last reviewed: November 2026 · Reviewed by Stéphane Gombauld, tax expert, technologist and digital nomad

Heavnn

Stay tax compliant, wherever you work

Answer a few questions and get a clear plan for your own situation.

Check my tax setup →

You are leaving Spain and want Spain to stop taxing your worldwide income. This guide gives you your exit plan: when residence really ends, what to deregister, which returns to file and the traps that keep people resident for years.

Ceasing Spanish tax residency in 2026: the key figures

Item Rule for 2026
Residence period Calendar year, all-or-nothing, no split year
Day-count limit to be non-resident 183 days or fewer in Spain, including sporadic absences
Proof of new residence Tax residence certificate from your new country
Tax-haven rule Spanish nationals moving to a listed haven stay resident 4 more years
Exit tax trigger 10 of last 15 years resident + shares worth over EUR 4 million (or over 25% stake worth over EUR 1 million)
Last resident return Modelo 100, early April to 30 June of the following year
Change of tax address Modelo 030 (or 036/037 if self-employed)
Non-resident return Modelo 210 for Spanish-source income

Is this guide for you?

Read on if you…

  • are leaving Spain to live or work in another country;
  • became a digital nomad and no longer have a fixed Spanish base;
  • hold a sizeable shareholding or crypto portfolio and fear an exit charge.

Probably not your case if you…

When does your Spanish tax residency actually end?

Spain looks at each calendar year separately. You are resident for the whole year if you meet any one of the three tests in article 9 LIRPF: more than 183 days, main economic interests in Spain, or spouse and minor children living there. The tests are explained in tax residency criteria in Spain.

So, in practice:

  • Leave before early July and stay away: you can be non-resident for that year, if you also move your economic interests and family.
  • Leave in the second half of the year: you have usually passed 183 days, so Spain taxes your worldwide income for the whole year.

Good news: if your new country treats you as resident from arrival, the tax treaty tie-breaker can give it taxing rights for the second half of the year. Check the tax treaties of Spain.

Which tests can keep you resident after you leave?

Test Why it catches leavers How to break it
More than 183 days Travel months count as "sporadic absences" Foreign tax residence certificate for the year
Economic interests Spanish company, clients or assets stay behind Move your business, clients or management abroad
Family presumption Spouse and children stay in Spain Proof you live elsewhere; ideally the family moves too

Here's the catch for nomads: if you have no residence anywhere, Spain can keep treating your travel time as sporadic absences. Leaving to "live everywhere" rarely ends Spanish residence.

The tax-haven rule for Spanish nationals

If you are a Spanish national and move to a jurisdiction on Spain's non-cooperative list, you stay resident for the year of the move and the next four (article 8.2 LIRPF). Foreign nationals are not caught by this rule.

Do you owe exit tax when you leave Spain?

Possibly. Article 95 bis LIRPF taxes unrealised gains on shares and fund units when you lose residence. It applies if you were resident for at least 10 of the last 15 years and either:

  • the market value of your shares and fund units exceeds EUR 4 million; or
  • you hold more than 25% of a company and that stake is worth over EUR 1 million.

The gain is taxed in the savings base, at 19% to 30% in 2026. If you move to another EU/EEA state with tax information exchange, you can defer the tax and only pay if you sell within 10 years. Moves elsewhere for work to a treaty country can also get a deferral, with conditions.

Crypto and property are not in the exit tax base, but they stay in scope for other taxes. More on gains in taxation of capital gains in Spain.

How do you leave Spain properly? Your exit timeline

Before you leave (1–3 months out)

  1. Choose your departure date. Aim for the first half of the year if you want the year itself to be non-resident.
  2. Secure residence abroad: lease, local registration and a plan to get a tax residence certificate.
  3. Check exit tax if your portfolio or company stake is large.
  4. Decide what stays in Spain: property, company, bank accounts. Each keeps a Spanish tax link.

When you leave (departure month)

  1. Deregister from the padrón at your town hall, or register at your consulate abroad (Spanish nationals).
  2. File Modelo 030 to give the tax office your new foreign address, or Modelo 036/037 if you were self-employed.
  3. Deregister from RETA (self-employed Social Security) within three days of stopping your activity.
  4. Tell your Spanish banks and brokers you are now non-resident so they apply the right withholding.

After you leave (following 18 months)

  1. File your last Modelo 100 for your final resident year, by 30 June of the next year.
  2. Get a tax residence certificate from your new country for each year.
  3. File Modelo 210 for any Spanish-source income, such as rent or imputed income on a property you keep.
  4. Keep your proof file for at least four years, the standard statute of limitations.

Example – Lucía, Spanish freelance marketer

Lucía leaves Madrid for Lisbon on 15 April 2026. She spends 105 days in Spain in 2026, moves her clients to her Portuguese business and her partner moves with her. She deregisters from the padrón and RETA, files Modelo 030 and gets a Portuguese certificate. Spain treats her as non-resident for all of 2026 and taxes only her Madrid flat rent at 19%. Had she left on 15 August, she would have passed 183 days and filed a full Spanish return.

Lucía's exit hinged on one date. Yours probably does too.

Check your departure date, exit tax exposure and paperwork before you leave, not after the tax office writes.

Check my tax setup →

Common mistakes (and what they cost)

  • Leaving in autumn and assuming a split year → Spain taxes your worldwide income for the whole year.
  • Keeping your Spanish company managed from Spain → the economic-interests test keeps you resident and the company stays Spanish.
  • Not getting a residence certificate abroad → your absences count as Spanish days and you lose the argument.
  • Ignoring exit tax → a charge at up to 30% on unrealised gains, with interest and penalties if found later.
  • Forgetting Modelo 210 on a Spanish flat you keep → penalties and interest on rent or imputed income.

Frequently asked questions

Can I become non-resident in Spain in the middle of the year?

Not under Spanish domestic law. Residence covers the whole calendar year. If you spend more than 183 days in Spain or keep your economic interests there, you are resident for all of it. A treaty tie-breaker can shift taxing rights to your new country for the period after your move, but only if that country also treats you as resident.

What forms do I file when I leave Spain?

File Modelo 030 to report your new foreign tax address, or Modelo 036/037 if you were self-employed. Deregister from RETA and the padrón. Then file your final Modelo 100 for the last resident year. From the following year, file Modelo 210 for Spanish-source income such as rent. Keep copies of every filing.

Do I still pay tax in Spain after leaving?

Yes, on Spanish-source income. Non-residents pay 24% on most income, 19% if resident in the EU/EEA, and 19% on dividends, interest and gains. A Spanish home you keep can generate imputed income tax, plus non-resident wealth tax above the allowance. Your treaty may reduce some withholding rates.

Does the exit tax apply to crypto?

No. Spain's exit tax covers shares and units in collective investment funds. Crypto is not in the base. But if you sell crypto in a year when you are still Spanish resident, the gain is taxed at 19% to 30%. Time your sales after residence ends, and read taxation of cryptocurrencies in Spain.

How does leaving Spain compare with leaving Portugal or Italy?

Each country has its own split-year and exit rules. Portugal allows partial-year residence in some cases, while Italy uses a 183-day test with registry rules. Compare the practical guide to ceasing your tax residency in Portugal and in Italy if you hold ties there too.

Sources

This guide is general information, not personalised tax advice. See how we research and review.

Plan your exit from Spain without loose ends

Tell us your departure date and what you keep in Spain, and we will check your exit before you go.

Start with Heavnn →
About the author
Heavnn

Heavnn

Heavnn is a borderless tax technology solution supporting the future of work. We assist international remote workers with the design and implementation of their global tax setups.

Welcome to Heavnn University!

Access all of our learning resources, blogs, and articles for digital nomads, remote workers, and distributed teams right here on Heavnn University. For more tailored advice, take our digital interview below!

Design Your Global Remote Setup
Heavnn University

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to Heavnn University.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.