Private by design: your dates never leave your browser Rules checked 8 November 2026 · How we calculate

Substantial Presence Test Calculator

Find out if you count as a US resident for tax purposes under the IRS 183-day weighted formula, and how many more days you can spend in the US this year before you do.

Quick answer

You are a US tax resident under the substantial presence test if you were in the US on at least 31 days this year, and this year's days plus 1/3 of last year's plus 1/6 of the year before's add up to 183 or more.

Private calculation · runs in your browser, nothing is uploaded Rules checked 8 November 2026 How we calculate

Your details

Defaults to the current year.
Where do the day counts come from?

Your results

Your dates are saved only in this browser. Nothing is sent to us.

How does the substantial presence test work?

If you are not a US citizen or green card holder, the IRS treats you as a resident for tax purposes for a calendar year if you pass the substantial presence test. You pass if both of these are true:

  1. You were physically present in the US on at least 31 days during the current year, and
  2. The following adds up to 183 days or more:
    • all the days you were present in the current year, plus
    • 1/3 of the days you were present in the year before, plus
    • 1/6 of the days you were present in the year before that.

Example: 120 days in each of 2024, 2025 and 2026 gives 120 + 40 + 20 = 180 for 2026. That is under 183, so you do not meet the test. Three more days in 2026 would tip you over.

Worked example

You spent 120 days in the US in 2024, 120 in 2025 and 150 in 2026. The weighted total for 2026 is 150 + 120 ÷ 3 + 120 ÷ 6 = 150 + 40 + 20 = 210, so you meet the test for 2026.

With the same two earlier years but only 100 days in 2026, the total is 160 and you don't meet it. You would meet it on your 123rd day in the US in 2026, so you could spend 22 more days there that year.

What counts as a day of presence?

Any part of a day in the US generally counts as a full day, so arrival and departure days both count. The main exceptions are:

  • Days you regularly commute to work in the US from Canada or Mexico.
  • Days in transit between two foreign points when you are in the US for less than 24 hours.
  • Days as a crew member of a foreign vessel.
  • Days you could not leave because of a medical condition that arose while you were in the US.
  • Days as an exempt individual. This includes many F, J, M and Q students (usually for their first 5 calendar years), J and Q teachers or trainees (usually 2 of the last 6 years), and certain foreign government-related people.

If some of your days are excluded, type in the adjusted counts by choosing "I will type them in".

Visa holders can download up to 10 years of arrivals and departures from the I-94 website: see how to get your travel history. Visiting on ESTA? See how long you can stay on ESTA. Canadian snowbirds can use the snowbird calculator, which also covers Form 8840 and provincial health limits.

Can you meet the test and still be a non-resident?

Yes, in some cases:

  • Closer connection exception: if you were in the US for fewer than 183 days this year, had a tax home in another country, and had a closer connection to that country, you may be able to claim non-resident status on Form 8840.
  • Tax treaties: many income tax treaties have "tie-breaker" rules that can make you a resident of the other country for treaty purposes.
Tax residency affects which income is taxed and which forms you file. Because the rules have many exceptions, use this calculator as a first check and confirm with a tax professional.

Frequently asked questions

What is the 183-day rule for US taxes?
It is the substantial presence test: you are a US tax resident if you were in the US at least 31 days this year, and this year's days plus 1/3 of last year's plus 1/6 of the year before's add up to 183 or more.
Do arrival and departure days count?
Generally yes. Any part of a day spent in the US counts as a day of presence, with a few exceptions such as short transits and regular commuting from Canada or Mexico.
Does the test apply to green card holders?
No. Green card holders are US tax residents under the separate green card test, whatever the number of days.
Do F-1 students count their days?
Usually not for their first five calendar years in the US, because they are exempt individuals. After that, their days count.

Official sources

Add this calculator to your website

Run an immigration, relocation or expat site? Embed this calculator for free. It resizes automatically, works on mobile, and your visitors' dates stay in their own browser.