Being tax resident in Spain is not something you apply for or are granted. It is a matter of fact that the law measures every year with two tests: the days you spend here and where your economic interests are. It decides whether you pay IRPF (Spanish income tax) on everything you earn worldwide or only non-resident tax on what you earn in Spain. It is one part of our guide to foreigners in Spain: NIE, Social Security and tax.
Here are the rules in article 9 of Ley 35/2006 on IRPF, how the days are counted, what happens in the year you arrive or leave and how to prove your residence with a certificate.
The two tests in article 9
You are tax resident in Spain if either of these two conditions is met (article 9.1 of Ley 35/2006). One is enough.
More than 183 days in the year
If you spend more than 183 days of the calendar year, 1 January to 31 December, in Spain, you are resident. They do not need to be consecutive: every day in the year is added up.
Sporadic absences (ausencias esporádicas) count as days in Spain. If you live here and spend two weeks on holiday back home, those two weeks count. The only way to stop them counting is to prove that you are tax resident in another country, usually with a tax residence certificate from that country.
Two points from the same paragraph a):
- If you claim to live in a country or territory regarded as a tax haven, the tax agency may require you to prove that you spent 183 days of the year there. The anti-fraud law now reads that reference as meaning non-cooperative jurisdictions (tenth additional provision of Ley 36/2006).
- Temporary stays in Spain under unpaid cultural or humanitarian cooperation agreements with Spanish public bodies are not counted.
The centre of your economic interests
You are also resident if the main centre or base of your business activities or economic interests is in Spain, directly or indirectly (article 9.1.b). This test does not count days. If your business, your main clients or most of your income and assets are in Spain, you can be resident even if you spend fewer than 183 days here.
The family presumption
The law adds a presumption: you are taken to be resident if your spouse (not legally separated) and your dependent children under 18 usually live in Spain. It is a rebuttable presumption: you can prove that you yourself do not live here.
One year, one answer: no split year
IRPF is calculated by calendar year and falls due on 31 December (article 12 of Ley 35/2006). The tests in article 9 are applied to the whole year. That is why Spanish law has no "split year" of the kind some other countries have: you are not non-resident until the day you arrive and resident from then on. You are either resident for the whole year or not at all.
This surprises many newcomers: if you are resident in the year you arrive, you declare in Spain everything you earned that year, including what you were paid at home before the move. A resident is taxed on all their income, wherever it was earned (article 2).
Two examples
Marta arrives on 15/05/2026. From 15/05/2026 to 31/12/2026 there are 231 days. She spends more than 183 in Spain, so she is tax resident for all of 2026. In her 2026 Renta (the annual income tax return), filed in 2027, she declares her Spanish salary and also what she earned from January to May in her home country. The double tax treaty and the deduction in article 80 stop her paying twice on those months.
Tomás arrives on 01/09/2026. From 01/09/2026 to 31/12/2026 there are 122 days. If his economic interests stay in his home country, he is not resident in Spain in 2026: he pays non-resident tax only on what he earns here in those months. In 2027, if he stays, he will be resident for the whole year.
The year you leave works the same way. If you move abroad on 30/09, you have spent more than 183 days in Spain and are resident for that whole year, unless another country also treats you as resident and the treaty says otherwise.
If another country also treats you as resident
Each country applies its own law. So two countries can treat you as resident at the same time. If Spain has a double tax treaty with that country, the treaty breaks the tie with tests in order: permanent home, centre of vital interests, where you habitually live and nationality. We explain it in what a double tax treaty does.
Spanish nationals moving to a tax haven
There is a special rule for Spanish nationals: if they move their residence to a country or territory regarded as a tax haven, they remain IRPF taxpayers in the year of the move and the four years after (article 8.2 of Ley 35/2006). As above, the reference to tax havens is now read as non-cooperative jurisdictions.
What changes between resident and non-resident
| Tax resident | Non-resident | |
|---|---|---|
| Tax | IRPF (Ley 35/2006) | Impuesto sobre la Renta de no Residentes, non-resident income tax (Real Decreto Legislativo 5/2004) |
| Which income | All of it, earned in any country (article 2) | Only income obtained in Spain (article 13) |
| Rate | Progressive scale by bands | 24% in general, 19% if you live in the EU or EEA with exchange of information (article 25.1.a) |
| Return | Annual Renta, modelo 100 | Modelo 210, except for income on which tax was already withheld (article 28.3) |
The IRPF bands are in Spain's IRPF tax bands, the annual return in modelo 100 and the non-resident owner's case in modelo 210.
The tax residence certificate
To prove where you live for tax purposes, the document that counts is the tax residence certificate issued by each country's tax administration.
- If you are resident in Spain and another country asks for it, for example so that no tax is withheld or to apply a treaty, you request it on the Agencia Tributaria's online office (sede electrónica) under "Todas las gestiones", "Certificados", "Censales", identifying yourself with Cl@ve, a digital certificate or an electronic DNI. You choose the treaty country or "Sin convenio" (no treaty). According to the Agencia Tributaria, if you meet the requirements you get it immediately; you can also request it at an office on form 01.
- If you live in another country and want to show that your absences from Spain are not sporadic, or to deduct expenses on modelo 210, you need the certificate from that country's tax administration.
Tax residence is not legal residence
Your residence permit, your EU registration certificate or your entry on the padrón (the town hall register) do not decide your tax residence. You can hold a TIE and not be tax resident in a given year, or be tax resident without being on the padrón. We go through examples in tax residency versus legal residence.
If you are coming to work, check whether the Beckham law suits you: it lets you pay tax under the non-resident rules for six years even though you are tax resident.
How Facturaz helps
If you are tax resident and work as an autónomo (self-employed) in Spain, Facturaz prepares your quarterly taxes from your invoices and expenses. On Autónomo Plus (€44 + IVA a month) our team also files your Renta. See the pricing page, with 14 days free.