Most people picture US tax residency as a single number: 183 days in a year. The real test counts days from three years at once — and weights them.
Two ways to become a US tax resident
A noncitizen becomes a US "resident alien" — taxed on worldwide income, the same as a citizen — in one of two ways the IRS sets out in Topic 851: the green card test (being a lawful permanent resident at any time during the calendar year) or the substantial presence test, which is purely a count of days. A nonresident alien, by contrast, is generally taxed only on US-source income. For most people without a green card, the line between the two comes down to days — and the test runs on the calendar year.
This is a tax-residency question, separate from how long a visa or the visa-waiver programme lets you physically stay. You can be well inside your immigration limit and still become a US tax resident, or the reverse.
The formula is not a single year
To meet the substantial presence test, you must be physically present in the US on at least:
- 31 days during the current year, and
- 183 days across a three-year period, counted with weights:
- each day in the current year counts as a full day;
- each day in the first year before counts as 1/3 of a day;
- each day in the second year before counts as 1/6 of a day.
So "183 days" here is not half of this year — it is a weighted total stretched across three. Both conditions have to be met. A long history with a very quiet current year can still fail the 31-day floor, and a busy current year on its own may not reach the weighted 183.
A worked example. Suppose you spent 120 days in the US in each of the last three years:
| Year | Days present | Weight | Counts as |
|---|---|---|---|
| Current year | 120 | ×1 | 120 |
| First prior year | 120 | ×1/3 | 40 |
| Second prior year | 120 | ×1/6 | 20 |
| Total | 180 |
180 is just under 183 — so a steady 120 days a year keeps you below the line, but only barely. A handful of extra days in the current year tips the total over. The weighting is why someone who feels like an occasional visitor can drift into tax residency without noticing.
What counts as "a day"
The definition is deliberately broad. You are treated as present on any day you are physically in the US at any time during that day — a single minute counts the same as a full day. (Compare the UK, where the rule turns on being present at midnight — a different definition entirely.)
A short list of days is explicitly excluded and does not count:
- days you regularly commute to work from a residence in Canada or Mexico;
- days you are in the US less than 24 hours while in transit between two places outside the US;
- days you are here as a crew member of a foreign vessel;
- days you cannot leave because of a medical condition that arose while you were in the US;
- days you are an exempt individual.
"Exempt individuals" are not exempt from tax
The label is a trap. An "exempt individual" is not someone freed from US tax — it means someone whose days simply are not counted toward the presence test. The categories are specific: certain foreign-government-related people on "A" or "G" visas (other than A-3 or G-5); teachers and trainees on a "J" or "Q" visa; students on an "F", "J", "M" or "Q" visa; and professional athletes competing in a charitable sports event. Students and teachers who do not substantially comply with their visa terms lose the exclusion.
The closer-connection escape hatch
Even if your weighted days reach 183, you may still be treated as a nonresident under the closer connection exception — but only if every one of these holds:
- you were present fewer than 183 days in the current year (reach 183 actual days this year and the door is shut);
- you kept a tax home in a foreign country for the entire year;
- you had a closer connection to that country — more significant contacts there than in the US; and
- you file Form 8840 on time.
You also cannot claim it if you applied for, or had pending, a green card during the year. Miss the filing deadline and the exception is generally lost, unless you can show by clear and convincing evidence that you tried to comply. Tax treaties can shift the result again through their own tie-breaker rules — a separate question from whether you can be a tax resident of nowhere.
Why the count is the whole game
Every threshold here is a number of days, and the two that trip people up — the three-year weighting and the "any part of a day" rule — are exactly what memory gets wrong. The 31/183 split, the look-back across two prior years, the line between a counted day and an excluded transit day: each one rewards a precise record and punishes a guess. It is the same lesson as the 183-day rule everyone half-remembers — the tidy number you think you know is rarely the rule that decides your case.
A weighted, three-year, any-minute-counts tally is almost impossible to reconstruct accurately after the fact. Countly keeps it as you go — every US entry and exit, every country, counted privately on your phone — so when a form or an accountant asks how many days you spent where, the answer is already there, and it is the real one.
General information only — not legal or tax advice. US residency rules carry more detail and exceptions than one article can hold, and they change; check the current IRS guidance or a qualified adviser for your own situation.