Substantial presence test calculator (IRS 183-day test)

Enter your days in the United States for three years, or your travel dates, and see the weighted total and how many days reach the figures.

Short answer

The IRS substantial presence test is met with at least 31 days in the United States in the current year and 183 days over three years, counting all current-year days, one third of the days in the year before and one sixth of the days two years before. Exceptions, the closer connection exception and treaties can change the outcome.

Stays on your device. Dates are kept in this tab only. Nothing is saved, sent or put in the address bar.

Rule checked November 8, 2026. The counting rule and its official source are explained below the calculator.

Arithmetic only. It counts days. It does not decide your status, apply exceptions or replace the authority's own count.

Loadingโ€ฆ

How the substantial presence test works

The IRS uses the substantial presence test to decide whether a person who is not a US citizen or green card holder is a US resident for tax purposes for a calendar year. Both of these must be true (IRS, Substantial presence test):

  • At least 31 days in the United States during the current year, and
  • 183 days during the three-year period made up of the current year and the two years before it, counting all days in the current year, 1/3 of the days in the year before, and 1/6 of the days in the year before that.

Any part of a day in the United States counts as a day of presence. The fractions are not rounded in this calculator.

Fictional example
YearDays presentMultiplierDays counted
Current year120All120
First year before1201/340
Second year before1201/620
Total180, under 183

Days that do not count

The IRS lists days that are not counted, including days you regularly commute to work from a home in Canada or Mexico, days in the United States for less than 24 hours in transit between two places outside the country, days as a crew member of a foreign vessel, days you cannot leave because of a medical condition that arose while you were there, and days as an exempt individual. Exempt individual refers to certain visa categories, such as some teachers, trainees and students, not to people exempt from tax. Remove these days before you enter your counts.

What can change the result

Questions people ask

What is the substantial presence test?

It is the IRS test for whether a person who is not a US citizen or green card holder is a US resident for tax purposes. You meet it with at least 31 days in the US in the current year and 183 days over three years, counting all current-year days, one third of last year's days and one sixth of the days the year before.

Does a partial day in the US count for the substantial presence test?

Yes. The IRS treats you as present on any day you are physically in the United States at any time during the day, with listed exceptions such as transit of less than 24 hours between two foreign points.

How many days can I spend in the US without becoming a tax resident?

There is no single number, because the test weights three years. With no days in the two prior years, 182 days in the current year stays under 183. With 120 days in each prior year, the weighted total reaches 183 at 123 current-year days. Exceptions and treaties can also change the result.

Do F-1 or J-1 student days count?

Days as an exempt individual, which includes many students on F, J, M or Q visas within set limits, are not counted. A qualified US tax professional can confirm whether your days are exempt.

Is the 183-day figure the same as other countries' 183-day rules?

No. Other countries count 183 days in their own way, and the US figure is a weighted three-year total. See the 183-day rule guide.

What is the closer connection exception?

It can let a person who meets the test be treated as a nonresident if they were in the US fewer than 183 days in the current year, kept a tax home in a foreign country and had a closer connection to that country. It is claimed on Form 8840.

Related

Countries covered
See the rule above
Sources
Official source linked in the text
Tax year
Current rule as checked
Review
Not professionally reviewed
Sources checked November 8, 2026