# Tax residency in Spain: the 183-day rule and other tests

URL: https://melso.ai/en/blog/spanish-tax-residency
Published: 2026-10-18 · Updated: 2026-10-18

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.

## 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.

> [!RESUMEN]
> - 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.

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](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/manual-tributacion-no-residentes/capitulo-01-contribuyente-residencia/residencia-personas-fisicas.html), 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](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a2) taxes your income "regardless of where it was earned", and [article 5 of the wealth tax law](https://www.boe.es/buscar/act.php?id=BOE-A-1991-14392#a5) (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](https://www.boe.es/buscar/act.php?id=BOE-A-2004-4527#a1)) |
| 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](https://www.boe.es/buscar/act.php?id=BOE-A-2003-23186#dadecimoctava)), that is, [Form 720](/en/blog/form-720-spain) (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](https://www.boe.es/buscar/act.php?id=BOE-A-1991-14392#a29)): 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](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a9) 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](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2025/c02-irpf-cuestiones-generales/sujecion-irpf-aspectos-personales/residencia-habitual-territorio-espanol.html) sets out how the TEAC (Tribunal Económico-Administrativo Central, the central tax appeals board) counts presence, adding up three blocks:

1. **Certified presence.** Every day on which you are proven to be in Spain counts in full, with no minimum number of hours.
2. **Presumed days.** Days reasonably falling between two certified presences, unless you prove you were abroad that day.
3. **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](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a8)).

The list is in [Order HFP/115/2023](https://www.boe.es/buscar/act.php?id=BOE-A-2023-3508), 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](/en/blog/moving-to-andorra-from-spain-tax).

## 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](https://www.poderjudicial.es/search/AN/openDocument/c57378b03fb38f45a0a8778d75e36f0d/20240719):

- 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.

![You are tax resident in Spain if you spend more than 183 days there in the calendar year, counting sporadic absences, or if the centre of your economic interests is in Spain. If not, you are presumed resident when your spouse and minor children live in Spain, unless you prove otherwise. If another country also treats you as resident, the tax treaty decides.](https://storage.googleapis.com/albert-489117-melso-blog-media/diagrams/en/residencia-fiscal-espana/1-decision-089396462f.png?w=1600&h=1892&m=1&mw=1080&mh=3171 "Source: article 9 of Law 35/2006 on personal income tax (IRPF). Applied year by year, for the whole calendar year.")

## 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](https://www.boe.es/buscar/act.php?id=BOE-A-1995-24001#a4):

![The tie-breaker rules apply in order: first the permanent home; if you have one in both countries, the centre of vital interests; if that cannot be determined, where you habitually live; then nationality; and if there is still no answer, agreement between the two countries' tax authorities.](https://storage.googleapis.com/albert-489117-melso-blog-media/diagrams/en/residencia-fiscal-espana/2-steps-936019cff3.png?w=1600&h=1122&m=1&mw=1080&mh=1746 "Tie-breaker rules when two countries treat you as resident")

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](https://www.boe.es/buscar/act.php?id=BOE-A-2003-23186#a105), 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.

> [!CONSEJO]
> 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](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a12)). 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.

> [!IMPORTANTE]
> 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](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a14)). 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](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a95bis)). We explain it in the [exit tax](/en/blog/exit-tax-spain) 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](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a93)); see the guides to the [Beckham Law](/en/blog/beckham-law-spain) and to [moving to Spain with wealth](/en/blog/moving-to-spain-tax).

### Inside Spain: the autonomous community

If you are resident, [article 72](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a72) 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.

