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

Step 1 — Status in 2026
Step 2 — Days in the United States
Any part of a day counts as a day. “Other excluded days” are days commuting from Canada or Mexico, under 24 hours in transit, as a foreign-vessel crew member, or stuck here by a medical condition. Student and teacher days are excluded for you automatically.
Your 2026 status
Nonresident alien
YearCountedWeightDays
2026120× 1120
2025120× 1/340
2024120× 1/620
Weighted total (need 183, and 31+ this year)180
Substantial presence test: not met · Green card test: not met

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).

Private by design. No SSN, no bank login, no IRS login, no payroll password. No account is required. Calculator inputs are processed locally in your browser and are not transmitted to or stored by TaxSaveIQ. Standard website analytics and technical logs may still apply. See our Privacy Policy. Educational estimate only.

Key takeaways

Resident alien vs nonresident alien: what changes

Source: IRS Publication 519 (2025). Tax years 2025 and 2026.
Resident alienNonresident alien
Income taxedWorldwide income, like a US citizenUS-source income and income connected with a US business
ReturnForm 1040Form 1040-NR
Standard deductionYesNo (special rule for students and apprentices from India)
Joint returnYes, if marriedNo, unless choosing resident status with a US citizen or resident spouse
Foreign account reportingFBAR and Form 8938 can applyGenerally 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

Source: Publication 519, chapter 7.
Your status for the yearFile
Resident alien all yearForm 1040
Nonresident alien all year, with US incomeForm 1040-NR (plus Form 8843 if you excluded days)
Dual-status, resident on December 31Form 1040 marked “Dual Status Return”, with Form 1040-NR as the statement
Dual-status, nonresident on December 31Form 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.

Sources & verification
Last verified: 2026-10-25. Tax years 2025 and 2026 (the tests are set by statute and have no year-specific figures). Sources: Publication 519 (2025 edition, the current one) and the IRS substantial presence test page.
Related calculators & guides
ITIN Guide
Tax numbers for people without an SSN
ITIN for International Students
F and J student filing
Tax Treaty Guide
Treaty rates by country
FBAR & Form 8938 Checker
Resident aliens report foreign accounts
Form 8833 (treaty tie-breaker)
Dual residents claiming a treaty
Educational estimate only. The checker applies the green card test and the substantial presence test. It assumes every day in the US in your exempt years was spent on the visa you chose and that you had no earlier exempt years on another visa. It does not apply the first-year choice, the closer connection exception, treaty tie-breaker rules or the special rules for residents of US territories. Full disclaimer.