Tax Residency Explained: How Countries Decide Where You Pay Tax

General information, not advice. This guide explains how things usually work. Fees, rules and products change and depend on your country and situation, so check the provider's or authority's own page before you act. See our disclaimer.
Some links may be affiliate links. They never change what we recommend. How we make money.
If you work remotely, move between countries or live abroad, the most important tax question is not “how much tax do I pay?” but “which country gets to tax me?”. The answer depends on your tax residency, and every country decides it with its own rules. Some count days, some look at where your home is, some look at where your family and money are, and one major country taxes its citizens wherever they live.
This guide explains the tests countries use, shows how they work in a few well-known examples and explains what happens when two countries both say you are their resident. It is the foundation for everything else in our taxes section.
The short answer
- Tax residency is a tax status, not an immigration status. You can be a tax resident of a country without a residence permit, and you can hold a residence permit without being a tax resident.
- Residents are usually taxed on their worldwide income. Non-residents are usually taxed only on income from sources in that country.
- Countries use different tests: days of presence, a permanent home, the centre of your personal and economic life, and sometimes nationality.
- You can be resident in two countries at once, or, much less often, in none. Tax treaties contain tie-breaker rules for the first case.
- Leaving a country does not always end your residency there. Some countries keep treating you as resident until you prove you have moved.
Why tax residency matters so much
Your tax residency decides three things:
- Which income is taxed. A resident is normally taxed on income from anywhere in the world: client payments from abroad, foreign interest, rental income in another country. A non-resident is normally taxed only on local-source income.
- Which rates and allowances apply. Many countries give personal allowances and progressive rates to residents and flat withholding rates to non-residents.
- Which reporting obligations you have. Residents may need to declare foreign bank accounts, investments and assets, sometimes with heavy penalties for not doing so.
Getting it wrong can mean paying tax twice, paying in the wrong place, or being assessed years later for tax you thought you did not owe.
The four main tests countries use
Most countries combine several of these tests. Meeting any one of them is often enough to make you resident.
1. Physical presence (counting days)
The best-known test. You become resident if you spend a certain number of days in the country in a period, most commonly 183 days. Details differ a lot: some countries count per calendar year, others over any 12-month period, and they disagree on whether a partial day counts. We explain the detail in our guide to the 183-day rule.
2. Permanent home or habitual residence
Many countries treat you as resident if you have a home available to you there, even if you spend fewer days than the day-count threshold. A rented flat you keep year-round can be enough. A hotel or a short holiday rental usually is not.
3. Centre of vital or economic interests
Some countries look at where your life is really based: where your family lives, where your main business or income is, where your assets and social ties are. Spain, for example, can treat you as resident if the main base of your business or economic interests is in Spain, even below 183 days.
4. Nationality or citizenship
A small number of countries tax based on citizenship. The United States is the main example: US citizens and green card holders are taxed on their worldwide income wherever they live, although reliefs such as the foreign earned income exclusion and foreign tax credit can reduce or eliminate the US tax. See the IRS page on US citizens and resident aliens abroad.
How it works in practice: examples
These summaries show how different the rules are. They are simplified and change over time, so always check the current official guidance.
| Country | Main residency tests (simplified) |
|---|---|
| United Kingdom | The Statutory Residence Test: automatic overseas tests (for example, fewer than 16 days in the UK in the tax year), automatic UK tests (for example, 183 days or more, or your only home is in the UK) and, if neither applies, a “sufficient ties” test combining days with family, accommodation, work and previous-year ties. |
| United States | Citizens and green card holders are always taxed. Other people become resident under the substantial presence test: at least 31 days in the current year and 183 days counting all days this year, one third of last year’s days and one sixth of the year before. |
| Spain | More than 183 days in the calendar year, or the main base of your activities or economic interests in Spain. You are also presumed resident if your spouse and minor children live in Spain. |
| Portugal | More than 183 days in any 12-month period, or a home in Portugal in conditions that suggest you intend to keep it as your habitual residence. |
| Germany | A residence (Wohnsitz) in Germany, or a habitual abode, which generally applies after more than six months of stay. |
| Thailand | 180 days or more in the calendar year. Since 2024, foreign income brought into Thailand by a resident is generally taxable, whatever year it was earned. |
| Mexico | Mainly a home test: you are resident if you establish your home in Mexico. If you also have a home elsewhere, the centre of vital interests decides. Days on their own matter less than people think. |
The takeaway: there is no universal rule. A day count that keeps you non-resident in one country can make you resident in another.
Worldwide, territorial and remittance-based systems
Being resident does not mean the same thing everywhere:
- Worldwide systems (most countries): residents are taxed on income from everywhere.
- Territorial systems (a few countries, for example in Latin America): residents are taxed mainly on local-source income, and most foreign income is outside the tax net. Rules on what counts as “local” vary, and remote work done while physically in the country can be treated as local.
- Remittance-based rules: foreign income is taxed only when brought into the country. Thailand’s rules work this way for residents, and since 2024 the timing of the remittance no longer lets you avoid tax on income earned in the same year.
What happens when two countries both claim you
It is common to meet the residency tests of two countries in the same year: you keep a flat at home and spend seven months somewhere else, for instance. If the two countries have a tax treaty, it usually contains tie-breaker rules that decide which country treats you as resident for the treaty. Based on the OECD Model Tax Convention, the usual order is:
- Permanent home: where you have a permanent home available to you.
- Centre of vital interests: if you have a home in both, where your personal and economic relations are closer.
- Habitual abode: if that cannot be decided, where you usually live.
- Nationality: if you live in both or neither.
- Mutual agreement: as a last resort, the two tax authorities decide between them.
The treaty then decides which country may tax each type of income and how the other gives relief. Read more in our guide to double taxation treaties.
If there is no treaty, both countries may tax you under their own law. Most countries still give some unilateral credit for foreign tax paid, but not always in full.
Leaving a country: when does residency end?
Moving abroad does not automatically end your residency in your home country. Common traps:
- No new residency. If you travel from country to country without becoming resident anywhere, your home country may still consider you resident, especially if you keep a home, family or business there.
- Formal steps. Some countries expect you to deregister, notify the tax authority or prove residency elsewhere with a certificate of tax residence.
- Special rules. Spain, for example, keeps treating its nationals who move to a listed tax haven as resident for the year of the move and the following four years.
- Split years. Some countries, such as the UK, have split-year rules for the year you arrive or leave. Others treat you as resident or not for the whole year.
A practical checklist
- List every country where you spent time, had a home or earned money this year.
- Read each country’s official definition of tax residency, not a forum summary.
- Count your days precisely and keep evidence: travel tickets, passport stamps, rental contracts.
- Check whether a treaty exists between the countries involved and what its tie-breaker says.
- Get a certificate of tax residence from the country where you are resident if clients, banks or another tax authority ask for proof.
- Decide before you move, not after. Residency is much easier to plan than to fix.
- Get professional advice if more than one country could claim you. See when to hire an international tax advisor.
Common mistakes to avoid
- Confusing a visa with tax residency. A digital nomad visa or a residence card does not decide your tax residency on its own.
- Assuming you are “tax resident nowhere”. In practice, your home country often still has a claim.
- Relying only on day counts and ignoring home and vital-interest tests.
- Not keeping records. If a tax authority questions your residency, the burden of proof is often on you.
Frequently asked questions
Can I choose my tax residency?
Not directly. Residency follows the facts: where you live, for how long and where your life is based. You can change those facts, for example by moving your home, but you cannot simply declare a country of your choice.
Is tax residency the same as legal residency?
No. A residence permit is an immigration status. Tax residency is decided by tax law and can apply without any permit, or not apply even if you have one.
Can I be a tax resident of two countries?
Yes, under each country’s domestic law. A tax treaty between them normally resolves it with tie-breaker rules so that, for treaty purposes, you are resident in only one.
What is a certificate of tax residence?
An official document from a tax authority confirming that you are resident there for tax purposes, usually for a specific year. It is often needed to claim treaty benefits or to show a foreign client or bank where you pay tax.
Do I stop being resident in my home country when I move abroad?
Not automatically. It depends on your home country’s rules and on whether you keep a home, family or economic ties there. Some countries require formal steps or proof of residency elsewhere.
Final thoughts
Tax residency is the switch that controls the rest of your tax life abroad. Learn the tests used by every country involved, keep evidence of where you are, and use treaties to resolve conflicts. If your situation spans more than one country, an hour with a qualified advisor before you move is far cheaper than fixing a mistake later.
This article is general information, not tax, legal or financial advice. Rules change and vary by country. Information reviewed October 23, 2026.
Sources and further reading
Official pages and primary sources where you can check the rules, fees and rates discussed in this guide. They are updated by their publishers, so check them for the current figures before you decide.
- Income taxes abroad (Your Europe (European Union))
- Statutory Residence Test guidance (RDR3) (HMRC, GOV.UK)
- Determining an individual’s tax residency status (IRS (US))
- US citizens and resident aliens abroad (IRS (US))
- The Revenue Department of Thailand (Revenue Department (Thailand))