![Marta adds up 139 days of proven presence from January to May, 12 days of sporadic absences and 30 days in Madrid from June to December: 181 days in 2026, below the 184 needed to go above 183.](https://storage.googleapis.com/albert-489117-melso-blog-media/diagrams/en/residencia-fiscal-espana/3-breakdown-f1afe74d0a.png?w=1600&h=990&m=1&mw=1080&mh=1539 "Illustrative example. 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](https://info.portaldasfinancas.gov.pt/pt/informacao_fiscal/codigos_tributarios/cirs_rep/Pages/irs16.aspx) 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.

![In 2026 Marta spends 181 days in Spain and 184 in Portugal and has a permanent home in both. Her family, her €350,000 income and €9,100,000 of her wealth, 91%, are in Spain, against €900,000 in Portugal. Her centre of vital interests is in Spain.](https://storage.googleapis.com/albert-489117-melso-blog-media/diagrams/en/residencia-fiscal-espana/4-compare-94b187e9dc.png?w=1600&h=1238&m=1&mw=1080&mh=2274 "Illustrative example under article 4.2 of the Spain–Portugal tax treaty.")

**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](https://www.boe.es/buscar/act.php?id=BOE-A-2003-23186#a16)), 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.

> [!MELSO]
> 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](/en/private-wealth#contacto).

## 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](https://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.

## Frequently asked questions

### What is tax residency?

It is the country where you are taxed on all your income, which is not the same as your nationality or your residence permit. You are tax resident in Spain if you spend more than 183 days there in the calendar year, if the main centre of your business or economic interests is in Spain, or if it is presumed because your spouse and minor children live there. Article 9 of the Spanish income tax law sets the rules.

### How are the 183 days of Spanish tax residency counted?

Spain counts the days in the calendar year, from 1 January to 31 December, and you must go above 183: with 184 days you are resident. Any day on which your presence in Spain is proven counts in full, with no minimum number of hours. Days reasonably falling between two proven presences also count, and so do sporadic absences, unless you prove with a tax certificate that you are resident in another country.

### What are sporadic absences?

They are days you spend outside Spain without stopping living there: business trips, holidays, visits. The law adds them to your days in Spain unless you prove your tax residence in another country with a certificate from its tax authority. According to Spain's Supreme Court, your intention to come back does not turn a long stay abroad into a sporadic absence: what matters is how long you were actually away.

### What is the centre of economic interests?

It is the second residency test: you are resident if the main centre or base of your business or economic interests is in Spain, even without spending 183 days there. In its judgment of 8 July 2024, Spain's Supreme Court compares the volume of your interests in Spain with those in the other country and weighs income and assets: keeping most of your wealth in Spain can be a relevant indication.

### Can you be tax resident in two countries?

Yes. Each country applies its own law, and two countries can both treat you as resident in the same year. If they have a double tax treaty, its article 4 decides in a fixed order: permanent home, centre of vital interests, habitual abode, nationality and, last, agreement between the tax authorities. Without a treaty there is no tie-breaker, and you can be taxed as a resident in both.

### What is a tax residence certificate for?

It proves that a country's tax authority treats you as resident. It stops your absences from Spain counting as days in Spain and lets you apply a treaty. According to the AEAT, Spain's tax agency, it is issued by each country's competent tax authority and is valid for one year. The Supreme Court presumes that a certificate issued for treaty purposes is valid, but Spain may still treat you as resident.

### If I leave Spain in July, do I stop being resident that year?

Not necessarily. Spain has no split-year treatment: you are resident or non-resident for the whole calendar year. If by July you have already spent more than 183 days in Spain, or your centre of economic interests is still there, you are resident for the whole year and taxed on your worldwide income, including what you earn after leaving, subject to the treaty with your new country.

### What happens if I move to a tax haven?

If you are a Spanish national and move to a non-cooperative jurisdiction, you remain liable to Spanish income tax in the year of the move and the next four years. The AEAT can also require you to prove 183 days of presence there. The list is set by Order HFP/115/2023: Gibraltar left it on 28 June 2026, but for Spanish income tax in 2026 it still counts as non-cooperative.

### Does registering on the padrón or holding a residence permit make me tax resident?

Not on its own. Article 9 of the Spanish income tax law does not mention the padrón (the town hall register) or residence permits: it looks at days of presence, the centre of your economic interests and where your spouse and minor children live. The AEAT points out that you can hold administrative residence in a country without being tax resident there. The padrón is just one more piece of evidence.

### Does tax residency decide how I pay Spanish wealth tax?

Yes. Spain's wealth tax uses the same residency tests as income tax. If you are resident, you pay on your worldwide net wealth; if you are not, only on assets located in Spain. It accrues on 31 December, so your 2026 wealth tax depends on your residence in 2026 and is filed in 2027.

## Sources

- [Law 35/2006 on personal income tax (IRPF), consolidated text: articles 2, 8, 9, 12, 14, 72, 93 and 95 bis](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764), BOE, accessed 2026-10-18
- [Royal Legislative Decree 5/2004, Non-Resident Income Tax Law, consolidated text: articles 1, 5 and 6](https://www.boe.es/buscar/act.php?id=BOE-A-2004-4527), BOE, accessed 2026-10-18
- [Law 58/2003, General Tax Law, consolidated text: articles 15, 16, 105, 106 and 108 and additional provision 18](https://www.boe.es/buscar/act.php?id=BOE-A-2003-23186), BOE, accessed 2026-10-18
- [Law 19/1991 on wealth tax, consolidated text: articles 5 and 29](https://www.boe.es/buscar/act.php?id=BOE-A-1991-14392), BOE, accessed 2026-10-18
- [Order HFP/115/2023 on non-cooperative jurisdictions, consolidated text after Order HAC/649/2026 of 21 June](https://www.boe.es/buscar/act.php?id=BOE-A-2023-3508), BOE, accessed 2026-10-18
- [Spain–Portugal double tax treaty on income: articles 4 and 25](https://www.boe.es/buscar/act.php?id=BOE-A-1995-24001), BOE, accessed 2026-10-18
- [AEAT income tax practical manual 2025: habitual residence in Spain (TEAC criteria on counting days)](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2025/c02-irpf-cuestiones-generales/sujecion-irpf-aspectos-personales/residencia-habitual-territorio-espanol.html), AEAT, accessed 2026-10-18
- [AEAT non-resident taxation manual (October 2026): residence of individuals](https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/manual-tributacion-no-residentes/capitulo-01-contribuyente-residencia/residencia-personas-fisicas.html), AEAT, accessed 2026-10-18
- [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](https://www.poderjudicial.es/search/AN/openDocument/c57378b03fb38f45a0a8778d75e36f0d/20240719), CENDOJ (Poder Judicial), accessed 2026-10-18
- [Portuguese Personal Income Tax Code (CIRS), article 16 (residence)](https://info.portaldasfinancas.gov.pt/pt/informacao_fiscal/codigos_tributarios/cirs_rep/Pages/irs16.aspx), Autoridade Tributária e Aduaneira (Portugal), accessed 2026-10-18
