183-day test · any visa · 2026
How Many Days Were You in the US?
Enter each stay in the US. We count the days in each year, the way the IRS does, and run the substantial presence test for F-1, J-1, H-1B, H-4 or any other visa.
Example: a student with a summer at home
You do not meet the 183-day test for 2026
0 days counted- 2026: 365 days in the US, exempt, so counted as 00
- 2025: 284 days in the US, exempt, so counted as 00
- 2024: 139 days in the US, exempt, so counted as 00
- Counted toward 1830
2026 is one of your exempt years, so its days count as 0 and you stay a nonresident alien whatever your days. File Form 8843 for it. See what goes with it.
For Form 8843 line 4a, the days you were in the US: 365 in 2026, 284 in 2025, 139 in 2024.
A stay with no departure date is counted through December 31, 2026.
Counts every calendar day you were in the US, arrival and departure days included. Not covered: commuting from Canada or Mexico, transit of under 24 hours, medical-condition days, the closer connection exception, the exception for teachers and trainees paid by a foreign employer, and the Form 8843 line 12 statement a student past five years can make. This is information, not tax advice. Checked against IRS sources on . How we research.
How do you count days in the US for taxes?
Count every day you were in the US for any part of the day, so the days you arrive and leave both count. Then add every day of 2026, a third of the days of 2025 and a sixth of the days of 2024.
At least 183 in that total, with at least 31 in 2026, makes you a resident alien for tax under the substantial presence test.
Why do students count their days differently?
F-1, J-1, M-1 and Q-1 students leave out their days for five calendar years. J-1 or Q-1 researchers and teachers generally cannot leave them out if they already did in any part of 2 of the 6 years before, so in practice they get two. Those days count as none, in every year of the formula. To check your exempt years, use the resident alien checker.
Sources
- IRS: Substantial presence test
- Publication 519, U.S. Tax Guide for Aliens, chapter 1
- Internal Revenue Code section 7701(b)(3) and (7)
01Do the days I arrive and leave count as days in the US?
Yes. Any part of a day in the US counts as a full day. So the day you land and the day you fly out both count. A stop of less than 24 hours while travelling between two places outside the US does not.
02How is the 183-day test counted?
Every day of 2026, a third of the days of 2025 and a sixth of the days of 2024. You meet the test with at least 31 days in 2026 and at least 183 in that weighted total. Someone in the US every day of 2026 whose days are not exempt reaches 183 on July 2.
03Which days are left out of the count?
Days as an exempt individual, such as an F, J, M or Q student in their exempt years, and a few others. The others are regular commuting to work from Canada or Mexico, less than 24 hours in the US between two foreign places, days as crew of a foreign vessel, days you could not leave because of a medical condition that arose in the US, and days as a NATO force member.
04Do days on an H-1B or H-4 visa count?
Yes. H-1B, H-4, L-1, O-1, TN and visitor visas give no exempt years, so every day counts from the first one.
05What do I need to leave a student's days out?
Form 8843 for the year. Attach it to your Form 1040-NR, or mail it alone if you have no return to file. Its line 4a asks for your days in the US in the year and the two before it, which this calculator counts.
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 taxChina, $20,000 student pay, Illinois$818 savedFree toolTax treaty savings calculator
Your tax with your country's treaty and without it, federal and state, side by side.
See your treaty$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 payPaid every two weeks+$619.20 a paycheckFree toolNonresident withholding helper
What your employer adds to each paycheck before withholding, and how to fill in Form W-4.
Check your paycheckYour Days, Counted for You
For F-1, J-1, M-1 and Q students, F1TaxReturn counts your days from your trips and fills them in on Form 8843 and Form 1040-NR. The federal return is free, once the final 2026 forms are published. It does not yet take Form 1042-S.