What Is My Country of Tax Residence? Rules, Treaties, Form 6166

Your country of tax residence is the country that has the right to tax your worldwide income. For most people it’s decided by where you physically live and where your strongest personal and financial ties sit. For U.S. citizens and green card holders, it’s decided by that status alone, no matter where you live. You can hold a passport from one country and be a tax resident of another, because tax residency is separate from citizenship and separate from immigration status.

The Basic Rule: Days, Home, and Ties

Most countries begin with a single question: how many days did you spend inside their borders? The threshold that appears in the vast majority of tax codes and international treaties is 183 days in a calendar year. Cross that line and the country will almost certainly treat you as a tax resident with obligations on your worldwide income.

Day-counting isn’t the whole picture. Tax authorities also look at domicile, meaning the place you treat as your real, permanent home. If you keep a residence somewhere with the intention of staying indefinitely, many countries will classify you as a tax resident even when you spent most of the year elsewhere. Courts focus on behavior over location: where you keep your belongings, where your family lives, where your bank accounts and social life are centered. A temporary absence doesn’t break residency if you intend to return.

So if you want to know your country of tax residence, start with three questions. Where did you spend more than half the year? Where is your permanent home? Where is the center of your personal and economic life? For most people, all three answers point to the same country, and that’s the answer.

How the U.S. Decides You’re a Tax Resident

The United States uses a specific formula for non-citizens called the substantial presence test. Under 26 U.S.C. ยง 7701(b), you become a tax resident if you were physically present in the U.S. for at least 31 days during the current year and your weighted day count over three years reaches 183 or more.1Office of the Law Revision Counsel. 26 USC 7701 – Definitions The weighted formula:

  • Current year: every day counts in full
  • First preceding year: each day counts as one-third
  • Second preceding year: each day counts as one-sixth

So 120 days each year for three years gives you 120 + 40 + 20 = 180, and you fall just short. Bump that to 125 days per year and the math puts you over the line. The test catches people who don’t spend a full half-year in the country but keep a steady, significant presence over time.2Internal Revenue Service. Substantial Presence Test If you meet it, you file a regular Form 1040 and report worldwide income, the same as a citizen.

Green Card Holders

If you’re a lawful permanent resident at any point during the calendar year, you’re a U.S. tax resident regardless of how many days you actually spent in the country. The card alone triggers the obligation; the substantial presence formula doesn’t matter.1Office of the Law Revision Counsel. 26 USC 7701 – Definitions

Days That Don’t Count

Certain people don’t count their days toward the substantial presence test at all. Foreign government officials on A or G visas (except A-3 and G-5), teachers and trainees on J or Q visas, students on F, J, M, or Q visas, and professional athletes competing in charitable events are treated as exempt individuals. Days also drop out if you were in transit through the U.S. for less than 24 hours, commuting to work from Canada or Mexico, serving as a crew member on a foreign vessel, or unable to leave because of a medical condition that developed while you were here.2Internal Revenue Service. Substantial Presence Test

A Note on Mid-Year Arrivals and Departures

If you arrive in or leave the United States mid-year, you may have a dual-status tax year: resident for part of the year, nonresident for the rest. During the resident portion you owe U.S. tax on worldwide income; during the nonresident portion, only on U.S.-source income. One trap: foreign income you earned while a nonresident alien is still taxable if you actually receive it during the period when you’re a resident alien.3Internal Revenue Service. Publication 519 U.S. Tax Guide for Aliens

The Closer Connection Exception

You can technically hit the substantial presence threshold and still avoid U.S. tax residency by showing a closer connection to a foreign country. To qualify, you must have been present in the U.S. for fewer than 183 actual days that year, maintained a tax home in a foreign country for the entire year, had stronger ties to that foreign country than to the U.S., and not applied for or taken steps toward getting a green card.4Internal Revenue Service. Closer Connection Exception to the Substantial Presence Test

The IRS weighs your contacts to decide where your connections are strongest. They look at where your permanent home is, where your family lives, where you keep personal belongings like cars and furniture, where you vote, where you hold a driver’s license, and where you do your banking and charitable giving. You claim the exception by filing Form 8840. Skip that filing and you lose the exception unless you can show clear and convincing evidence that you took reasonable steps to learn about the requirement.4Internal Revenue Service. Closer Connection Exception to the Substantial Presence Test

What Happens If Two Countries Both Claim You

