Tax residence turns on two tests in this order:
- Green-card test. Lawful permanent resident status at any point in the year generally makes the person a resident alien. Status continues until taken away by order or determined abandoned. A treaty tiebreaker can change the tax treatment of a card holder.
- Substantial-presence test. If the green-card test does not settle residence, count at least 31 days in the current year and at least 183 weighted days over three years: all current-year days, one-third of the prior year's days, and one-sixth of the second prior year's days. For 150 days this year, 120 last year and 60 the year before, the weighted count is 150 + 40 + 10 = 200 days.
Exclude qualifying days first. An exempt student on an F, J, M or Q visa generally excludes days in the first five calendar years in that status. A teacher or trainee on a J or Q visa has a different two-of-six-year rule. File a fully completed Form 8843 for the exclusion.
Then check closer connection. Even a person meeting the weighted count may be a nonresident under the closer-connection exception if they were in the United States fewer than 183 days in the current year, maintained a foreign tax home, had a closer connection to that country, and filed Form 8840. Check the exception's other eligibility conditions before claiming it.
Worked example
Dana shows a Permanent Resident Card and a full-year lease. The card test is met and no order or abandonment determination ends her status, so Dana is a resident alien for the year and the day count is unnecessary. Eli holds an F student visa, is in the second calendar year as an exempt student, and was present 190 days this year. All 190 days are excluded as exempt-individual days, so the countable total is zero and Eli fails both the 31-day leg and the 183-day weighted leg; the preparer files a fully completed Form 8843 for the exclusion.