Skip to content

Substantial Presence Test

The substantial presence test is the day-count rule that decides whether a non-citizen becomes a US tax resident. It requires at least 31 days in the United States this year and a weighted three-year total of at least 183 days.

Last reviewed by Steven Fox, CFP®, EA on

Quick Summary

  • Both parts must be satisfied. At least 31 days of presence in the current year, and at least 183 days on a weighted count across three years.
  • The weighting is what makes it counterintuitive. Days in the current year count fully, days in the prior year count one third, and days two years back count one sixth.
  • Meeting the test makes a non-citizen a resident alien, taxed on worldwide income, whether or not they intended anything of the kind.
  • Some days are not counted at all, including days as an exempt individual such as a student or teacher on a qualifying visa, and days you could not leave because of a medical condition that arose while you were here.
  • Someone who meets the test can still be treated as a nonresident under the closer-connection exception, but only with fewer than 183 actual days this year and no pending green card application.

Definition

The substantial presence test is the second of the three routes into US tax residency for a non-citizen, set out at Internal Revenue Code section 7701(b)(3). An individual meets it for a calendar year if they were present in the United States on at least 31 days during that year, and if the sum of days present over the current year and the two preceding years, each year multiplied by the statutory factor, equals or exceeds 183 days. The multipliers are 1 for the current year, one third for the first preceding year, and one sixth for the second preceding year. Someone who meets the test is a resident alien for that year and is taxed on worldwide income.

It is a mechanical rule with no room for intent. A person who never wanted US tax residency, holds no green card, and considers another country home can still meet it purely by traveling, which is why the statute pairs it with escapes: the closer-connection exception, and categories of individuals whose days do not count at all.

Advanced Explanation

The weighting is the part people get wrong. Because the two earlier years are discounted, the test does not simply add up days. The three multipliers add to one and a half, so someone who spends the same number of days in the United States every year crosses the 183-day figure from the third year on once that number reaches 122, which is barely four months and feels well short of half the year. A single long stay followed by two quiet years may not cross it at all. Both conditions in section 7701(b)(3)(A) have to hold at once: the 31-day gate is independent of the 183-day sum, so a person who spent almost the whole of the two prior years in the country but only a handful of days this year fails the test no matter how large the weighted total is.

Days that do not count. Section 7701(b)(7) removes three categories of presence outright. A person who regularly commutes to work or self-employment in the United States from a residence in Canada or Mexico is not treated as present on a commuting day. A person in transit between two points outside the United States who is physically present for less than 24 hours is not treated as present. A regular crew member of a foreign vessel engaged in transportation between the United States and a foreign country is not treated as present, unless they otherwise conduct a trade or business here that day. Section 7701(b)(3)(D) removes two more: days as an exempt individual, and days the person "was unable to leave the United States on such day because of a medical condition which arose while such individual was present in the United States." The IRS also notes that for this test the United States means the 50 states and the District of Columbia plus territorial waters and the adjacent seabed, and that the term "does not include U.S. territories or U.S. airspace."

Exempt individuals, and the limits that eventually end the exemption. Section 7701(b)(5) defines four categories: a foreign government-related individual, meaning someone temporarily present by reason of diplomatic or consular status or as a full-time employee of an international organization, and their immediate family; a teacher or trainee temporarily present on a J or Q visa; a student temporarily present on an F, J, M or Q visa; and a professional athlete temporarily present to compete in a charitable sports event meeting specific conditions. Each requires substantial compliance with the visa's requirements. The exemption is not permanent. A teacher or trainee cannot use it in the current year if they were exempt in any two of the six preceding calendar years, a count the statute raises from two to four for an individual all of whose compensation is described in section 872(b)(3). A student loses it after five calendar years unless they establish to the IRS's satisfaction that they do not intend to reside permanently in the United States and still meet the visa conditions.

