Resident or nonresident alien and how the IRS decides
The IRS decides your tax residency with the green card test and the substantial presence test, not your visa. What each status means for your return.

This is for any noncitizen with US income who needs to know whether they are a resident or nonresident alien, which tax return to file and what income it covers: H-1B and L-1 workers, students and scholars, dependents, and new green card holders. It explains the two tests, the dates that start and end residency, and what each status changes on your return. It is not for US citizens, and it does not cover state residency, which every state decides under its own rules.
The first thing to unlearn is that your visa decides your tax status. It does not. "Resident alien" and "nonresident alien" are tax terms, set by two tests in the Internal Revenue Code, and they can disagree with your immigration status in both directions. An H-1B worker is usually a resident alien for tax purposes. A green card holder is always one. An F-1 student who has been in the country four years is usually still a nonresident alien.
The two tests
You are a resident alien for a calendar year if you meet either test (IRS, Publication 519).
The green card test. You are a resident for tax purposes if you are a lawful permanent resident of the United States at any time during the calendar year. The status continues until it is taken away or found to have been abandoned, so a green card holder who lives abroad for a year is still a resident alien unless that happens.
The substantial presence test. You meet it if you were physically present in the United States for at least 31 days this year, and 183 days over three years counting all the days this year, one third of the days last year and one sixth of the days the year before (IRS, Substantial presence test). The post on the substantial presence test works through examples.
Days you do not count include days as an "exempt individual" (most F, J, M and Q students for their first five calendar years, and J and Q teachers and trainees for two of the last six years), days commuting from Canada or Mexico if you regularly commute, days in transit 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 here (Publication 519). Exempt individuals file Form 8843 to claim those days.
If you meet neither test, you are a nonresident alien.
What each status means
| Resident alien | Nonresident alien | |
|---|---|---|
| Income taxed | Worldwide income, from every country | US-source income, and income effectively connected with a US trade or business |
| Return | Form 1040 | Form 1040-NR |
| Standard deduction | Yes: $16,100 single for 2026 | No, except students and business apprentices from India under the treaty |
| Filing jointly | Yes, if married | No, unless a choice to be treated as resident applies |
| Investment income | Taxed at regular rates | Interest on US bank deposits generally exempt; other US investment income often taxed at a flat 30 percent or a lower treaty rate |
| Foreign accounts | FBAR and Form 8938 may apply | Generally not |
The 2026 standard deduction figure is from the IRS inflation adjustments (IRS).
The worldwide income line is the one that surprises people most. A resident alien reports interest from a savings account in Mumbai, rent from a flat in Manila and dividends from a Canadian brokerage on the US return, and usually claims a foreign tax credit for tax paid there. The post on reporting Indian income on a US return walks through one case.
When residency starts and ends
Residency rarely lines up with January 1 in your first year.
Starting date. If you meet the substantial presence test, your residency starting date is generally the first day you are present in the United States that year. You can disregard up to 10 days of earlier presence if you had a closer connection to a foreign country on those days, with a signed statement. Under the green card test, the date is the first day in the year you are present as a permanent resident. You are a nonresident alien for the part of the year before that date (Publication 519).
Ending date. If you were a resident last year and are not a resident at all this year, your residency ends on December 31 of last year, unless you qualify for an earlier date. The earlier date is your last day of presence (substantial presence test) or the day you stopped being a permanent resident (green card test), and it applies only if your tax home was abroad and you had a closer connection to that country for the rest of the year.
A year with both a nonresident part and a resident part is a dual-status year, with its own return rules. The post on the dual-status tax year covers them.
A worked case
Ana arrives in H-1B status on April 13, 2026, after a five-day business trip in January (January 12 to 16). She was never in the US before 2026 and stays the rest of the year.
Substantial presence test for 2026. From April 13 to December 31 is 263 days, plus 5 in January, so 268. She meets the test.
Residency starting date. Her first day of presence is January 12. She can disregard the 5 January days if her tax home was in her home country then and she had a closer connection there, by filing the 10-day statement. Her residency starting date becomes April 13, 2026.
Result. She is a nonresident alien from January 1 to April 12 and a resident alien from April 13. That is a dual-status year, unless she is married and she and her spouse choose to be treated as residents for the whole year.
2027 onward. She is a resident alien for the full year as long as she keeps meeting a test.
Compare Ben, an F-1 student who arrives on August 20, 2022. His days from 2022 to 2026 are exempt, so he is a nonresident alien each of those years and files Form 8843 with his Form 1040-NR. In 2027, his sixth calendar year, his days start counting, and he will likely become a resident alien partway through that year. The post on when an F-1 student becomes a resident for tax purposes has the timeline.
Treaties can change the answer
A tax treaty can treat someone who is a resident under US law as a resident of the other country, through a tiebreaker rule. A person who claims that files Form 1040-NR with Form 8833 and is taxed as a nonresident. Claiming treaty nonresidency can have immigration consequences for a green card holder, so that is a decision for a tax professional and an immigration attorney together, not a box to tick.
What people get wrong
"I'm on a work visa, so I'm a nonresident." Most H-1B and L-1 workers are resident aliens from their first full year, and often from their arrival date.
"Tax resident means permanent resident." No. Meeting the substantial presence test changes your return, not your immigration status.
"Nonresidents don't file." A nonresident alien with US wages or other taxable US income files Form 1040-NR, and an exempt individual files Form 8843 even with no income.


