Tax residency in Spain: the 183-day rule and other tests
When you are tax resident in Spain in 2026: how the 183 days are counted, the centre of economic interests, dual residency and treaty tie-breakers, residence certificates, the year you move and a Madrid to Lisbon example.

In short
- Meeting either of the two tests in article 9 of the Spanish income tax law is enough: more than 183 days in Spain in the calendar year, or the centre of your economic interests in Spain.
- Sporadic absences count as days in Spain unless you prove with a tax certificate that you are resident in another country.
- There is no split year: you are resident or non-resident for the whole calendar year, including the year you move.
- If two countries both treat you as resident, the tax treaty decides: permanent home, centre of vital interests, habitual abode and nationality, in that order.
- Being resident means paying Spanish tax on your worldwide income and, under the wealth tax, on your worldwide net wealth on 31 December.
What is tax residency and when are you resident in Spain?
You have tax residency in Spain if you spend more than 183 days there in the calendar year, counting sporadic absences, or if the main centre of your business or economic interests is in Spain. Residency is also presumed, unless you prove otherwise, if your spouse and minor children live there. It is decided for each whole calendar year.
Tax residency is not your nationality, your residence permit or your registration on the padrón (the town hall register). According to the non-resident manual of the AEAT, Spain's tax agency, you can hold administrative residence in a country without being tax resident there. What follows applies to Spanish income tax (IRPF) for 2026, filed in 2027, in the common-regime territory; the Basque Country and Navarre have their own foral rules.
What changes if you are a Spanish tax resident?
Article 2 of the IRPF law taxes your income "regardless of where it was earned", and article 5 of the wealth tax law (Impuesto sobre el Patrimonio) uses the same residency tests as income tax.
| What | If you are resident | If you are not resident |
|---|---|---|
| Income tax | IRPF on your worldwide income (art. 2 LIRPF) | Non-resident income tax (IRNR), only on income earned in Spain (art. 1 TRLIRNR) |
| Wealth tax | Personal liability: all your net wealth, wherever it is | Territorial liability: only assets and rights located in Spain |
| Assets abroad | Duty to report accounts, securities, property and crypto held abroad (additional provision 18 of the General Tax Law), that is, Form 720 (modelo 720) | Does not apply |
| Key date | IRPF and wealth tax accrue on 31 December | Same date for wealth tax |
Wealth tax accrues on 31 December (article 29): your 2026 wealth tax depends on your residence in 2026 and is filed in 2027. If you are resident and leave, the same article 5 lets you choose to keep paying under personal liability; you opt in by filing on that basis for your first year as a non-resident.
How are the 183 days counted?
Article 9.1.a of the IRPF law requires presence in Spain for "more than 183 days during the calendar year". These are days from 1 January to 31 December, not a rolling period, and they do not have to be consecutive. With 183 days you are not resident; with 184, you are.
The AEAT's income tax manual for 2025 sets out how the TEAC (Tribunal Económico-Administrativo Central, the central tax appeals board) counts presence, adding up three blocks:
- Certified presence. Every day on which you are proven to be in Spain counts in full, with no minimum number of hours.
- Presumed days. Days reasonably falling between two certified presences, unless you prove you were abroad that day.
- Sporadic absences. Days abroad are added to the above, unless you prove your tax residence in another country.
Temporary stays in Spain under unpaid cultural or humanitarian cooperation agreements with Spanish public authorities do not count.
Sporadic absences and the tax residence certificate
A business trip or a holiday is added to your days in Spain unless you hold a tax residence certificate from another country. Wanting to come back is not enough either: according to the same manual, the Supreme Court, in judgments of 28 November 2017 and January 2018, rejected the idea that intending to return turns time abroad into a sporadic absence. What counts is the actual length of the stay.
The certificate is issued by the tax authority of the country concerned and, according to the AEAT, is valid for one year. If another country asks you for a Spanish one, the AEAT issues it.
If you move to a non-cooperative jurisdiction
When the other country is a tax haven, the AEAT "may require proof of presence there for 183 days in the calendar year". Since 11 July 2021, references to tax havens are read as references to non-cooperative jurisdictions, as the non-resident manual explains. If you are a Spanish national and prove your new residence in one of them, you remain liable to Spanish income tax in the year of the move and the next four years (article 8.2).
The list is in Order HFP/115/2023, which changed in 2026. Order HAC/649/2026 removed Barbados, Dominica, Gibraltar, Samoa (for its offshore regime), Seychelles and Trinidad and Tobago with effect from 28 June 2026, and added Russia for its international holding company regime from 28 December 2026. The change only applies to tax periods starting from that date: for Spanish income tax in 2026, Gibraltar still counts as a non-cooperative jurisdiction, and it stops counting in 2027. Andorra is not on the list; if you are considering it, see the guide to moving to Andorra.
What is the centre of economic interests?
You can be resident with very few days in Spain. Article 9.1.b adds a second, separate test: that "the main centre or base of your business activities or economic interests, directly or indirectly" is in Spain.
The law does not say how to measure it. The Supreme Court spelled it out in its judgment of 8 July 2024:
- It is a comparison: the question is whether Spain holds "the greater volume of activities and economic interests in relative terms" compared with the other country.
- Everything is weighed: where you earn your income, where your property and investments are, and where they are managed from.
- Wealth matters: you can be resident even if your main source of income is abroad, if you keep most of your real estate or financial assets in Spain, because that "can be a relevant indication".
- It is a question of fact, subject to the burden-of-proof rules in article 105 of the General Tax Law.
The family presumption
The same article presumes, "unless proven otherwise", that you are resident if your spouse (not legally separated) and your dependent minor children habitually live in Spain. It is a presumption: you can rebut it with evidence, but providing that evidence is up to you.

