Substantial presence test · 2026
Am I a Resident Alien?
For F-1, J-1, M-1 and Q-1 visitors. Enter the year you first came and your days in the US: your exempt years are left out for you, and you see which tax return is yours.
Example: a student who first came in 2022
You are a nonresident alien for 2026
Exempt year 5 of 52026 is your 5th of 5 exempt years, so none of its days count and you stay a nonresident alien whatever your days. Your days start to count in 2027.
- File Form 8843, even with no income: it is what keeps your days from counting. Check what goes with it.
- File Form 1040-NR if you had US income, such as a campus job, CPT, OPT or a taxable scholarship.
- No Social Security or Medicare tax on pay your visa allows. If your W-2 shows some, see what comes back.
Assumes you were in the US for part of every calendar year since your first. Not covered: the closer connection exception (Form 8840), medical-condition days and treaty tie-breaker rules. This is information, not tax advice. Checked against IRS sources on . How we research.
Is an F-1 student a resident alien?
Not in their first five calendar years. F-1, J-1, M-1 and Q-1 students are exempt individuals for five calendar years, so their days in the US do not count toward the substantial presence test, and they file as nonresident aliens.
From the sixth calendar year the days count. A student who first came in 2021 and is here all of 2026 counts 365 days, all from 2026 since the two years before were exempt, and is a resident alien for 2026.
How does the substantial presence test work?
You are a resident alien for 2026 if you meet both:
- At least 31 days in the US in 2026, and
- At least 183 days counting every day of 2026, a third of the days of 2025 and a sixth of the days of 2024.
Days in an exempt year count as none. The IRS's own example: 120 days in each of three years counts 120 + 40 + 20 = 180, which is short of 183.
Which years are exempt?
- Students (F-1, M-1, and J-1 or Q-1 as a student): any part of five calendar years. Earlier years on an F, J, M or Q visa count toward the five.
- Teachers, researchers and trainees (J-1 or Q-1, not a student): two calendar years, because they are not exempt if they were exempt in any part of 2 of the 6 years before.
What changes when you become a resident alien?
You file Form 1040 instead of Form 1040-NR, you get the standard deduction, and Social Security and Medicare tax applies to most of your pay. See the sixth-year guide and resident vs nonresident alien tax.
Sources
- IRS: Substantial presence test
- IRS: Exempt individual, who is a student
- Publication 519, U.S. Tax Guide for Aliens, chapter 1
- Internal Revenue Code section 7701(b)(3) and (5)
01Is an F-1 student a resident alien or a nonresident alien?
A nonresident alien, for their first five calendar years in the US. F, J, M and Q students are exempt individuals for five calendar years, so their days in the US do not count toward the substantial presence test. From the sixth calendar year the days count, and a student who stays most of the year becomes a resident alien.
02When does an F-1 student become a resident alien for tax purposes?
Usually in their sixth calendar year in the US, once they have been in the US 183 days that year. Any part of a calendar year counts as a whole year, so a student who arrived in August 2021 has used up 2021 to 2025 and counts days from January 1, 2026. A student can stay a nonresident only by showing the IRS they do not intend to live in the US permanently, on Form 8843.
03Do OPT and STEM OPT years count toward the five years?
Yes. OPT and STEM OPT are F-1 status, so those calendar years are F-1 student years. That is why STEM OPT often reaches the sixth year: a student who came for a two-year master's and then took three years of OPT and STEM OPT is in their sixth calendar year by the end.
04How long are J-1 researchers and scholars nonresident aliens?
Usually two calendar years. A J-1 or Q-1 teacher, researcher or trainee who is not a student cannot exclude their days if they were exempt as a teacher, trainee or student in any part of 2 of the 6 calendar years before. Years as a student count toward the two.
05What counts as a day in the US?
Any day you were physically in the US, even for part of it. The test counts every day of 2026, a third of the days of 2025 and a sixth of the days of 2024. You meet it with at least 31 days in 2026 and 183 in all, leaving out your exempt years.
06Do I file Form 8843 if I had no income?
Yes. Every exempt individual files Form 8843 for each year, income or not. It needs no Social Security number or ITIN if you file it alone. If you had US income, it goes with your Form 1040-NR.
More free tools
F-1 student tax calculator
Federal, state and FICA tax on campus, CPT and OPT pay, with your treaty applied.
Estimate your tax$75,000 on OPT, Texas$63,788 take-homeFree toolOPT tax calculator
What you keep from an OPT or STEM OPT salary as a nonresident alien.
Check your OPT payJ-1 scholar2 exempt yearsFree toolJ-1 tax calculator
J-1 students, researchers and scholars: exempt years, FICA and treaties.
Estimate J-1 tax$120,000 on H-1B, Washington$92,281 take-homeFree toolH-1B tax calculator
Take-home pay on H-1B, including a change from F-1 during the year.
Estimate H-1B payH-4 EADFICA from day oneFree toolH-4 EAD tax calculator
Your pay on an H-4 EAD, alone or with your spouse's on a joint return.
Estimate H-4 payFiled alone, no incomeDue June 15, 2027Free toolForm 8843 checker
Whether you file Form 8843, which parts, by when and where it goes.
Check Form 8843File as a Nonresident, Free
F1TaxReturn counts your exempt years from your travel dates and prepares Form 1040-NR and Form 8843. The federal return is free.