Tax days

Substantial presence test calculator

The test’s day count is met if you were in the US at least 31 days this year and 183 days over three years, counting every day this year, a third of last year’s and a sixth of the year before’s.

Last checked 3 Nov 2026 against the official sources below.

Days in the US

Any part of a day counts. Leave out days the IRS excludes (see below).

Weighted days

0

of 183

    Not legal or tax advice.

    The formula

    For a calendar year, you meet the substantial presence test if you were physically present in the US on at least:

    • 31 days during that year, and
    • 183 days over the 3-year period, counting all the days that year, 1/3 of the days the year before, and 1/6 of the days the year before that.

    The IRS’s own example: 120 days in each of 2023, 2024 and 2025 gives 120 + 40 + 20 = 180 for 2025, which is under 183.

    Days that don’t count

    • Days you commute to work in the US from a home in Canada or Mexico, if you regularly commute.
    • Days you are in the US for less than 24 hours, in transit between two places outside the US.
    • Days you are in the US as a crew member of a foreign vessel.
    • Days you can’t leave because of a medical condition that develops while you are in the US.
    • Days you are an exempt individual (for example some students, teachers and diplomats).

    Even if you meet the day count, exceptions such as the closer connection exception may apply. This calculator does the day maths only. For other countries, use the 183-day calculator.

    Questions

    How is the substantial presence test calculated?

    Add all the days you were in the US this year, a third of the days last year and a sixth of the days the year before. If you were there at least 31 days this year and the total is 183 or more, you meet the test’s day count.

    Does a part day count?

    Yes. The IRS counts a day if you were physically present in the US at any time during that day.

    Are fractions rounded?

    This calculator does not round. In the IRS example, 120 days in each of three years gives 120 + 40 + 20 = 180, which is under 183.

    Which days don’t count?

    Among others: days you regularly commute from Canada or Mexico, transit of less than 24 hours between two places outside the US, days as a crew member of a foreign vessel, days you could not leave because of a medical condition that arose in the US, and days as an exempt individual.

    Sources

    Last checked 3 Nov 2026.

    Not legal or tax advice.