Insights

A curated collection of observations, industry developments, and firm perspectives on legal trends and business issues. These materials are provided for general informational and educational purposes only and are not legal advice. For guidance tailored to your specific situation, please contact our attorneys.

How to Determine Your Nonresident Alien Status for Tax Purposes

Practice Area:Finance
Jurisdiction:Federal

Nonresident alien status applies to individuals who are neither U.S. citizens nor resident aliens for federal income tax purposes.

A foreign student completing a tax form or a worker changing visa status may need to reassess their tax residency. Previous visits, excluded days, and residency starting dates can affect which income tax rules and filing requirements apply.



1. Who Qualifies As a Nonresident Alien?


Under Internal Revenue Code (IRC) § 7701(b), foreign nationals generally qualify as nonresident aliens if they meet neither the green card test nor the substantial presence test. Statutory exceptions, elections, and tax treaties may alter this classification.


Nonresident Alien Vs. Resident Alien

Resident aliens generally report worldwide income, while nonresident aliens generally pay federal income tax on taxable U.S.-source income and income effectively connected with a U.S. trade or business. Federal tax residency is separate from immigration status and state tax residency.

The Green Card Test

Holding lawful permanent resident status during the calendar year generally satisfies this test. Living abroad or allowing a green card to expire does not by itself end tax residency. Formal abandonment, revocation, or qualifying treaty treatment may affect green card taxation obligations.


2. How Does the Substantial Presence Test Work?


IRC § 7701(b)(3) requires at least 31 countable days in the United States during the current calendar year and at least 183 weighted days across three calendar years. Earlier visits may establish tax residency even when current-year presence falls below 183 days.


Calculating Days Across Three Calendar Years

This example illustrates the calculation for 2026, assuming no excluded days.

Calendar YearDays PresentApplicable FractionWeighted Days
2026120100%120
20251501/350
20241201/620
Total390N/A190

2026

  • Days Present120
  • Applicable Fraction100%
  • Weighted Days120

2025

  • Days Present150
  • Applicable Fraction1/3
  • Weighted Days50

2024

  • Days Present120
  • Applicable Fraction1/6
  • Weighted Days20

Total

  • Days Present390
  • Applicable FractionN/A
  • Weighted Days190

The individual meets both numerical requirements but may qualify for an exception.

Days Excluded from the Calculation

Presence during any part of a day generally counts as a full day. Qualifying exclusions include:

  • Days as an exempt individual, including certain foreign government personnel, students, teachers, trainees, and professional athletes competing in charitable sporting events.
  • Regular commuting to work from a residence in Canada or Mexico.
  • Transit between foreign locations lasting less than 24 hours, subject to applicable restrictions.
  • Qualifying service as a crew member of a foreign vessel without other U.S. trade or business activities.
  • Days when a medical condition arising in the United States prevents an intended departure.

Passport stamps, I-94 travel records, and immigration or medical documents can substantiate presence and exclusions.


3. Which Exceptions Can Preserve Nonresident Alien Status?


Eligible individuals may exclude certain days from the residency calculation. Those who meet the substantial presence test may still qualify for nonresident treatment under separate statutory or treaty provisions.


Exempt Individuals under F, J, M, and Q Status

Qualifying F, J, M, or Q students who substantially comply with their visa requirements generally qualify for five exempt calendar years, including prior exempt years as students, teachers, or trainees. Further exclusions require proof of eligibility, including no intent to reside permanently in the United States.
Qualifying J or Q teachers and trainees generally lose eligibility after two exempt calendar years within the preceding six, subject to a limited foreign compensation exception.
H-1B and B-1/B-2 status alone do not qualify for these exclusions. Exempt individual status does not provide an income tax exemption.

Closer Connection to a Foreign Country

This exception requires fewer than 183 countable days in the United States during the current year, a foreign tax home throughout that year, and a closer connection to a qualifying foreign country. Special rules permit connections to two foreign countries. Pending adjustment applications or affirmative steps toward permanent residence during the year prevent eligibility.

