Resident vs Nonresident Alien: Substantial Presence Test Calculator
Updated · Reviewed by Deepak Middha, Chartered Accountant
The short answer
You are a resident alien for US tax if you had a green card at any time in the year, or you pass the substantial presence test: at least 31 days this year and 183 weighted days over three years. Residents file Form 1040 on worldwide income; nonresidents file Form 1040-NR on US income only.
Substantial presence test calculator
| Year | Counted | Weight | Days |
|---|---|---|---|
| 2026 | 120 | × 1 | 120 |
| 2025 | 120 | × 1/3 | 40 |
| 2024 | 120 | × 1/6 | 20 |
| Weighted total (need 183, and 31+ this year) | 180 | ||
Your weighted total is 180.00 days, under the 183 the test requires.
Return to file: Form 1040-NR (if you have US income to report).
Key takeaways
- There are only two ways to be a resident alien: the green card test or the substantial presence test.
- The day count is all of this year's days, plus 1/3 of last year's and 1/6 of the year before's — and you need 183 in total with at least 31 this year.
- Students on F, J, M or Q visas usually do not count days for their first 5 calendar years, and must file Form 8843 to exclude them.
- Fewer than 183 days this year with stronger ties abroad? The closer connection exception may keep you a nonresident.
- The year you arrive or leave is often a dual-status year, with one return and the other form attached as a statement.
Resident alien vs nonresident alien: what changes
| Resident alien | Nonresident alien | |
|---|---|---|
| Income taxed | Worldwide income, like a US citizen | US-source income and income connected with a US business |
| Return | Form 1040 | Form 1040-NR |
| Standard deduction | Yes | No (special rule for students and apprentices from India) |
| Joint return | Yes, if married | No, unless choosing resident status with a US citizen or resident spouse |
| Foreign account reporting | FBAR and Form 8938 can apply | Generally not required — both apply to US persons |
Becoming a resident alien also brings in reporting of foreign accounts and assets — check the FBAR and Form 8938 checker. If you hold an ITIN rather than an SSN, the ITIN guide covers getting and using one.
1040 or 1040-NR? Which return you file
| Your status for the year | File |
|---|---|
| Resident alien all year | Form 1040 |
| Nonresident alien all year, with US income | Form 1040-NR (plus Form 8843 if you excluded days) |
| Dual-status, resident on December 31 | Form 1040 marked “Dual Status Return”, with Form 1040-NR as the statement |
| Dual-status, nonresident on December 31 | Form 1040-NR marked “Dual Status Return”, with Form 1040 as the statement |
Students should also read ITIN and tax filing for international students, and anyone resident in two countries at once may be able to use a treaty tie-breaker — see the tax treaty guide.
Dual-status alien: the year you arrive or leave
You can be a nonresident alien and a resident alien in the same tax year, usually the year you arrive in or leave the United States. If you meet a test this year but were not a resident at any time last year, you are a resident only from your residency starting date — generally your first day in the US that year under the substantial presence test, or your first day here as a green card holder. You file one return for the year and attach the other form as a statement for the other part. A dual-status filer cannot take the standard deduction and cannot file jointly unless choosing resident status with a spouse.
Met the test but here fewer than 183 days, with your tax home and closer ties in another country? Read the IRS page on the closer connection exception (Form 8840).
Frequently asked questions
What is a nonresident alien?
For US tax purposes, an alien is anyone who is not a US citizen. A nonresident alien is an alien who meets neither the green card test nor the substantial presence test for the year. Nonresident aliens are taxed only on US-source income and income connected with a US trade or business, generally file Form 1040-NR, and cannot claim the standard deduction except under a special rule for students and apprentices from India.
How does the substantial presence test work?
You meet it if you were in the US at least 31 days this year and at least 183 days over three years, counting all of this year's days, one-third of last year's and one-sixth of the year before. The IRS example: 120 days in each of three years gives 120 + 40 + 20 = 180, which is not enough. Days as an exempt individual, such as a student on an F visa, are not counted.
What is the difference between a resident alien and a nonresident alien?
A resident alien is taxed like a US citizen: on worldwide income, with the standard deduction, on Form 1040. A nonresident alien is taxed only on US-source and US business income, generally on Form 1040-NR, with a narrower set of deductions. Residency for tax purposes is separate from immigration status — someone on a work visa can be a resident alien for tax purposes.
Do F-1 students count days for the substantial presence test?
Not at first. A student on an F, J, M or Q visa who substantially complies with it is an exempt individual, so those days are not counted, for up to 5 calendar years — and any part of a year counts as a year. After that the days count unless the student shows no intent to live in the US permanently. Exempt students file Form 8843 to exclude the days.
When do I file Form 1040-NR instead of Form 1040?
File Form 1040-NR if you were a nonresident alien for the whole year and have US income to report, or if you are dual-status and were a nonresident on the last day of the year. File Form 1040 if you were a resident alien all year, or dual-status and a resident on the last day of the year, attaching the other form as a statement.
What is a dual-status alien?
Someone who is a nonresident alien for part of the tax year and a resident alien for the rest — usually in the year they arrive in or leave the United States. If you become a resident this year but were not a resident at any time last year, you are a resident only from your residency starting date. A dual-status filer cannot take the standard deduction.
- IRS — Substantial presence test (reviewed 14-Mar-2026) →
- IRS Publication 519 (2025) — U.S. Tax Guide for Aliens →
- IRS — Closer connection exception to the substantial presence test →
- IRS — Closer connection exception for foreign students →
- IRS — Determining an individual's tax residency status →
- IRS — About Form 8843 →