You are a resident alien for a year if you pass one of two tests in that year: the green card test or the substantial presence test. If you pass neither, you are a nonresident alien. The IRS states this on its page on tax residency status.
Your visa does not decide it. Two people on the same visa can have a different status, because the count of days decides.
The two tests
| Test | You pass when |
|---|---|
| Green card test | You were a lawful permanent resident at any time in the year. |
| Substantial presence test | You were in the US for at least 31 days in the year, and for 183 days in a three-year count. |
For the count, see how to calculate the substantial presence test.
Examples for 2026
The Kyoto engine computed each row. Each person has no green card, was in the US every day after arrival, and stayed through December 31, 2026. No student here claims more than 5 student years.
| Person | Status for 2026 | Why |
|---|---|---|
| Arrived on an H-1B on January 1, 2026 | Resident | In the US for the full year. |
| Arrived on an H-1B on May 1, 2026 | Dual status | 245 days. Resident from May 1. |
| Arrived on an H-1B on September 1, 2026 | Nonresident | 122 days. Not enough. |
| On an F-1 since August 2022 | Nonresident | Student days do not count for 5 calendar years. |
| On an F-1 since August 2021 | Resident | The 5 years (2021 to 2025) are used. Every day of 2026 counts. |
| On an F-1 since August 2022, changed to H-1B on October 1, 2026 | Nonresident | Only the 92 days on the H-1B count. |
For more arrival dates, see H-1B: resident or nonresident alien. To get your own dates, see how to get your I-94 travel history.
Why it matters
- What is taxed. A resident pays US tax on income from every country. A nonresident pays US tax on income from the US.
- The tax return. A resident files Form 1040. A nonresident files Form 1040-NR. For your first year in the US, see which tax return you file.
- The deductions. A nonresident generally cannot take the standard deduction. See Publication 519.
But this matters too
- You can be both in one year. In the year you arrive or leave, you can be a nonresident for one part and a resident for the other. This is a dual-status year.
- Students must send a statement. A student whose days do not count sends Form 8843, even with no income.
- A choice can change your status. A person who arrives late in the year can sometimes choose to be a resident from the arrival date. A US citizen or a resident can choose to treat a nonresident spouse as a resident. Both are in Publication 519.
- Earlier visits count. Days in the two years before can push you over the line.
- A closer connection to another country can keep you a nonresident. See the closer connection exception.
- Your state has its own rule. A state can treat you as a resident when the federal rule does not.
Sources
- Determining an individual’s tax residency status (IRS)
- Topic no. 851, Resident and nonresident aliens (IRS)
- Exempt individual: who is a student (IRS)
- Publication 519, U.S. Tax Guide for Aliens (IRS)
- 26 U.S.C. section 7701(b)
Questions and answers
Does my visa decide if I am a resident alien for tax?
No. You are a resident alien for a year if you pass the green card test or the substantial presence test in that year. Two people on the same visa can have a different status, because the count of days decides.
Is an F-1 student a resident alien or a nonresident alien for 2026?
Student days do not count for 5 calendar years. For 2026, a student with no green card who has been on an F-1 since August 2022 and stays in the US through December 31 is a nonresident. A student on an F-1 since August 2021 has used the 5 years, 2021 to 2025. If that student claims no more student years, every day of 2026 counts, and the student is a resident.
Can I be a resident and a nonresident in the same year?
Yes. In the year you arrive or leave, you can be a nonresident for one part and a resident for the other. This is a dual-status year. For example, a person with no green card who arrived on an H-1B on May 1, 2026, and was in the US every day through December 31 has dual status for 2026, and is a resident from May 1.
What changes if I am a nonresident alien?
A nonresident pays US tax on income from the US, files Form 1040-NR, and generally cannot take the standard deduction. A resident pays US tax on income from every country and files Form 1040.