🇺🇸 United States tax residency calculator

Enter your stays in United States (and anywhere else — one ledger feeds every country) and the calculator applies the US rule over the calendar year (3-year lookback), shows the exact day count against 31 days + weighted 183, and tells you how many safe days remain.

Your travel ledger

Paste your travel list (one stay per line)

Format: YYYY-MM-DD ~ YYYY-MM-DD XX with the two-letter code of a country on this site, or a single day YYYY-MM-DD XX.

How the US rule works

The United States does not use a simple 183-day count. Under the Substantial Presence Test (IRC §7701(b)(3)) you are treated as a US resident for a year if you are physically present on at least 31 days during that year, and your weighted three-year total reaches 183 days: all days of presence in the current year, plus one-third of the days in the first preceding year, plus one-sixth of the days in the second preceding year.

The weighting is what surprises long-term visitors: a heavy travel year keeps counting against you for the following two years. Spending 120 days in the US in three consecutive years produces 120 + 40 + 20 = 180 weighted days — just under the threshold, as IRS Publication 519’s own worked example shows. One extra day in the third year pushes you over.

A day counts if you are present at any time during it. Certain days never count at all: regular commutes from Canada or Mexico (when commuting is more than 75% of your workdays), days in transit between two places outside the US for less than 24 hours, days you could not leave due to a medical condition, and days you were an exempt individual (for example F, J, M or Q students, teachers and trainees).

Even if you meet the test, the Closer Connection Exception can keep you a nonresident: fewer than 183 days of presence in the year, a tax home maintained in a foreign country, a closer connection to that country, and a timely filed Form 8840.

Rule text verified 2026-09-29
  • IRC §7701(b), (b)(2) substantial presence test, (b)(3) weighted 3-year formula — official text
  • IRS Publication 519 (2025), Chapter 1 — The Substantial Presence Test — official text
  • IRS Form 8840, Closer Connection Exception Statement for Aliens — official text

Every calculation above follows the cited publications. If a rule changes, the verification date above is updated — pages with stale dates are flagged for re-verification.

What this calculator does not decide

United States residency FAQs

How many days can I stay in the US without becoming a tax resident?

There is no single number. With no US presence in the two prior years, 182 days in the year keeps you under the Substantial Presence Test. With prior-year presence the weighted formula (current + ⅓ of last year + ⅙ of the year before) can cut that headroom dramatically — the calculator computes your personal remaining days.

Does the day I arrive in or depart from the US count?

Yes. US counting counts any day on which you are present at any time during the day, including arrival and departure days. Days in transit between two places outside the US (less than 24 hours, e.g. changing planes) do not count.

I am an F-1 student. Do my days count?

Generally no — F, J, M and Q visa holders are usually "exempt individuals" whose days are excluded (students for up to 5 calendar years, teachers/trainees for 2 of the prior 6 years). This calculator does not know your visa status; if you were an exempt individual, your true counted days are lower than shown.

Can I be a US tax resident and still avoid US tax on foreign income?

Residents are taxed on worldwide income, but treaties and the foreign earned income exclusion may reduce the result. That is a separate question from this calculator, which only answers residency. A cross-border tax adviser should confirm filing positions.

What is the Closer Connection Exception?

If you meet the Substantial Presence Test but were present fewer than 183 days in the year, maintained a tax home in a foreign country, and had a closer connection to that country than to the US, you can remain a nonresident by filing Form 8840 on time. You cannot use it if you applied for a green card or permanent residence.

Informational only — not tax advice. Based on the published day-counting tests, the calculator tells you what appears to follow; it cannot see your housing, family, employment or treaty situation. Confirm with a qualified cross-border tax adviser.

Other country calculators

United Kingdom Statutory Residence Test in three layers: automatic overseas tests (fewer than 46 days for arrivals), automatic UK tests (183+ days), and a sufficient ties test in between. France 183-day rule as an indicator of principal stay, alongside four other statutory criteria: household (foyer), principal residence, professional activity, or centre of economic interests. Spain Statutory 183-day presumption with sporadic absences counted as presence, plus permanent-home and economic-interest criteria. Italy 183-day presence as an indicator, alongside population-registry registration, civil-code domicile and residence. Singapore 183-day statutory rule, with a 3-consecutive-year rule and a 60-day short-term employment concession on the side. Australia 183-day test over the July–June income year, one of four tests (resides, domicile, 183-day, superannuation) — the "resides" test is the primary one. Ireland 183 days in the calendar year, or 280 days combined over this and the previous year with at least 30 days in each — the two-year test catches repeated medium stays. Switzerland 90-night threshold for presumed cantonal residence, nights counted; federal residency is abode-based and can apply even below the threshold. United Arab Emirates Resident at 183 days of presence; possibly resident from 90 days if you also have a permanent home or place of business in the UAE. Malaysia 182-day statutory rule — deliberately not 183 — with linked-stay rules that can make short stays count across years. Thailand 180-day rule — another "not 183" country — with the remittance rule taxing residents on foreign income brought into Thailand. Philippines 180-day rule for resident-alien classification; resident aliens are taxed on Philippine-source income.