How to leave Spain tax residency, legally
A clean exit from Spanish tax residency for freelancers and founders moving to Thailand or Paraguay — Modelo 030, the 183-day rule, exit-tax pitfalls.
Leaving Spanish tax residency is not the same as buying a one-way flight. It’s a paperwork sequence that has to land in the right order, in the right months, with documents the AEAT will accept years later if they look. Done wrong, you stay a Spanish resident for tax purposes long after you’ve moved your laptop. Done right, the file closes cleanly and you stop being on Spain’s hook.
This is the version we run with members. It assumes you’re going to a territorial-tax destination — Thailand or Paraguay — and that you want the exit defensible under audit, not just done.
The 183-day rule is necessary, not sufficient
If you’re physically present in Spain fewer than 183 days in a calendar year, you’ve cleared the first criterion of Article 9 of the Spanish IRPF law. That’s where most internet advice stops. The AEAT looks at three more things, and any one of them can pull you back in:
- Your main center of economic interest. If your business income, real estate, or investment portfolio still anchors to Spain, the days don’t matter. Move the operating company, sell or rent out the property, restructure the holdings.
- Your habitual abode of family. A spouse and minor children resident in Spain is a presumption you’re still resident in Spain. Either the family moves with you or the structure has to address this explicitly.
- Tax-residency certificate from the destination. Without one, the AEAT can default you back to Spanish residency. This is why Thailand’s 180-day rule matters and why we structure for the certificate, not just the visa.
Skip any of those and the 183 days are decoration.
Modelo 030 — the form that actually changes anything
Modelo 030 is the AEAT’s “communication of change of residence.” Filing it is what moves you from contribuyente residente to contribuyente no residente in Hacienda’s database. It’s free, it takes about ten minutes online, and it triggers two consequences:
- Your tax identification status changes for future returns.
- You become subject to Modelo 720 (foreign asset declaration) only for the part of the year you were resident.
File Modelo 030 the year you actually leave, not before. Filing too early creates a mismatch between the date on the form and your actual exit. Filing too late means a year of returns Hacienda still considers domestic.
If you were registered as a self-employed earner (RETA), you also need to:
- File a baja of your activity via Modelo 036 / 037 with the date you stop operating in Spain.
- Notify the Tesorería de la Seguridad Social to deregister from RETA.
- Close out your last quarter cleanly — IVA, IRPF retentions, the works. A half-finished year invites re-examination.
Exit tax — when it bites and when it doesn’t
Spain has an exit tax (Article 95 bis of the IRPF law) that applies if you’ve been resident for at least 10 of the last 15 years AND you hold shares worth more than €4M total OR more than 25% of a company worth more than €1M. Most of our members don’t trigger it. The ones who do typically restructure the holding before the move — moving the equity into a structure that the exit tax can’t reach, or staging the exit across two tax years.
If you don’t trigger it, file Modelo 030 and move. If you might trigger it, the diagnosis call is for that conversation.
What your destination has to do
The Spanish exit only sticks if you’re substantively resident somewhere else. For Thailand, that means:
- 180+ days in country, documented (entry stamps, bank account, lease).
- A Thai tax-residency certificate at year-end. We pull this for every member who stays the 180 days.
- A clean Thai tax filing — even if your taxable income is zero on territorial principles, the filing itself is part of the proof.
For Paraguay, the path is different — the cédula does most of the work, and the 120+ days of presence + your certificado de residencia fiscal close the loop.
Either way, the rule is: don’t just leave Spain — land somewhere. The two halves are the same legal motion.
A 14-week version of the timeline
Most CERØ members run roughly this calendar from engagement to clean-exit:
- Week 1. Diagnosis call. We map your income sources, family situation, and timing constraints. You get a written plan.
- Weeks 2–4. Spanish-side prep. Modelo 036/037 baja, Tesorería deregistration, last-quarter wrap-up, exit-tax assessment if applicable.
- Weeks 4–8. Destination paperwork. DTV file or cédula application, bank account, address.
- Week 8. Plane.
- Weeks 8–14. First days on the ground. Local registrations, lease, tax-residency certificate trigger.
- Year-end. Modelo 030 filed for the year of departure. Last Spanish IRPF return covers only the resident portion of the year.
- Year +1. Tax-residency certificate from your new country — the document the AEAT actually accepts as proof.
The piece nobody tells you
The hardest part of leaving Spain isn’t the paperwork — it’s the appearance of leaving. If your billing address still says Madrid, your Spanish bank account still receives your fees, and you’re back in Barcelona for the holidays for three weeks, the file looks weak. Hacienda has spent the last few years catching exactly this kind of half-exit.
The clean version doesn’t require monastic discipline. It requires a structure that actually moves with you — operating company, banking, address, billing flow. We rebuild this part for every member, because it’s the part that holds up.
Where to go from here
If you want to see the destination math first, run the Thailand tax calculator — it estimates what changes in your pocket once Spain stops taking 45-52%.
If you already know it’s a move and want the diagnosis call, book it here. We’ll tell you on the call whether your situation is one we can run cleanly, or whether you need a different shape.
CERØ handles the DTV visa, Thai tax residency setup and your home-country exit — end to end. Talk to the team about your specific numbers.
CERØ handles the cédula, Paraguayan tax setup and your EU exit — from paperwork to touchdown. Talk to the team about whether Paraguay fits your structure.