Why this question matters so much

Before you can file a U.S. tax return, you need to know one thing: are you a resident alien or a nonresident alien for tax purposes?

This single determination affects everything else:

  • Which tax form you file (Form 1040 vs. Form 1040-NR)
  • What income you must report (worldwide vs. U.S.-source only)
  • Whether you can claim the standard deduction
  • Which tax credits you can access
  • Whether you can file jointly with a spouse

Getting this wrong — especially filing as a resident when you should be a nonresident, or vice versa — is one of the most consequential errors a new immigrant can make. It affects every other part of your return.

ℹ️ Tax residency ≠ immigration residency

These are completely separate concepts. You can be a legal permanent resident (green card holder) for immigration purposes and still be treated differently for tax purposes in your first year. Conversely, you can be on a temporary visa and be a full resident alien for tax purposes. The IRS makes its own determination based on physical presence and status — not your visa type.

The two tests — and which applies to you

The IRS uses two tests to determine if you are a resident alien. If you meet either test, you are a resident alien.

Test 1: The Green Card Test

Simple: if you were a lawful permanent resident (green card holder) at any time during the tax year, you are a resident alien for that entire year.

There are no day-count calculations. No exceptions based on where you lived. If you held a green card, you're in — for the entire year, even if you got it on December 30th.

Test 2: The Substantial Presence Test

If you don't have a green card, the IRS counts how many days you were physically in the U.S. over a three-year period using this formula:

Days in current year × 1 (all days count)
Days in year −1 × 1/3
Days in year −2 × 1/6
Total ≥ 183 AND at least 31 days in current year

If both conditions are met → you are a resident alien for the current year.

A worked example

Let's say you arrived on an H-1B visa and were present in the U.S. as follows:

YearDays presentMultiplierWeighted days
Current year (2025)210 days× 1210
Prior year (2024)180 days× 1/360
Year before (2023)120 days× 1/620
Total290 ≥ 183 ✓

Result: Resident alien for 2025. Files Form 1040, reports worldwide income.

Exempt individuals — days that don't count

Not all days in the U.S. count toward the Substantial Presence Test. If you are an "exempt individual," your days in the U.S. during that status are excluded from the count.

Visa typeExempt periodNotes
F-1 studentFirst 5 calendar years in F-1 statusAfter year 5, days start counting normally
J-1 studentFirst 5 calendar years in J-1 statusSame as F-1
J-1 non-student (teacher, researcher)First 2 calendar years in J-1 statusShorter exemption period
Diplomat / government official (A or G visa)Entire period of official statusFull exemption while on official assignment
Medical conditionDays unable to leave due to medical emergencyMust have intended to leave; file Form 8843
⚠️ "Exempt individual" ≠ exempt from taxes

Being an exempt individual means your days don't count toward the Substantial Presence Test. It does NOT mean you're exempt from paying U.S. taxes. Nonresident aliens still owe U.S. tax on U.S.-source income and must file Form 1040-NR if they have U.S. income above the filing threshold.

Quick determination flowchart

Step 1
Did you hold a green card at any point this year?
YES → Resident alien → File Form 1040
NO → Continue to Step 2
Step 2
Are you an exempt individual (F-1, J-1, diplomat, etc.)?
YES → Nonresident alien → File Form 1040-NR
NO → Continue to Step 3
Step 3
Do you meet the Substantial Presence Test (≥183 weighted days, ≥31 days this year)?
YES → Resident alien → File Form 1040
NO → Nonresident alien → File Form 1040-NR

What each status means for your taxes

TopicResident alienNonresident alien
Tax formForm 1040Form 1040-NR
Income taxedWorldwide incomeU.S.-source income only
Standard deductionYes ($15,000 single in 2025)No (itemize only)
Joint filing with spouseYesGenerally no (unless election made)
Most tax creditsYes (Child Tax Credit, EITC, etc.)Limited (some credits not available)
Tax treatiesMay still applyMay reduce or eliminate U.S. tax on certain income
FBAR requirementYes (if foreign accounts > $10,000)Yes (if foreign accounts > $10,000)

Special situations

The "closer connection" exception

If you pass the Substantial Presence Test but were present fewer than 183 days in the current year, you may still be treated as a nonresident alien if you can show a "closer connection" to a foreign country. You prove this by filing Form 8840 and demonstrating that your primary home, family, bank accounts, and other ties are in another country. This exception is not available if you have applied for a green card.

The first-year choice election

If you arrive in the U.S. and don't quite meet the Substantial Presence Test in your first year, but you do meet it the following year, you may be able to elect to be treated as a resident alien for the last part of your first year. This is called the "first-year choice" election and requires meeting specific conditions. It can simplify your filing situation and unlock additional deductions.

Dual-status year

In the year you become a U.S. tax resident (or the year you leave), you may be a nonresident for part of the year and a resident for the rest. This is called a "dual-status" year and requires a more complex return — generally a Form 1040 with a 1040-NR attachment. Dual-status filers cannot use the standard deduction or file jointly. Professional help is strongly recommended for dual-status returns.

💡 When to get professional help

If any of these apply to you, consult a CPA before filing: your year of arrival or departure, dual-status year, you qualify for a closer connection exception, you want to make a first-year choice election, or your spouse has a different residency status. These situations involve elections that are difficult or impossible to undo after filing.