Excluding days is a filing act, not an automatic one. Anyone excluding days as an exempt individual, or because of a medical condition, must file Form 8843, Statement for Exempt Individuals and Individuals With a Medical Condition, with their income tax return, or send it separately by the return due date if no return is required. The IRS is direct about the consequence of missing it: "If you do not timely file Form 8843, you cannot exclude the days", unless the person shows by clear and convincing evidence that they took reasonable actions to learn of the requirement and significant steps to comply. A student who quietly assumes the exemption applies and files nothing can find the days counted back in.

The closer-connection exception, and the trap inside it. Section 7701(b)(3)(B) lets an individual who meets the day count still be treated as a nonresident, on two conditions: they were present on fewer than 183 actual days in the current year, and they establish that for the year they had a tax home in a foreign country and a closer connection to that country than to the United States. The claim is made on Form 8840, Closer Connection Exception Statement for Aliens. Section 7701(b)(3)(C) then disqualifies the exception entirely if at any time during the year the individual "had an application for adjustment of status pending" or "took other steps to apply for status as a lawful permanent resident of the United States." Starting a green card application therefore closes the escape hatch for that whole year, including retroactively for months already elapsed.

This is not the 330-day test, and the two get confused constantly. Both count days abroad or at home, both appear in expatriate tax planning, and they answer opposite questions. The substantial presence test in section 7701(b)(3) asks whether a non-citizen becomes a US tax resident by spending time in the United States. The physical presence test in section 911(d)(1)(B) asks whether a US citizen or resident already abroad qualifies for the foreign earned income exclusion, and requires 330 full days in a foreign country during any 12 consecutive months. One is about days in; the other is about days out. One uses a three-year weighted formula on a calendar year; the other uses a flat count over a flexible 12-month window. Nothing carries over between them.

A treaty can override the outcome. Where an individual is a resident of both countries under domestic law, most US income tax treaties contain a tie-breaker that assigns residence to one of them. A person who meets the substantial presence test but is treated as a resident of the treaty partner under the tie-breaker can be taxed as a nonresident alien, with a disclosed treaty position on the return. That is a different mechanism from the closer-connection exception, and it is available in cases the exception is not.

How to Remember

Count this year's days in full, a third of last year's, and a sixth of the year before. Reach 183, with at least 31 of them this year, and the United States treats you as a resident.

Used in a Sentence

“Nadim had spent about 130 days in Houston every year since 2024, and by the third year the substantial presence test made him a US tax resident on worldwide income without a single change in his circumstances.”

How It Works

The sequence is: count actual days of presence in each of the three years, strike out the days the statute says do not count, apply the multipliers, add the three results, and compare against 183, then check the 31-day gate for the current year separately. If both are met, test the closer-connection exception and any treaty tie-breaker before concluding.

A hypothetical example. Nadim, who is not a US citizen and holds no green card, was present in the United States on 120 days this year, 150 days last year, and 180 days the year before that.

Current year: 120 × 1 = 120. First preceding year: 150 ÷ 3 = 50. Second preceding year: 180 ÷ 6 = 30. The weighted total is 120 + 50 + 30 = 200, which is at or above 183. He was present on 120 days this year, comfortably above 31. He meets the substantial presence test and is a resident alien, taxed on worldwide income.

A second scenario showing the 31-day gate doing real work. Priya was present on 20 days this year, 330 days last year, and 330 days the year before. Her weighted total is 20 + 110 + 55 = 185, above 183. But 20 days is fewer than 31, so the first condition fails and she does not meet the test at all. The weighted arithmetic never gets a chance to matter.

A third, showing the closer-connection exception. Suppose Nadim's 120 days this year came with a tax home in the United Arab Emirates and a closer connection there. Because 120 is fewer than 183 actual days in the current year, he can file Form 8840 and be treated as a nonresident despite meeting the test. If he had filed a green card application in March, section 7701(b)(3)(C) would take the exception away for the whole year.

Pros and Cons

