Calculator
Count any part of a day as a day. Leave out days as an exempt individual (students on F, J, M or Q visas, teachers and trainees on J or Q, diplomats), days commuting from Canada or Mexico, transit days under 24 hours and days you could not leave because of a medical condition that arose in the US.
Weighted days
180of 183
120 days this year + 40.00 (one third of last year) + 20.00 (one sixth of the year before).
You do not meet the substantial presence test for 2026.
Most days you can spend in the US in 2026 without meeting the test, given your earlier years: 122.
Saved in this browser only.
How the test works
Non-citizens without a green card are US residents for tax purposes when their physical presence is substantial. The test has two conditions, both of which must be met: at least 31 days in the United States in the current calendar year, and at least 183 days over a three-year window counted with weights. Every day this year counts in full, every day last year counts as one third, and every day in the year before that counts as one sixth.
The weighting is what surprises regular visitors. Someone who spends four months in the US every year never reaches 183 actual days, but 122 days a year gives 122 plus 40.67 plus 20.33, which is 183 exactly, and meets the test. Three months a year, around 90 days, stays comfortably below it.
Days that do not count
- Days as an exempt individual: students on F, J, M or Q visas for five calendar years, teachers and trainees on J or Q visas, diplomats and their families, and athletes at charity events.
- Days commuting to work from a home in Canada or Mexico on a regular basis.
- Days in transit between two foreign points when you are in the US for under 24 hours.
- Days as a crew member of a foreign vessel.
- Days you intended to leave but could not because of a medical condition that arose while you were in the US.
Enter your counts after removing these days. Exempt individuals must file Form 8843 even if they have no income.
The closer connection exception
Meeting the test is not always the end. If you were in the US for fewer than 183 days this year, had a tax home in another country throughout the year and can show a closer connection to that country through your permanent home, family, belongings, voting, driving licence and the like, you can file Form 8840 and be treated as a non-resident. The form is due with the return, and missing the deadline usually forfeits the exception. It is not available to anyone who has applied for permanent residence.
A worked example
A UK consultant spent 150 days in the US in each of the last three years. Weighted, that is 150 plus 50 plus 25, which is 225, so he meets the test. Because he spent fewer than 183 days this year and his tax home is in London, he can claim the closer connection exception on Form 8840. Had he spent 190 days this year, the exception would be closed and only a treaty tie-breaker could help.
What residence means
A resident alien files Form 1040 and is taxed on worldwide income, must report foreign accounts above the FBAR threshold, and may have to report foreign assets under FATCA. Residence under the test starts on the first day of presence in the year it is met, with a limited exception for up to ten days of early presence. Dual residents can use the treaty tie-breaker on Form 8833 to be treated as resident only in the other country for treaty purposes.
Methodology
The weighted total is current-year days plus one third of prior-year days plus one sixth of second-prior-year days, shown to two decimals and compared with 183 without rounding. The maximum safe days figure is the largest whole number of current-year days that keeps the weighted total below 183, floored at 30 because 30 or fewer days can never meet the test. The closer connection flag applies only when the test is met, current-year days are below 183 and you confirm a foreign tax home and closer connection. The tool does not model exempt-individual year limits, first-year elections or treaty positions.
Frequently asked questions
What is the substantial presence test?
The day-count rule that makes a non-citizen a US resident for income tax purposes. You meet it if you were in the US at least 31 days in the current year and at least 183 weighted days over three years: all of this year, a third of last year and a sixth of the year before.
Does any part of a day count?
Yes. Being physically present at any time during a day counts as a full day, unlike the UK midnight rule. Exceptions exist for transit under 24 hours, regular commuters from Canada or Mexico, crew members, and days you could not leave because of a medical condition that arose in the US.
Who is an exempt individual?
Students on F, J, M or Q visas for their first five calendar years, teachers and trainees on J or Q visas for two of the last six years, foreign government employees on A or G visas, and professional athletes competing in charity events. Their days are not counted, and they must file Form 8843 to claim it.
What is the closer connection exception?
If you meet the test but spent fewer than 183 days in the US this year, kept a tax home in another country all year and have a closer connection to that country, you can be treated as a non-resident by filing Form 8840 on time. It is not available if you have applied for a green card.
I meet the test. What does that mean?
You are a resident alien and file Form 1040 on worldwide income, with foreign bank account reporting and other obligations. A tax treaty tie-breaker can override this for dual residents, claimed on Form 8833.
Does this affect my visa?
No. Tax residence and immigration status are separate. Visitors on ESTA can become tax residents through the day count alone, which is why frequent visitors track both.
Sources
- Substantial presence test, Internal Revenue Service. Checked 6 Oct 2026.
- Closer connection exception to the substantial presence test, Internal Revenue Service. Checked 6 Oct 2026.
- Publication 519, U.S. Tax Guide for Aliens, Internal Revenue Service. Checked 6 Oct 2026.
- Exempt individual: who is a student, Internal Revenue Service. Checked 6 Oct 2026.
Change log
First release with the weighted formula, closer connection check and maximum safe days for the current year.