For U.S. federal tax purposes, a nonresident alien is generally an individual who is not a U.S. citizen or U.S. national and who does not meet either the Green Card Test or the Substantial Presence Test. The term describes a federal tax classification. It does not simply mean a foreign citizen who lives outside the United States.
This distinction matters because immigration status, physical location, visa type, and federal tax residency answer different questions. A person can live in the United States for months and remain a nonresident alien for tax purposes. Another person can hold a temporary visa and become a resident alien because of time spent in the country. A lawful permanent resident who lives abroad does not become a nonresident alien merely by moving outside the United States.
The IRS Meaning of “Nonresident Alien”
The IRS uses the word alien for an individual who is not a U.S. citizen or U.S. national. Within that tax terminology, an alien is generally classified as either a resident alien or a nonresident alien.
The dividing line is primarily determined by two federal tax residency tests:
- the Green Card Test, based on lawful permanent resident status; and
- the Substantial Presence Test, based on a formula that counts qualifying days of physical presence in the United States.
An individual who meets either test is generally treated as a resident alien for federal tax purposes. An individual who meets neither test is generally a nonresident alien, although elections, treaty provisions, residency starting and ending rules, and certain statutory exceptions can alter that result.
The IRS explains this classification on its Nonresident Aliens page and in Publication 519, U.S. Tax Guide for Aliens.
Tax Residency Is Not the Same as Where Someone Lives
The word “nonresident” can be misleading because it sounds like a description of where a person has a home. Federal tax residency does not work that way.
| Term | What It Refers To | What It Does Not Establish by Itself |
|---|---|---|
| Nonresident alien | A U.S. federal tax classification | That the person physically lives outside the United States |
| Resident alien | A U.S. federal tax classification | That the person has a green card |
| Nonimmigrant | An immigration classification for certain temporary admissions | Federal tax residency |
| Lawful permanent resident | An immigration status that generally triggers the Green Card Test | That the person currently lives in the United States |
| State nonresident | A classification under the law of a particular state | Federal nonresident alien status |
A visa label therefore does not automatically determine federal tax residency. F-1, J-1, H-1B, O-1, and other immigration classifications can affect which tax rules need to be examined, but the visa name alone does not answer whether an individual is a resident or nonresident alien for a particular tax year.
The same separation works in the other direction. An individual can become a resident alien under the Substantial Presence Test without obtaining lawful permanent resident status. The IRS even explains that an undocumented individual who meets the Substantial Presence Test can be treated as a U.S. resident for federal tax purposes. Tax residency and lawful immigration status are separate concepts.
How Federal Tax Residency Is Determined
For a person who is not a U.S. citizen or U.S. national, the basic classification process begins with the Green Card Test and the Substantial Presence Test. Both are applied within rules tied to the calendar year.
The Green Card Test
An individual generally meets the Green Card Test if the person is a lawful permanent resident of the United States at any time during the calendar year. Lawful permanent resident status is commonly evidenced by Form I-551, the Permanent Resident Card.
Physical residence abroad does not, by itself, end this tax residency status. The IRS states that lawful permanent resident status under the Green Card Test generally continues until it is voluntarily abandoned in writing, administratively terminated, or judicially terminated. Treaty rules can create a different tax result in some dual-resident situations, but simply spending most or all of the year outside the United States is not the same as ending lawful permanent resident status.
The IRS provides the current rule on its U.S. Tax Residency — Green Card Test page.
The Substantial Presence Test
An individual without Green Card Test residency can still become a resident alien through physical presence in the United States.
Under the Substantial Presence Test, the person generally must be physically present in the United States for at least:
- 31 days during the current year; and
- 183 days under a weighted three-year calculation covering the current year and the two preceding years.
The 183-day calculation counts:
- all countable days in the current year;
- one-third of countable days in the first preceding year; and
- one-sixth of countable days in the second preceding year.
The formula can be written as:
Current-year days + 1/3 of prior-year days + 1/6 of second-prior-year days
Meeting the weighted 183-day total alone is not enough if the person was not present for at least 31 days during the current year.
Why “183 Days” Is Not a Simple Calendar-Year Rule
A frequent source of confusion is the idea that anyone who spends fewer than 183 actual days in the United States during the current year must be a nonresident alien. That is not how the general Substantial Presence Test works.
Prior-year presence can contribute to the 183-day weighted total. Someone can therefore meet the test with fewer than 183 actual days in the United States during the current year.
The reverse can also occur when days are excluded from the calculation under a specific rule. Physical presence and countable presence are not always identical.
The IRS illustrates the weighting rule with a person who is present for 120 days in each of three consecutive years. For the third year, the calculation is 120 current-year days, 40 days from the preceding year, and 20 days from the second preceding year. The weighted total is 180, so the person does not meet the Substantial Presence Test for that year based on those facts.
There is another reason to read references to “183 days” carefully. Some provisions affecting nonresident aliens use an actual 183-days-during-the-tax-year threshold for a different purpose. That is not the same calculation as the weighted 183-day Substantial Presence Test. The context of the rule determines which 183-day concept applies.
The current calculation and the IRS example appear on the Substantial Presence Test page.
Some Days in the United States Do Not Count
For the Substantial Presence Test, a person is generally treated as present in the United States on any day the person is physically present in the country at any time during that day. The tax rules then provide several exceptions.
Depending on the facts, excluded days can include:
- certain days commuting to work in the United States from a residence in Canada or Mexico;
- certain periods of less than 24 hours while in transit between two places outside the United States;
- certain days spent in the United States as a crew member of a foreign vessel;
- days when a medical condition that developed while the person was in the United States prevented departure; and
- days during which the person is an “exempt individual” under the Substantial Presence Test rules.
The phrase “exempt individual” does not mean exempt from U.S. tax. It refers specifically to whether certain days are counted for the Substantial Presence Test.
The category can include, subject to its own limits and conditions, certain foreign government-related individuals, J or Q teachers and trainees, F, J, M, or Q students, and certain professional athletes temporarily present to compete in charitable sports events.
This is why the number of days shown by travel records cannot always be placed directly into the three-year formula without examining the type of presence. Students and exchange visitors are a good illustration: two people who spent the same number of calendar days in the United States can have different numbers of countable days under the tax residency rules.
Form 8843 can also be relevant to particular excluded-day situations. The existence of an F, J, M, or Q visa by itself, however, does not mean every day in that status can always be excluded. The applicable category, prior years of exempt-individual treatment, visa compliance, and other facts can affect the result.
The Same Living Situation Can Produce Different Tax Statuses
| Situation | Tax Residency Issue | General Result to Examine |
|---|---|---|
| An F-1 student lives in the United States during the academic year | Some days may be excluded while the student is an exempt individual under the Substantial Presence Test rules | The student may remain a nonresident alien despite extensive physical presence |
| A temporary foreign worker spends enough countable days in the United States | The Substantial Presence Test can apply even without a green card | The worker can become a resident alien for federal tax purposes |
| A green card holder moves to another country | Lawful permanent resident status generally continues until it is formally ended under the applicable rules | Living abroad alone does not create nonresident alien status |
| A visitor has no green card and only limited countable U.S. presence | Neither residency test may be met | The person will generally remain a nonresident alien unless another rule changes the classification |
These outcomes also show why an SSN or ITIN does not establish tax residency. A taxpayer identification number identifies a taxpayer for specified federal tax purposes; it is not a third residency test.
When the Two-Test Answer Can Change
The Green Card Test and Substantial Presence Test provide the starting point, but U.S. tax law contains rules that can produce a different result in particular circumstances.
Closer Connection Exception
A person can meet the Substantial Presence Test and still be treated as a nonresident for U.S. tax purposes under the closer connection exception if the statutory conditions are satisfied.
Among the conditions, the individual generally must have been physically present in the United States for fewer than 183 days during the current year, maintained a tax home in a foreign country during the year, and had a closer connection to that foreign country than to the United States. The IRS also restricts the exception when steps have been taken toward lawful permanent resident status or an application for that status is pending.
This 183-day requirement is separate from the weighted 183-day calculation used to determine whether the Substantial Presence Test was met. A person can first meet the Substantial Presence Test through the three-year formula and then examine whether the closer connection exception applies.
Claiming this treatment can also involve specific filing requirements, including Form 8840. The IRS describes the conditions on its Closer Connection Exception to the Substantial Presence Test page.
Tax Treaty Residence Rules
An individual can be treated as a resident under U.S. domestic tax law while also being treated as a tax resident of another country. If an applicable U.S. income tax treaty contains a residence article, its tie-breaker rules may determine treaty residence when both countries treat the same individual as a resident.
For certain dual-resident individuals, applying a treaty tie-breaker can result in treatment as a nonresident of the United States for purposes of determining U.S. income tax liability. Treaty positions can involve separate disclosure and return rules, including Form 8833 in circumstances described by the IRS.
A treaty does not automatically produce nonresident status merely because someone is a citizen or resident of a treaty country. The wording of the particular treaty, domestic residency rules in both countries, the relevant tax year, and the individual’s facts determine whether a residence tie-breaker is available.
A Person Can Be Resident and Nonresident in the Same Year
Federal tax residency does not always begin on January 1 or end on December 31. Residency starting and ending date rules can divide a tax year into a resident period and a nonresident period.
An individual who is both a U.S. resident and a nonresident during the same tax year is called a dual-status individual. The term refers to tax residency during different parts of the year, not to dual citizenship or two immigration statuses.
For example, when someone meets the Substantial Presence Test for the first time, the residency starting date is generally the first day of presence in the United States during that calendar year, subject to rules that can adjust the date. If the Green Card Test and Substantial Presence Test are both met in the same year, special starting-date rules determine when U.S. residency begins.
The IRS also provides a First-Year Choice for some individuals who do not meet either residency test for one year but meet the Substantial Presence Test in the following year. The choice has its own presence requirements and can result in resident treatment for part of the earlier year rather than the entire year.
These rules explain why determining that someone “became a resident alien in 2025,” for example, may not answer whether that person was a resident for every day of 2025. The relevant residency starting date can affect which part of the year is treated as resident and which part is treated as nonresident.
The IRS covers these rules in Residency Starting and Ending Dates and its guidance on Taxation of Dual-Status Individuals.
What Nonresident Alien Status Changes
The classification matters because resident aliens and nonresident aliens are generally taxed under different federal income tax rules.
Resident aliens are generally subject to U.S. federal income tax on worldwide income in a manner similar to U.S. citizens. Nonresident aliens generally fall under a narrower system centered on income connected with the United States.
For nonresident aliens, taxable income can include income that is effectively connected with a U.S. trade or business (ECI) and certain U.S.-source fixed, determinable, annual, or periodical income (FDAP). Source rules, treaty provisions, exclusions, withholding rules, and the character of the income can change the treatment of a particular payment.
Nonresident alien status also appears in federal filing and withholding systems. Form 1040-NR is the U.S. Nonresident Alien Income Tax Return, but being classified as a nonresident alien does not by itself mean that every nonresident alien has a Form 1040-NR filing requirement. Filing depends on circumstances such as U.S. trade or business activity, taxable U.S. income, withholding, refund claims, treaty positions, and other applicable rules.
Other documents that can appear in nonresident tax situations include Form W-8BEN for certain foreign-status certifications, Form 1042-S for specified payments to foreign persons, Form 8233 for certain compensation and treaty withholding situations, and Form 8843 for particular excluded-day categories. Each form has its own purpose; none serves as a universal test of whether someone is a nonresident alien.
An SSN, ITIN, Employer Record, or Visa Label Does Not Decide the Status
Several facts can be relevant to a person’s tax situation without determining federal tax residency by themselves.
- Having an SSN: An SSN does not establish resident alien status.
- Having an ITIN: An ITIN is a taxpayer identification number, not a residency classification.
- Holding a temporary visa: The visa can affect how days are counted or which special rules apply, but the visa name alone does not determine tax residency.
- Living outside the United States: This fact alone does not override continuing Green Card Test status.
- Spending fewer than 183 actual days in the United States: The Substantial Presence Test uses a three-year weighted formula, so the current-year count cannot always be considered in isolation.
- Paying U.S. tax: Nonresident aliens can owe U.S. tax on certain income, so paying federal tax does not prove resident alien status.
- Being described as a nonresident in payroll records: Employer withholding records can be relevant, but federal tax residency ultimately depends on the applicable tax rules and the person’s facts.
Federal Nonresident Alien Status Is Separate From State Residency
The federal resident-alien and nonresident-alien rules do not automatically determine residency for a state income tax system.
States that impose individual income taxes can use their own concepts of domicile, statutory residency, permanent place of abode, days of presence, part-year residency, and source income. Those rules vary by jurisdiction.
As a result, a person classified as a nonresident alien for federal tax purposes is not automatically a nonresident of every state. A person may also have a state filing obligation without being a federal resident alien. Federal tax residency and state residency need to be analyzed as separate classifications.
The Classification Can Change From One Tax Year to the Next
Nonresident alien status is not necessarily permanent. Changes in lawful permanent resident status, days of U.S. presence, excluded-day treatment, treaty residence, elections, and residency starting or ending dates can produce a different federal tax classification in another year.
A student who remains a nonresident alien while certain days are excluded under the exempt-individual rules can later begin counting those days toward the Substantial Presence Test. A temporary worker can accumulate enough countable presence to become a resident alien. A person can also have a dual-status year during a transition between nonresident and resident treatment.
That makes the phrase “I am a nonresident alien” incomplete without a tax-year context. The classification is generally determined for a particular calendar year using the residency rules and facts that apply to that period.
Resources Used
- IRS — Nonresident Aliens — federal definition of an alien and nonresident alien and general nonresident filing information.
- IRS Publication 519, U.S. Tax Guide for Aliens — resident and nonresident classification, residency dates, dual-status rules, elections, and tax treatment.
- IRS — Substantial Presence Test — the 31-day requirement, weighted 183-day formula, excluded days, and exempt-individual categories.
- IRS — U.S. Tax Residency: Green Card Test — lawful permanent resident treatment under the Green Card Test.
- IRS — Closer Connection Exception to the Substantial Presence Test — conditions that can permit nonresident treatment after the Substantial Presence Test is met.
- IRS — Residency Starting and Ending Dates — rules governing when resident and nonresident periods begin or end.