Sometimes two countries each conclude you’re their tax resident. International tax treaties settle that with a hierarchy of tie-breaker tests, applied in order until one produces a clear answer. Most treaties follow the OECD Model:

  • Permanent home: residency goes to the country where you have a dwelling available to you at all times. If you have one in both, move on.
  • Center of vital interests: which country holds your closer personal and economic ties, counting family, social life, employment, and primary income sources.
  • Habitual abode: if vital interests are split, the country where you spend more of your time on a regular basis wins. This is a pattern check, not the strict 183-day count.
  • Nationality: if habitual abode is split or absent in both, citizenship breaks the tie.
  • Mutual agreement: if none of the above resolves it, the two governments negotiate directly.

These rules exist so only one country has primary taxing rights over a given slice of income. There’s a catch for Americans, though.

The Saving Clause

Most U.S. tax treaties contain a saving clause that preserves the right of the United States to tax its own citizens and residents as if the treaty didn’t exist. In practice, U.S. citizens living abroad generally cannot use treaty provisions to reduce their American tax bill. The saving clause has narrow exceptions for specific types of income, but for most people the treaty benefits run one direction: reducing foreign taxes, not U.S. taxes.5Internal Revenue Service. Tax Treaties Can Affect Your Income Tax

If You’re a U.S. Citizen Living Abroad

The United States is one of the few countries that taxes based on citizenship, not just residency. If you’re a U.S. citizen, you owe taxes on your worldwide income no matter where you live. You could spend decades abroad without setting foot on American soil and the IRS still expects an annual return. The same applies to green card holders for as long as they hold that status.1Office of the Law Revision Counsel. 26 USC 7701 – Definitions

Two mechanisms keep you from paying tax twice on the same income. The foreign earned income exclusion lets you exclude up to $132,900 of foreign earned income from your U.S. return for 2026, with an additional housing exclusion of up to $39,870 for qualified housing expenses above a base amount. To qualify, you must either be a bona fide resident of a foreign country for an entire tax year or be physically present in a foreign country for at least 330 full days during any 12-month period. The exclusion applies only to earned income like salary and self-employment income; investment income, pensions, and Social Security don’t qualify.6Internal Revenue Service. Figuring the Foreign Earned Income Exclusion

The other option is the foreign tax credit, claimed on Form 1116. It offsets your U.S. tax bill by the income tax you actually paid to another country. The foreign tax must be an income tax imposed on you, it must be your legal and actual liability, and you must have paid or accrued it.7Internal Revenue Service. Publication 514 Foreign Tax Credit for Individuals For higher earners with income above the exclusion limit, the credit is often more valuable because it applies to all types of income, not just wages. You can use one or the other on the same income, but not both.

Proving Where You’re a Tax Resident

Whether you’re claiming residency somewhere or arguing against it, the strength of your position rests on records. Tax authorities look for a paper trail that tells a coherent story about where you actually lived. Useful documentation includes:

  • Travel records: passport stamps, boarding passes, and airline itineraries showing days spent in each country
  • Housing records: signed leases, mortgage statements, and utility bills establishing where you kept a home
  • Employment records: payroll statements, employment contracts, and business registration documents showing where you worked
  • Financial ties: bank statements, investment accounts, and insurance policies tied to a particular country
  • Personal ties: school enrollment for children, club memberships, voter registration, and driver’s licenses

If you’re relying on the closer connection exception or treaty tie-breaker rules, organized records matter even more. The IRS weighs the totality of your contacts, and the better your documentation, the harder it is for them to reclassify you.

Form 6166: Official U.S. Residency Certification

Many countries require proof that you’re a U.S. tax resident before they’ll grant treaty benefits like reduced withholding rates. The IRS provides this proof through Form 6166, a letter printed on U.S. Department of Treasury stationery certifying your residency status.8Internal Revenue Service. Form 6166 – Certification of U.S. Tax Residency

To request Form 6166, file Form 8802 with the IRS along with a nonrefundable user fee. For individuals the fee is $85 per application; for entities such as corporations, partnerships, and trusts, it’s $185.9Internal Revenue Service. Instructions for Form 8802 The IRS recommends mailing your application at least 45 days before you need the certificate; if there’s a delay, they’ll contact you after 30 days.10Internal Revenue Service. Form 8802, Application for United States Residency Certification Keep a copy once it arrives. You may need it for foreign tax audits, treaty claims in other countries, or later compliance reviews.