Dayproven

Substantial presence test: how to count your days

The substantial presence test is the IRS's day count for deciding whether a person is treated as a US resident for tax purposes. It has two parts: at least 31 days in the United States in the current year, and at least 183 days over three years, where last year's days count for one third and the year before's for one sixth.

The rule

The IRS states the test like this:

You will be considered a United States resident for tax purposes if you meet the substantial presence test for the calendar year. To meet this test, you must be physically present in the United States (U.S.) on at least:

31 days during the current year, and

183 days during the 3-year period that includes the current year and the 2 years immediately before that, counting:

All the days you were present in the current year, and

1/3 of the days you were present in the first year before the current year, and

1/6 of the days you were present in the second year before the current year.

Source: IRS, Substantial presence test

Both conditions are needed: the page joins them with "and".

What counts as a day

You are treated as present in the U.S. on any day you are physically present in the country, at any time during the day.

Source: IRS, Substantial presence test

So landing late one evening and leaving early the next morning is two days of presence, unless one of the exclusions below applies (such as transit of less than 24 hours between two places outside the US). The IRS lists days that you do not count:

Do not count the following as days of presence in the U.S. for the substantial presence test:

Days you commute to work in the U.S. from a residence in Canada or Mexico if you regularly commute from Canada or Mexico.

Days you are in the U.S. for less than 24 hours, when you are in transit between two places outside the United States.

Days you are in the U.S. as a crew member of a foreign vessel.

Days you are unable to leave the U.S. because of a medical condition that develops while you are in the United States.

Days you are an exempt individual (see below).

Source: IRS, Substantial presence test

"Exempt individual" covers these groups:

An individual temporarily present in the U.S. as a foreign government-related individual under an “A” or “G” visa, other than individuals holding “A-3” or “G-5” class visas.

A teacher or trainee temporarily present in the U.S. under a "J" or "Q" visa, who substantially complies with the requirements of the visa.

A student temporarily present in the U.S. under an "F," "J," "M," or "Q" visa, who substantially complies with the requirements of the visa.

A professional athlete temporarily in the U.S. to compete in a charitable sports event.

Source: IRS, Substantial presence test

The IRS also says what the United States is for this test:

The term United States (U.S.) includes the following areas:

All 50 states and the District of Columbia.

The territorial waters of the United States.

The seabed and subsoil of those submarine areas that are adjacent to U.S. territorial waters and over which the United States has exclusive rights under international law to explore and exploit natural resources.

The term does not include U.S. territories or U.S. airspace.

Source: IRS, Substantial presence test

The IRS refers readers to Publication 519 for details on days excluded for people who are not exempt individuals.

Worked example

The IRS gives this example on the same page:

You were physically present in the U.S. on 120 days in each of the years 2023, 2024 and 2025. To determine if you meet the substantial presence test for 2025, count the full 120 days of presence in 2025, 40 days in 2024 (1/3 of 120), and 20 days in 2023 (1/6 of 120). Since the total for the 3-year period is 180 days, you are not considered a resident under the substantial presence test for 2025.

Source: IRS, Substantial presence test

YearDays presentWeightDays counted
2025 (current year)1201120
2024 (first year before)1201/3120 ÷ 3 = 40
2023 (second year before)1201/6120 ÷ 6 = 20
Total120 + 40 + 20 = 180, below 183

The same sum with other days, as an illustration (these figures are ours, not the IRS's; the method is the IRS's):

CaseDays present in the current year, year before, year before thatArithmeticResult of each count
A150, 90, 60150 + 90 ÷ 3 + 60 ÷ 6 = 150 + 30 + 10 = 190150 is at least 31; 190 is at least 183. Both counts reach their thresholds.
B30, 365, 36530 + 365 ÷ 3 + 365 ÷ 6 = 30 + 121.67 + 60.83 = 212.5212.5 is at least 183, but 30 is below 31. The first condition is not reached.

Case B shows why the 31-day condition is checked separately: a large weighted total does not replace it. The IRS page sets no rounding rule for the fractions; 121.67 and 60.83 are rounded here only for display, and their exact sum is 182.5.

Common mistakes

  1. Counting only nights spent in the US. The IRS counts "any day you are physically present in the country, at any time during the day".
  2. Adding up three years of days without the weights. Only the current year counts in full. The first year before counts 1/3 and the second year before counts 1/6.
  3. Checking only the 183 total. The test needs at least 31 days in the current year as well.
  4. Counting every short stop as transit. The exclusion is for "less than 24 hours, when you are in transit between two places outside the United States". A trip that starts or ends in the US is not covered.
  5. Reading "exempt individual" as "exempt from tax". The IRS says the term "does not refer to someone exempt from U.S. tax", but to people in the listed categories.
  6. Counting days in a US territory or in US airspace. The IRS says the term United States "does not include U.S. territories or U.S. airspace".
  7. Leaving out Form 8843. The IRS says: "If you do not timely file Form 8843, you cannot exclude the days you were present in the U.S. as an exempt individual or because of a medical condition that arose while you were in the U.S." It adds an exception for people who can show, "by clear and convincing evidence", that they took reasonable actions to become aware of the filing requirements and significant steps to comply.

Counts are not a verdict

A day count is one part of the picture. The IRS says: "Even if you met the substantial presence test you can still be treated as a nonresident of the United States for U.S. tax purposes if you qualify for one of the following exceptions", and names the closer connection exception and a version available only to students. This page counts days. It does not say whether you are a US resident or owe tax, and it is not tax advice.

Dayproven is an iPhone app that applies the substantial presence test's day rule to a record kept on your phone, and shows where every day came from. It is coming to the App Store.