Enter your US days for three years and see the weighted 183-day math worked out step by step, with exempt years for students and teachers. Everything runs in your browser.
Nothing you type leaves this page or is saved. The calculation runs entirely in your browser, and a result link keeps your numbers after the #, a part of the URL the browser never sends to any server. Share it only with people you want to see them.
Substantial presence test. Calculated with zerocrew.ai/apps/flags-tax/tools/substantial-presence-test-calculator. Arithmetic only, not tax advice.
Add every US day in the current year, one third of the prior year's days, and one sixth of the days from the year before that. If the weighted total reaches 183 and you were present at least 31 days in the current year, the test is generally met, subject to IRS exceptions.
What counts as a US day?
A US day is generally any day you're physically present in the United States, but the IRS excludes certain days, for example some days for exempt individuals. Whether a day counts at all can matter as much as the arithmetic, so check the current IRS guidance.
Do F-1 student days count toward the substantial presence test?
Generally not during your first 5 calendar years in the US: as a student on an F, J, M, or Q visa you're an exempt individual, and exempt days don't count. Any part of a calendar year counts as a whole year, and the 5-year limit is a lifetime total. You still report those years on Form 8843. Select the student option in the calculator to see the effect on your numbers.
What is the closer connection exception?
It can keep you from becoming a US resident even when you meet the day count, if you were in the US fewer than 183 days in the current year and can show a tax home and closer ties to another country. You claim it on Form 8840; the IRS substantial presence test page and Publication 519 list the conditions. The calculator tells you when your numbers make it worth checking.
Does this store my data?
No. The calculator runs entirely in your browser, and nothing you type leaves the page or is saved. A result link keeps your numbers in the part of the URL after the #, which the browser never sends to a server.