Tax Treaty Residency Rules

An applicable income tax treaty may resolve dual residency through criteria such as permanent homes, personal and economic ties, and habitual residence. Treaty-based nonresident treatment generally requires Form 8833 and may trigger expatriation tax or reporting obligations for certain long-term permanent residents.


4. When Does Nonresident Alien Status Change?


Diagram: Timeline showing residency starting dates, ending dates, and dual-status tax year rules.
Diagram: Timeline showing residency starting dates, ending dates, and dual-status tax year rules.

Obtaining permanent residence or meeting the substantial presence test can change an individual's tax classification. Statutory starting and ending dates determine which portion of the year is subject to resident treatment.


Residency Starting Dates

Under IRC § 7701(b)(2), first-year residency generally begins on the first day of U.S. presence as a permanent resident or the first countable day under the substantial presence test. If both tests apply, the earlier date generally controls.
Up to 10 qualifying days may be disregarded when determining the starting date but still count toward the substantial presence test. Residency generally remains continuous across consecutive resident years.

Residency Ending Dates

Residency generally continues through December 31. Earlier termination requires meeting applicable conditions, including a foreign tax home, a closer foreign connection, and nonresident status throughout the following year. Permanent residents must also satisfy the applicable rules for terminating residency under the green card test.

Dual-Status Tax Years and Residency Elections

A dual-status taxpayer is a resident alien for part of the tax year and a nonresident alien for the remainder.
Under IRC § 7701(b)(4), individuals who meet neither residency test in the election year may elect partial-year residency if they were nonresidents in the preceding year and meet the substantial presence test in the following year.
The election requires at least 31 consecutive qualifying days, at least 75% presence from the start of that period through December 31, and an election statement. Up to five days of absence may count toward the percentage requirement.
Eligible spouses may elect resident treatment under IRC § 6013(g) or (h), potentially expanding their international tax compliance obligations.


5. Which Tax Forms Do Nonresident Aliens Use?


Federal tax forms serve different purposes, from establishing residency exceptions to reporting taxable income. A withholding certificate does not replace a required income tax return.


Forms 8843 and 8840

Form 8843 documents qualifying excluded days for students, teachers, trainees, professional athletes, and individuals with eligible medical conditions. Form 8840 claims the general closer connection exception.
Attach the applicable form to a required income tax return or file it separately by the applicable deadline if no return is required. Late filing of Form 8840, or Form 8843 for medical or professional athlete exclusions, may prevent the claimed treatment unless regulatory relief applies.

Form W-8BEN, Form W-9, and Income Tax Returns

Nonresident aliens generally provide Form W-8BEN for applicable withholding purposes, while resident aliens generally provide Form W-9. Personal services compensation may require different forms.
Nonresident aliens with filing obligations generally use Form 1040-NR rather than Form 1040. Dual-status taxpayers generally file the return corresponding to their year-end residency status with a statement covering the other period.

A tax attorney can assess whether incorrect residency classifications require changes to previous returns or withholding certificates.


6. Frequently Asked Questions


Does Having a Social Security Number Make You a Resident Alien?

No. Neither a Social Security number nor an Individual Taxpayer Identification Number (ITIN) establishes federal tax residency.

Do Days Spent in Puerto Rico Count toward the Substantial Presence Test?

No. For this test, the United States includes the 50 states, the District of Columbia, and certain territorial waters and seabed areas. Puerto RICO and other U.S. territories fall outside this definition.


02 Dec, 2026


The information provided in this article is for general informational purposes only and does not constitute legal advice. Prior results do not guarantee a similar outcome. Reading or relying on the contents of this article does not create an attorney-client relationship with our firm. For advice regarding your specific situation, please consult a qualified attorney licensed in your jurisdiction.
Certain informational content on this website may utilize technology-assisted drafting tools and is subject to attorney review.