VOLUME 1 · CHAPTER 1 OF 8

Your Tax Status Is Not Your Visa

Why the IRS sorts visa holders into resident and nonresident aliens by its own tests, the green card and substantial presence tests, and what each status changes about the income taxed, the form filed and the deductions allowed.

6 min readFoundations2 worked examplesupdated 2026-10-01
TRY IT WITH YOUR NUMBERSOpen the full calculator →
Loading the US tax residency checker…
Same formula and engine as the full calculator. Your numbers stay in this browser.

You arrived with a visa stamp, an I-94 record and an employer or a school. None of those tell the IRS how to tax you. US tax law sorts every non-citizen into one of two groups, resident alien or nonresident alien, using its own tests, and the answer can differ from what your visa suggests. This chapter explains the two groups, the tests that decide between them, and what changes on your paycheck and your return. Every later chapter in this book builds on it.

Two systems that ask different questions

Immigration law and tax law run side by side and rarely talk to each other. Your visa (H-1B, F-1, J-1, L-1, O-1 and so on) is an immigration status. It says why you may be in the country and whether you may work. It is decided by the Department of State and US Citizenship and Immigration Services.

Your tax status is decided by the Internal Revenue Code, and it asks only two questions. Do you hold a green card? And how many days have you been physically present in the United States? IRS Publication 519, the US Tax Guide for Aliens, is the official explanation of both tests.

That is why the two statuses drift apart. Two examples show how far:

  • Someone who starts work on an H-1B in October is usually a nonresident alien for tax that first year, even though the visa is a long-term work visa.
  • An F-1 student in their sixth calendar year in the US is usually a resident alien for tax, even though they are still on a student visa.

A third point trips up many newcomers: being a "resident" for tax has nothing to do with being a permanent resident. A green card makes you a resident for tax, but you can be a resident for tax without one.

The two tests

The green card test. If you were a lawful permanent resident at any time during the calendar year, you are a resident alien for that year.

The substantial presence test. If you were physically present in the US for at least 31 days this year, and for at least 183 days counting all of this year's days, one-third of last year's and one-sixth of the year before, you are a resident alien. Chapter 2 walks through the counting, including the days that do not count. Here is the effect in its simplest form, for someone with no earlier US days:

ARRIVES ON AN H-1B ON OCTOBER 1 AND HAS NO EARLIER US DAYS
Days this year
92
Days last year
0
Days the year before
0
Weighted days
92 days
Meets the test
no
Most days this year and stay under
182 days
Computed by the same engine as the calculators. Change the inputs there to see your own.

Arriving on October 1 gives 92 days in the year, 92 weighted days in all. Meets the test: no. This person is a nonresident alien for the whole first year, unless they make the first-year choice described in chapter 3.

ARRIVES ON MARCH 1 AND STAYS THROUGH DECEMBER 31
Days this year
306
Days last year
0
Days the year before
0
Weighted days
306 days
Meets the test
yes
Most days this year and stay under
182 days
Computed by the same engine as the calculators. Change the inputs there to see your own.

Arriving on March 1 instead gives 306 days. Meets the test: yes. This person becomes a resident alien, but only from the first day of presence: the months before arrival are a nonresident period, which makes it a dual-status year (also chapter 3).

If neither test is met, you are a nonresident alien for the year.

What changes with your tax status

The two groups are taxed on different income, file different forms and get different deductions.

A resident alien is taxed like a US citizen:

  • on worldwide income, including interest, dividends, rent and gains from accounts back home;
  • on Form 1040, with the standard deduction ($16,100 for a single filer in 2026) or itemized deductions, and the same filing statuses as citizens;
  • with the duty to report foreign accounts once they pass the FBAR and Form 8938 thresholds, covered in chapter 8.

A nonresident alien is taxed mainly on income from US sources:

  • wages and other income connected with work in the US are taxed at the same graduated rates as everyone else, but without the standard deduction (students and business apprentices eligible for Article 21(2) of the US–India tax treaty are the main exception);
  • most other US-source income, such as dividends, is taxed at a flat 30% unless a tax treaty sets a lower rate;
  • income from outside the US is generally not taxed by the US at all;
  • the return is Form 1040-NR, a married nonresident usually cannot file a joint return, and most credits are limited.

Social Security and Medicare tax is a separate question with its own rules. An H-1B worker pays it from the first paycheck whatever their tax status; many F-1 and J-1 students do not while they are nonresidents. Chapter 4 covers it.

Tax treaties can change the answer

The United States has income tax treaties with many countries. A treaty can lower the tax on particular income, exempt some student or researcher pay for a period, or let a student claim deductions the rules above would deny. The India treaty's standard deduction for students is one example.

A treaty can also decide residency itself. If both the US and another country consider you a resident under their own laws, most treaties contain a tie-breaker rule that assigns you to one country. Publication 519 says that a person who claims to be a nonresident under a tie-breaker files Form 1040-NR with Form 8833 attached. This is uncommon for most visa holders and has consequences of its own, including a possible link to the expatriation rules for long-term green card holders. Treat it as a reason to get professional help, not a do-it-yourself step.

Treaty terms differ country by country and article by article. If your country has a treaty, read the relevant article on the IRS treaty pages, and IRS Publication 901, before relying on it.

Four mistakes that cost newcomers money

  1. Assuming an H-1B makes you a resident from day one. The day count decides, and the first year is often nonresident or dual-status.
  2. Assuming an F-1 makes you a nonresident forever. Students stop being exempt from the day count after five calendar years, and a calendar year counts even if you arrived in August.
  3. Filing the wrong form. A nonresident who files Form 1040 and takes the standard deduction has filed an incorrect return. Much consumer tax software is built only for Form 1040.
  4. Forgetting the other country. US status says nothing about whether your home country still taxes you. Many countries tax by their own residency rules, and a treaty is what prevents the same income being taxed twice.
YOUR NEXT STEPSDo this now
  1. Download your travel history from the official I-94 website at https://i94.cbp.dhs.gov and list every entry and exit date for this year and the two before it.
  2. Run those days through the substantial presence test calculator to see which group you are in this year, and when that is likely to change.
  3. Write down your visa category and, if you were ever an F, J, M or Q student, teacher or trainee, every calendar year you held that status. Chapter 2 explains why.
  4. If your country has a tax treaty with the US, find its student, researcher or employment article on the IRS treaty pages and note what it changes.
  5. Questions about your immigration status itself (whether you may work, change employers or stay) belong with an immigration attorney or your school's designated official, not a tax guide.

This chapter summarizes federal tax rules for 2026 from IRS Publication 519. It is not personal tax advice or immigration advice; your days, visa history and any treaty decide what applies to you.

KEY TERMS
Resident and nonresident alien (for tax)Substantial presence testTax treatyFICA exemption for F-1 and J-1 studentsEffectively connected income (ECI)
SOURCES
Saved in this browser. Sign in to keep it on every device.
WORK IT OUT WITH YOUR NUMBERS
401(k) withdrawal when leaving the US →Leaving the US on a visa: what do I net if I cash out now vs later, leave it or roll it over?Take-home pay, visa-holder variant →What will I actually take home per paycheck, including as an H-1B, F-1 OPT or nonresident alien?Nonresident spouse: §6013(g) election vs MFS/HoH →Should my nonresident spouse and I file jointly or separately?
QUICK ANSWERS
What is the substantial presence test? →