Substantial presence test
Intro
For a noncitizen without a green card, whether the United States taxes you on your worldwide income or only on your US income usually comes down to one mechanical test: the substantial presence test. It counts the days you were physically in the country, with a weighting formula that reaches back over three years. Cross the threshold and you are a US tax resident; stay under it and you are not. Because the consequences are so large, the day-counting deserves real attention.
In plain terms, you meet the substantial presence test, and are treated as a US tax resident, if you were physically present in the US at least 31 days in the current year and 183 days under a weighted three-year formula that counts all of this year's days, a third of last year's, and a sixth of the year before's (IRC §7701(b)(3)). Meeting it generally means taxation on worldwide income.
Our stance: this is a bright-line, countable test, which makes it manageable, but the three-year weighting and the available exceptions, like the closer connection exception and treaty tie-breakers, mean the raw day count is not always the final answer. Planning presence carefully, and knowing the exceptions, is what matters.
Body
The two-part day count
The substantial presence test has two requirements that both must be met. First, you must be present in the US at least 31 days during the current year. Second, the weighted sum of your days must reach 183, counting each day present this year as a full day, each day last year as one-third of a day, and each day the year before as one-sixth of a day (§7701(b)(3)). If both are satisfied, you are a resident under the test.
The weighting is the subtle part. Because prior years count at reduced rates, a person who spends roughly the same amount of time in the US each year can cross 183 even without spending 183 days in the current year alone. Someone present around 120 days each year, for example, accumulates enough weighted days across three years to meet the test, which surprises people who only count the current year.
The 31-day current-year minimum is a floor: without at least 31 days this year, the test is not met regardless of prior years. So the analysis is to count current-year days first, confirm they reach 31, then compute the three-year weighted total and compare it to 183. Both conditions are necessary, and the weighted formula is where careful counting pays off.
What counts as a day
Generally, any day you are physically present in the US at any time counts as a day of presence, even part of a day. But there are important exceptions that exclude certain days from the count. Days you are present as an exempt individual, such as certain students, teachers, and foreign-government-related individuals, do not count, and days you are unable to leave because of a medical condition that arose while in the US can be excluded.
There are also exclusions for people in transit through the US and for certain commuters from Canada or Mexico, among others. These exclusions can meaningfully reduce the counted days, sometimes keeping a person below the threshold who would otherwise meet it. So the count is not simply every calendar day touched; it is every day of presence minus the days that qualify for an exclusion.
Getting the day count right therefore requires identifying both the days present and the days that are excluded. A student on an appropriate visa, for instance, may be an exempt individual whose days do not count for a period of years, which can keep them a nonresident despite substantial physical presence. The exclusions are part of the mechanics, not an afterthought.
The closer connection exception
Even if you meet the substantial presence test, you can still be treated as a nonresident under the closer connection exception. If you are present fewer than 183 days in the current year, maintain a tax home in a foreign country, and have a closer connection to that foreign country than to the US, you can claim the exception and be treated as a nonresident despite meeting the test (§7701(b)(3)(B)).
The exception looks at where your life is centered, your permanent home, family, belongings, social and economic ties, and requires that these point more strongly to the foreign country. It is available only if current-year presence is under 183 days, so it cannot rescue someone who spends most of the year in the US, but for someone just over the weighted threshold with their life clearly abroad, it provides relief. Claiming it requires filing the appropriate statement.
This exception matters because it softens the mechanical test with a facts-and-circumstances escape hatch for people whose ties are genuinely elsewhere. It recognizes that the day count alone can overstate someone's connection to the US, and it lets a person with a real foreign tax home and closer foreign ties avoid resident taxation despite crossing the weighted threshold, provided they are under 183 current-year days.
Treaties and why it matters
Beyond the closer connection exception, an income tax treaty between the US and the person's home country can override the substantial presence result through a tie-breaker rule. If a person is a resident of both countries under each country's internal law, the treaty's tie-breaker assigns residence to one country, which can treat a person as a nonresident of the US for treaty purposes even if they meet the substantial presence test. Treaties therefore add another layer beyond the domestic test.
The test matters because residency is the switch between worldwide and source-based US taxation. A resident under the substantial presence test is taxed like a citizen, on worldwide income, while a nonresident is taxed only on US-source and effectively connected income. The difference can be enormous for someone with substantial non-US income, which is why the day count carries such weight.
The practical approach is to track US days carefully, apply the exclusions for exempt individuals and other categories, compute the weighted three-year total, and then consider the closer connection exception and any applicable treaty tie-breaker. For anyone spending significant time in the US without a green card, managing and documenting presence is essential, because the substantial presence test, with its exceptions and treaty overlays, determines the scope of their US tax exposure.
Summary
The substantial presence test treats a noncitizen as a US tax resident if present at least 31 days in the current year and 183 weighted days over three years, counting current-year days fully, prior-year days at one-third, and days two years back at one-sixth (IRC §7701(b)(3)). The weighting means steady annual presence can cross the threshold without 183 current-year days. Certain days are excluded, including those of exempt individuals like some students and teachers and days of medical inability to leave. The closer connection exception lets someone under 183 current-year days with a foreign tax home and closer foreign ties remain a nonresident, and treaty tie-breakers can override the result. Because the test switches between worldwide and source-based taxation, careful day-counting and attention to the exceptions are essential.
Sources
Related articles
More in International & cross-border tax
- Residency vs domicilethe distinction that drives everything
- Effectively connected income (ECI)U.S.-source business income
- FDAP incomefixed and determinable U.S. income
Related prompts & skills
Put this to work
5 free prompts and skills from the library, matched to this article.