Guide
The US substantial presence test, with the IRS example
Last updated . Published by Certloom Learning. Written from the official sources listed on this page; every worked example is computed by the Staymark rule engine.
Rules checked . Worked examples computed by the Staymark rule engine.
You meet the substantial presence test for a calendar year if you were in the United States on at least 31 days that year and on at least 183 days over 3 years, counting all days this year, one third of the days last year and one sixth of the days the year before.
What does the test decide?
The test is a tax rule. If you meet it and no exception applies, the IRS generally treats you as a US resident for tax purposes for that year. It does not decide how long you may stay as a visitor. Your immigration status and the terms of your admission set that.
How is the test calculated?
Both conditions must be true:
- At least 31 days in the US during the current year.
- At least 183 days when you add: all days in the current year, plus 1/3 of the days in the year before, plus 1/6 of the days in the year before that.
A day counts if you were physically in the US at any time during it. Arrival and departure days count.
Calendar years and short visits
The test works on calendar years, January to December. Each January the oldest year drops out and the weights move along: last year's days fall from full weight to one third, and the year before falls to one sixth. Short visits add up the same way as long stays. A drive across the border for an afternoon is a US day unless an exception applies, such as regular commuting to work from Canada or Mexico. Keep every visit in your records.
The IRS example
The IRS page gives this example: you were in the US on 120 days in each of three years. For the third year you count 120 days, plus 40 (one third of 120), plus 20 (one sixth of 120). The total is 180, which is under 183, so you do not meet the test for that year.
Staymark's engine gives the same answer. With 120 days in each of 2024, 2025 and 2026, the weighted total for 2026 is 180 and the test is not met.
| Year | Days in the US | Weight | Counted |
|---|---|---|---|
| 2026 | 120 | 1 | 120 |
| 2025 | 120 | 1/3 | 40 |
| 2024 | 120 | 1/6 | 20 |
| Total | 180 |
How many days can a snowbird spend in the US?
A Canadian spent 120 days in the US in both 2024 and 2025. Planning on , the most days they can spend in the US in 2026 and stay under the test is 122. At 122 days the total is 122 + 40 + 20 = 182. One more day makes 183.
They plan to stay from to . The trip check stamps that plan Breaks. The latest safe date to be in the US on that trip is . Still being there on 3 May 2026 would meet the test.
Which days and people are excluded?
Some days do not count, and some people do not count days at all. The IRS lists, among others:
- regular commuters from Canada or Mexico;
- days in transit between two places outside the US, if you are in the US for less than 24 hours;
- crew members of foreign vessels;
- days you could not leave because of a medical condition that arose while you were in the US;
- exempt individuals, such as some students, teachers, trainees and foreign government-related individuals.
Even if you meet the test, the closer connection exception or a tax treaty may let you be treated as a nonresident. These depend on your facts and on forms you file. Staymark does not compute any exception. It counts every day you enter as a US day, so its number is the cautious one.
Official sources
- IRS: Substantial presence test. Checked .
- IRS Publication 519, U.S. Tax Guide for Aliens. Checked .
This guide is general information. It is not tax advice and Staymark is not affiliated with the IRS or any government.
Related
- Schengen 90/180 calculator. Count your days and test a planned trip in your browser.
- The Schengen 90/180 rule. How the rolling 180-day window works, with dates.
- UK ILR 180-day absence rule. Whole days only, in any 12 months.
- Canada PR 730-day rule. The residency obligation and the 5-year window.
- Canadian citizenship 1,095 days. Physical presence, half days before PR.
- UK statutory residence test. How HMRC counts UK days, and the day and ties tables that decide residence.
- UK residence test vs ILR absences. One trip, two counts: midnight days in the UK against whole days out.
- How to count arrival and departure days. Entry and exit days under each rule, side by side.
- Day limits compared. Schengen, UK, Canada, US and provincial health rules in one table.
- Canada PR 730 days vs citizenship 1,095. Why meeting one does not mean meeting the other.
- Snowbird day limits. The three day counts a Canadian winter in the US touches.
- Provincial health coverage and days away. Ontario, British Columbia and Alberta, from the official pages.
- Form 8840 closer connection exception. When it applies and what happens if you do not file.
- US state residency day counts. Domicile versus days, with New York and Florida as examples.
- Digital nomad day tracking. Which counts run at the same time and how to keep one calendar for all.
- The 183-day rule: days per country. Part days vs midnights, and a year of trips counted per country.
- Country days tracker apps compared. How trips get in, which rules each app counts, and how they charge.