Substantial Presence Test Calculator

Days that do not count for the substantial presence test

Days you are physically present in the United States count, even part of a day, unless one of these applies.

DayRule
Commuting from Canada or MexicoDays you commute to work in the United States from a residence in Canada or Mexico, if you regularly commute from there
In transitDays in the United States of less than 24 hours while traveling between two places outside the United States
Crew memberDays as a crew member of a foreign vessel
Medical conditionDays you could not leave the United States because of a medical condition that developed while you were in the United States
Exempt individualDays as an exempt individual, such as a student or teacher

Commuters

Publication 519 gives a workday test for commuters: the exclusion applies if you commute from Canada or Mexico on more than 75% of your workdays. In its example, a person was in the United States on 69 of 76 workdays, which is 90.8%, so those commuting days are not counted.

Transit

The transit exclusion does not apply if you attend a business meeting in the United States, even at an airport.

Medical conditions

You can exclude days only if you intended to leave but could not because of a condition that arose while you were in the United States. You cannot exclude days if you stayed beyond a reasonable period after becoming able to leave, if you returned for treatment of a condition from an earlier stay, or if you knew of the condition before arriving.

Form 8843

To exclude days as an exempt individual or because of a medical condition, you must file Form 8843. If you do not file it on time, you cannot exclude those days unless you show by clear and convincing evidence that you took reasonable actions to learn the filing requirements and significant steps to comply.

Updated: November 4, 2026

Back to the calculator →

Guides