Pros

  • It is objective and computable in advance, so someone who tracks days can know their status before the year ends rather than arguing about intent afterwards.
  • The weighting means an occasional long visit does not permanently contaminate later years; the influence of a past year fades to a third and then a sixth.
  • The exempt-individual categories keep students, teachers and diplomats out of the count for a defined number of years.
  • The closer-connection exception and treaty tie-breakers give two separate routes back to nonresident treatment.

Cons

  • It produces residency without intent. A regular business traveler can become a US taxpayer on worldwide income purely through travel.
  • The weighted formula is easy to misapply, and people commonly assume 183 actual days in one year is the threshold.
  • Excluding days requires filing Form 8843 on time, and the IRS states that a late form generally means the days cannot be excluded.
  • The closer-connection exception is lost outright for the entire year if a green card application was pending at any point, even briefly.
  • Being caught by it brings the whole resident package, including foreign-account and foreign-asset reporting on assets held long before any US connection.

People Also Asked

Answers to the most frequently asked questions.

How do I calculate the substantial presence test?
Count every day you were physically present in the United States this year, then take one third of your days in the prior year and one sixth of your days in the year before that. Add the three figures. If the total is 183 or more, and you were present on at least 31 days this year, you meet the test. Both conditions are required: a large weighted total with fewer than 31 current-year days does not meet it, and 31 days with a small weighted total does not either.
What is the difference between the substantial presence test and the physical presence test?
They are unrelated tests that both count days. The substantial presence test, at Internal Revenue Code section 7701(b)(3), decides whether a non-citizen becomes a US tax resident by spending time in the United States, using a weighted three-year formula against a 183-day threshold. The physical presence test, at section 911(d)(1)(B), decides whether a US citizen or resident already living abroad qualifies for the foreign earned income exclusion, and requires 330 full days in a foreign country during any 12 consecutive months. Meeting one says nothing about the other.
Which days do not count toward the substantial presence test?
Days as an exempt individual, meaning a foreign government-related individual on an A or G visa other than A-3 or G-5, a teacher or trainee on a J or Q visa, a student on an F, J, M or Q visa, or a professional athlete competing in a charitable sports event. Also days you commute from a residence in Canada or Mexico, days spent in transit between two foreign points for less than 24 hours, days as a crew member of a foreign vessel, and days you could not leave because of a medical condition that arose while you were in the United States. Excluding any of these requires Form 8843.
What is the closer connection exception?
It is the escape in section 7701(b)(3)(B) for someone who technically meets the day count but genuinely lives elsewhere. It requires fewer than 183 actual days of presence in the current year, plus a tax home in a foreign country and a closer connection to that country than to the United States, claimed on Form 8840. Section 7701(b)(3)(C) removes it entirely for any year in which the individual had an application for adjustment of status pending or took other steps toward permanent residence.
Do days in Puerto Rico or the US Virgin Islands count?
No. The IRS states that for this test the United States means the 50 states and the District of Columbia, together with US territorial waters and the adjacent seabed and subsoil over which the United States has exclusive resource rights, and that the term does not include US territories or US airspace. Time in a US territory therefore does not push someone toward resident alien status under this test, though territories have their own tax rules that may apply instead.

Sources

AdviceOnly maintains high editorial standards to improve the quality and accuracy of our educational content. Content is written with the assistance of artificial intelligence tools following a rigorous quality assurance process, and periodically reviewed by credentialed and experienced human financial advisors. References used include government data, academic papers, interviews with industry experts, and reputable primary sources. You can learn more about our efforts to produce accurate content in our editorial policy.

  1. U.S. Code. "26 U.S.C. § 7701 — Definitions."
  2. Internal Revenue Service. "Substantial presence test."
  3. Internal Revenue Service. "Form 8843, Statement for Exempt Individuals and Individuals With a Medical Condition."
  4. Internal Revenue Service. "Form 8840, Closer Connection Exception Statement for Aliens."

Have a question a definition can't answer?

Advice-only advisors answer questions like this for a transparent flat fee — no products, no commissions, no asset management.

Find an Advisor