Substantial Presence Test Calculator
You are a U.S. resident for tax purposes if you were in the U.S. at least 31 days this year and 183 days over three years — counting all days this year, 1/3 of last year's and 1/6 of the year before. Enter your days to see whether you meet the test and how many more days you can spend this year.
The calculator needs JavaScript.
How the test is counted
You meet the substantial presence test for a calendar year if you were physically in the United States on:
- at least 31 days during that year, and
- 183 days during the three-year period: all the days in that year, plus 1/3 of the days in the year before, plus 1/6 of the days two years before.
Example: 120 days in 2026, 150 in 2025 and 90 in 2024 give 120 + 50 + 15 = 185 — the test is met for 2026. With 100 days in 2026 instead, the total is 165 and it isn't.
Days that don't count
- Regular commuting to work in the U.S. from Canada or Mexico.
- Transit: less than 24 hours in the U.S. while travelling between two other countries.
- Crew of a foreign vessel, and days you couldn't leave because of a medical condition that arose in the U.S.
- Exempt individuals: foreign government officials, and students, teachers and trainees on F, J, M or Q visas within their time limits (for students usually 5 calendar years). They file Form 8843.
Meeting the test isn't always the end
Closer connection exception. If you were in the U.S. fewer than 183 days in the year itself, kept a tax home in another country for the whole year and had a closer connection to it, you can be treated as a nonresident by filing Form 8840 — this is the usual route for Canadian snowbirds. It isn't available if you took steps toward a green card that year. Tax treaties can also decide residency for people who are resident in two countries.
Questions
Does any part of a day count?
Yes. Being in the U.S. at any time during a day counts as a full day, apart from the exceptions above.
Does the substantial presence test apply to F-1 students?
Usually not at first: as an F-1 student you are an exempt individual for days in any part of 5 calendar years, so those days don't count. After that, the days count like anyone else's.
Does it apply to U.S. citizens or green card holders?
No. U.S. citizens are taxed as citizens, and green card holders are residents under the green card test regardless of days.
Is this the same as a state's 183-day rule?
No. The substantial presence test is federal. States have their own residency rules — some count 183 days, some look at where your home is.
What if I meet the test for only part of the year?
Your residency usually starts on the first day you were in the U.S. that year; a dual-status year has its own filing rules. This is a question for a tax professional.
Where do I find my days?
The I-94 travel history on the CBP website lists your recent entries and exits. Daysafe records the days automatically on your iPhone.
Let your iPhone count the days
Daysafe records which country and U.S. state you're in each day and keeps the substantial presence count up to date — this year, last year and the year before. No account; your days stay on your phone.
Get Daysafe on the App Store · How it works · Schengen calculator
Sources
IRS, Substantial Presence Test; Publication 519; Form 8840 and Form 8843. Checked on 13 October 2026. Daysafe is a day counter, not tax advice. Made by Denis Chudinov.