What happens if two countries treat you as resident?
Each country applies its own law, so dual tax residency is common: Spain treats you as resident because of your economic interests and Portugal, for example, because your home is there. If there is a double tax treaty, its article 4 settles it. According to the AEAT, the treaties Spain has signed generally follow this order, which is the one in article 4.2 of the Spain–Portugal treaty:

The other country's tax residence certificate is the key document. The 2024 judgment reiterates the doctrine the Supreme Court set on 12 June 2023:
- Neither the AEAT nor the Spanish courts can review how another state issued a certificate for treaty purposes, or disregard it.
- Its validity is presumed: it opens a residence conflict that is resolved under the treaty rules, not under Spanish law.
- The treaty's "centre of vital interests" is broader than the income tax law's "centre of economic interests", because it includes personal relationships.
Be careful: the certificate does not win the case on its own. In the 2024 judgment the taxpayer held a UK certificate, and the Supreme Court still confirmed he was resident in Spain, because under the tie-breaker his centre of vital interests was there. Without a treaty there is no tie-breaker, and you can end up taxed as a resident in both countries.
How does the AEAT prove where you live?
Under article 105 of the General Tax Law, whoever asserts a right must prove the facts. In practice, if the AEAT says you are resident, it must prove it; if you want your absences not to count, you must provide the other country's certificate.
The AEAT can rely on indirect evidence: article 108.2 accepts presumptions where there is "a precise and direct link" between the proven fact and the one inferred, and article 106.2 lets it use information from other states obtained through mutual assistance. Evidence can include, for example, card payments, tickets, household utility use, the children's school, employment contracts, and where your wealth is held and managed from.
Tip
Keep a daily log of where you sleep and keep proof for each day: boarding passes, payments, bookings. Each year, ask the other country for a tax residence certificate for treaty purposes and keep the returns you file there.
What happens in the year you change residence?
The IRPF tax period is the calendar year and the tax accrues on 31 December (article 12). That is why, according to the AEAT's non-resident manual, you are "resident or non-resident for the whole calendar year": a change of residence does not interrupt the tax period.
Important
Spain has no split year. If you leave in July having already spent more than 183 days in Spain, or with your economic interests still there, you are resident for the whole year and taxed on your worldwide income, including what you earn after leaving, subject to how the treaty with your new country allocates it.
The year you stop being a Spanish taxpayer also brings other rules:
- Pending income. Income not yet allocated to a tax year goes into your last return as a resident (article 14.3). If you move to another EU state, you can declare it as it arises.
- Exit tax. If you were resident for at least 10 of the previous 15 tax periods and your shares are worth more than €4,000,000, or more than €1,000,000 in a company in which you hold more than 25%, the unrealised gain is taxed (article 95 bis). We explain it in the exit tax guide.
- On arrival. If you move to Spain, your arrival year is assessed the same way. The inbound workers' regime requires that you were not resident in the previous five tax periods (article 93); see the guides to the Beckham Law and to moving to Spain with wealth.
Inside Spain: the autonomous community
If you are resident, article 72 decides which autonomous community (region) you belong to for income tax: the one where you spend most days of the year, presumed to be where your main home is. Moves between regions whose main purpose is to pay less tax have no effect. The law presumes there was no move, unless the new residence lasts at least three years in a row, if three things happen: your tax base rises by at least 50% in the year of the move or the next, that year you pay less than you would have in your former region, and you go back to it within the following two years.
Illustrative example: a business owner between Madrid and Lisbon
Marta is 51 and lives in Madrid. She is the sole shareholder of the holding company that controls the software company she founded, and she earns €350,000 a year as chief executive. Her husband and their 14-year-old son live in Madrid. Her net wealth is €10,000,000:
| Asset | Where | Value |
|---|---|---|
| Shares in her holding company | Spain | €6,000,000 |
| Fund portfolio at a Spanish bank | Spain | €1,600,000 |
| Family home | Madrid | €1,500,000 |
| Flat bought in May 2026 | Lisbon | €900,000 |
| Total | €10,000,000 |
She has €9,100,000 in Spain, 91%, and €900,000 in Portugal, 9%. On 1 June 2026 she settles in Lisbon, runs the company from there and goes back to Madrid for board meetings, in August and at Christmas. Her family will stay in Madrid until their son finishes the school year. Her question: does she stop being resident in Spain in 2026?
Step 1. The days. From January to May, 151 days, she has proven presence in Spain on 139 days and spends 12 abroad (two trips to Lisbon and a holiday in Italy). As she was not resident anywhere else at the time, those 12 days are sporadic absences and they count. From June to December, 214 days, she spends 30 in Madrid. To keep it simple, each travel day counts in one country only.

