Resident or nonresident alien in 60 seconds
For tax purposes, immigration labels do not decide your status. Two tax tests do. If you are a lawful permanent resident (green card holder) at any time during the calendar year, you are a resident alien. If not, you are still a resident alien if you meet the substantial presence test. Pass neither and you are a nonresident alien.
The difference is large. A resident alien is generally taxed the same way as a U.S. citizen, on income from everywhere in the world, with the same deductions and credits. A nonresident alien is taxed only on U.S. source income and on income effectively connected with a U.S. trade or business, and loses most deductions and credits.
Many people are both in the same year: nonresident until they arrive or after they leave, resident for the rest. That is a dual-status year, and it has its own return rules. This guide is educational, not individualized tax advice.
An H-1B or L-1 worker counts every day toward the substantial presence test, so most become resident aliens in their first full year here. An F-1 or J-1 student usually does not count days for up to five calendar years. Same apartment, same salary, very different returns.
The green card test and the substantial presence test
In the year you leave, residency normally runs to December 31. You can end it earlier, on your last day of presence or the day you stopped being a permanent resident, only if your tax home was in a foreign country for the rest of the year.
| Test | You are a resident if | Residency generally starts |
|---|---|---|
| Green card test | You were a lawful permanent resident at any time during the calendar year | First day of the year you are present in the U.S. as a lawful permanent resident |
| Substantial presence test | At least 31 days this year and 183 weighted days over this year and the two prior years | First day you are present in the U.S. that year (up to 10 days can be disregarded with a closer connection and foreign tax home) |
If you meet both tests, the earlier starting date applies. A green card holder stays a resident until status is formally ended, even while living abroad.
The day-count rules, excluded days and exempt individuals are explained in the substantial presence test guide.
What resident and nonresident aliens are taxed on
For a nonresident who works here, wages for U.S. services are effectively connected income and taxed at the same graduated rates residents pay. The real differences show up on investment income, deductions, credits and filing status.
| Item | Resident alien | Nonresident alien |
|---|---|---|
| Income taxed | Worldwide income | U.S. source income and income effectively connected with a U.S. trade or business |
| Rates | Same graduated rates as citizens | Graduated rates on effectively connected income; generally a flat 30% (or lower treaty rate) on gross U.S. source passive income such as dividends |
| Return | Form 1040 | Form 1040-NR |
| Standard deduction | Yes | No (narrow exception for students and business apprentices from India) |
| Joint return | Yes, if married | Generally no |
| Credits | Same as citizens | Only with effectively connected income; generally no earned income credit or education credits |
| Foreign accounts | FBAR and Form 8938 rules can apply | Check each form’s own definition of who must file |
FBAR and Form 8938 each define who must file in their own terms; see the FBAR and Form 8938 pages before assuming either one does or does not apply.
Dual-status tax returns
In a dual-status year you are taxed as a resident for part of the year and as a nonresident for the rest. The form depends on your status on December 31. If you are a resident at year end, file Form 1040 marked “Dual-Status Return” and attach a statement (Form 1040-NR can serve as it) for the nonresident period. If you are a nonresident at year end, it is the reverse: Form 1040-NR as the return, Form 1040 as the statement.
The restrictions are what cost money. Pub 519 says a dual-status filer cannot use the standard deduction, the head of household rates or a joint return, and a married dual-status filer who does not make the joint election generally must use the married filing separately rates. For 2025 returns, dual-status filers could not e-file.
Worked example
Worked example: an H-1B engineer who arrives July 1, 2026
- Days in the U.S. in 2026 (July 1 to December 31)
- 184
- Days in 2025 and 2024
- 0
- Weighted total for 2026
- 184, meets the test
- Resident alien from
- July 1, 2026
- January to June 2026 status
- Nonresident alien
- Return for 2026
- Dual-status Form 1040 with statement
Hypothetical. Foreign salary earned before July 1 is generally outside U.S. tax as non-U.S. source income of a nonresident; income from July 1 on is taxed worldwide. If the engineer is married, the couple may instead choose to be treated as residents for all of 2026 and file jointly, which brings in the standard deduction but also taxes both spouses’ worldwide income for the full year.
Elections that change the default: first-year choice and spousal election
First-year choice. Someone who does not meet either test this year but will meet the substantial presence test next year can choose to be a resident for part of this year. Pub 519 requires at least 31 consecutive days of presence in the year and presence on at least 75% of the days from the start of that 31-day stretch through December 31, with up to 5 days of absence treated as presence. You cannot make the choice until you actually meet the test for the following year, so the return is usually extended.
Choosing resident status with your spouse. A married nonresident or dual-status alien who meets the conditions in Pub 519 can, together with their spouse, choose to be treated as a resident for the entire year. Both spouses are then taxed on worldwide income, must file a joint return for that year, and attach a statement signed by both. In exchange the dual-status restrictions fall away. Single people cannot make this election.
Treaty tie-breakers
If you are a resident of both the United States and a treaty country under each country’s own rules, the treaty’s tie-breaker article can assign you to one country. A dual resident who claims to be a resident of the other country under the treaty files Form 1040-NR with Form 8833 attached and computes tax as a nonresident.
Green card holders should be careful here. Pub 519 says a green card holder who claims foreign residence under a treaty tie-breaker is treated as a nonresident for computing tax. Long-term green card holders also need to read the expatriation rules before relying on a tie-breaker, because the exit tax law counts treaty years in specific ways.
See Form 8833 explained and the exit tax guide.
What it means for H-1B, L-1 and F-1 holders
- H-1B and L-1 workers: there is no exempt category for these visas, so every day counts. Most are resident aliens by their first full calendar year here, taxed on worldwide income, and eligible for the standard deduction and joint filing. Foreign bank and brokerage accounts then come into FBAR and Form 8938 territory.
- F-1 and J-1 students: days as an exempt student do not count for up to five calendar years (with an exception for those who show they do not intend to reside permanently), so most students are nonresident aliens who file Form 8843, plus Form 1040-NR if they have U.S. income.
- Social Security and Medicare for students: Pub 519 says nonresident aliens in F, J, M or Q status generally are not subject to these taxes on services performed to carry out the purpose of their visa, which generally means on-campus work, practical training and economic hardship employment. Other work is generally taxed, and the exemption ends once the student becomes a resident alien, even on the same visa.
- Students moving to H-1B: the switch often creates a dual-status year, and the year the five-year student exemption runs out is the year many first owe tax as residents.
Check your pay stub after you become a resident
Pub 519 is explicit that resident aliens are not exempt from Social Security and Medicare, even when their visa classification has not changed. If withholding still treats you as an exempt nonresident student after you have become a resident, tell your employer.
When to hire a CPA and when to do it yourself
A full-year resident with only U.S. wages files a normal Form 1040 and often does fine on their own. A full-year nonresident student with a single W-2 and Form 8843 can usually manage too, using Pub 519 and the Form 1040-NR instructions.
Bring in a professional for the years that combine moving parts: a dual-status arrival or departure year, a joint election decision, a treaty tie-breaker, a green card holder living abroad, foreign accounts or a foreign business that become reportable once you are a resident, or a spouse with significant foreign income. Getting the status wrong usually means the wrong form, missed information returns and an amended return later.
What to check before you act
A practical review sequence for the return, books, or planning file.
Check the green card test: were you a lawful permanent resident at any time during the year?
If not, run the substantial presence test with a day log for three years.
Identify arrival or departure dates that make the year dual-status.
Decide whether the first-year choice or the joint resident election helps, comparing both outcomes.
If you are a resident of two countries, review the treaty tie-breaker and Form 8833.
Once a resident, list foreign accounts and assets for FBAR and Form 8938.
“I recently had the pleasure of working with Taxstra, and I must say, the experience exceeded my expectations. From start to finish, their professionalism, expertise, and customer care were outstanding.”
Published client feedback. Individual experiences vary.
High income earner, business owner or landlord? Here is what this changes for you.
Book your free 30-minute tax fit call to talk through your next steps.
Common mistakes
The shortcuts most likely to produce a confident but wrong answer.
Using visa type as tax status
H-1B and L-1 holders usually become resident aliens quickly; F-1 and J-1 students usually remain nonresidents for several years. The tax tests decide, not the visa label.
Filing Form 1040 as a nonresident
Nonresidents file Form 1040-NR. A nonresident who files Form 1040 may claim deductions and credits they cannot take.
Taking the standard deduction in a dual-status year
Dual-status filers cannot use the standard deduction unless they make the joint resident election.
Forgetting worldwide income after becoming a resident
From the residency starting date on, foreign interest, dividends, rent and gains are taxable in the United States, and foreign accounts can trigger FBAR and Form 8938.
Assuming a green card holder abroad is a nonresident
A green card holder remains a resident under the green card test until permanent resident status ends, regardless of where they live.