That makes 181 days: not more than 183, but with a margin of only 3 days. One badly logged weekend or one presumed day between two trips would change the result.
Step 2. The centre of economic interests. Here everything points to Spain: 91% of her wealth is there and 100% of her income is paid by her Spanish company. Under the Supreme Court's test, the greater volume of her interests is in Spain, so she is resident in Spain in 2026 under article 9.1.b, even with fewer than 184 days. On top of that, her husband and son live in Madrid, which triggers the family presumption.
Step 3. Portugal claims her too. Article 16 of the Portuguese income tax code treats as resident anyone who spends more than 183 days there in any 12-month period starting or ending in the year, or who has a home suggesting they intend to use it as their habitual residence. Marta has a flat in Lisbon and spends 184 nights there. Unlike Spain, Portugal treats her as resident from the first day of her stay, 1 June, not for the whole year. She is a dual resident.
Step 4. The treaty breaks the tie. She has a permanent home in both countries, so the test moves on to the centre of vital interests: her family, her company and 91% of her wealth are in Spain.

Result. In 2026 Marta is resident in Spain for treaty purposes. In 2027 she files her 2026 IRPF return on her worldwide income and her wealth tax return under personal liability on her €10,000,000, and she should check whether the Lisbon flat must go on Form 720.
Step 5. What would have to change in 2027. Counting days is not enough to stop being resident. While 91% of her wealth stays in Spain, the centre of economic interests may still point there and Spain would still treat her as resident; the treaty would then decide, starting with where she has a permanent home and where her family lives. The move must be real: faking a move that has not happened is sham (simulación, article 16 of the General Tax Law), with late-payment interest and, where applicable, a penalty. And if she stops being a Spanish taxpayer, her €6,000,000 shareholding exceeds the €4,000,000 exit tax threshold; moving to another EU state, she can choose to declare the gain only if, within the next ten years, she transfers the shares during her lifetime, stops living in the EU or the European Economic Area, or fails to meet the duty to report the choice.
How Melso helps
Deciding in which year and on what terms you change residence means weighing days, wealth, family, the treaty and the exit tax before you move. At Melso Private, tax advisers working with AI that reads each country's tax law model the scenarios, and you approve each measure before it is applied: request a conversation.
Common mistakes
- Thinking 183 days means you are not resident. You must go above 183, and the economic-interests test or your family can make you resident with far fewer days.
- Not counting sporadic absences. Your trips count as days in Spain until you hold a residence certificate from another country.
- Assuming you leave mid-year. There is no split year: the year of the move is decided as a whole, and it may be one more year as a resident.
- Relying only on the other country's certificate. It opens the treaty tie-breaker, but if your family and wealth stay in Spain, the tie-breaker can give residence to Spain.
- Moving on paper. Deregistering from the padrón while your life carries on in Spain does not change your residence and may be a sham, with late-payment interest and, where applicable, a penalty.
- Forgetting 31 December. Wealth tax accrues that day, and the exit tax uses values at the accrual date of your last year as a resident.
How Melso helps
Melso Private offers lawful tax planning for people with net wealth from 1 million euros, and tax residency and double tax treaties are part of what it analyses. The AI reads your deeds, returns and statements and cross-checks each country's law and its treaty; your tax advisers review each scenario, choose the measures, stand behind them and coordinate with your advisers in the other country. You see each measure with its legal basis, risk and cost, and nothing is applied or filed, whether income tax, wealth tax or Form 720, until you approve the exact version. The first conversation lasts 45 minutes and is free of charge: Request a conversation at melso.ai/en/private-wealth.
This article is for information only and does not replace professional advice for your case. Last reviewed: 18 October 2026.
Sources
- Law 35/2006 on personal income tax (IRPF), consolidated text: articles 2, 8, 9, 12, 14, 72, 93 and 95 bis, BOE (accessed )
- Royal Legislative Decree 5/2004, Non-Resident Income Tax Law, consolidated text: articles 1, 5 and 6, BOE (accessed )
- Law 58/2003, General Tax Law, consolidated text: articles 15, 16, 105, 106 and 108 and additional provision 18, BOE (accessed )
- Law 19/1991 on wealth tax, consolidated text: articles 5 and 29, BOE (accessed )
- Order HFP/115/2023 on non-cooperative jurisdictions, consolidated text after Order HAC/649/2026 of 21 June, BOE (accessed )
- Spain–Portugal double tax treaty on income: articles 4 and 25, BOE (accessed )
- AEAT income tax practical manual 2025: habitual residence in Spain (TEAC criteria on counting days), AEAT (accessed )
- AEAT non-resident taxation manual (October 2026): residence of individuals, AEAT (accessed )
- Spanish Supreme Court, Third Chamber, judgment 1214/2024 of 8 July (appeal 1909/2023, ECLI:ES:TS:2024:3882), reiterating judgment 778/2023 of 12 June, CENDOJ (Poder Judicial) (accessed )
- Portuguese Personal Income Tax Code (CIRS), article 16 (residence), Autoridade Tributária e Aduaneira (Portugal) (accessed )


