How the Substantial Presence Test works
The test is set by 26 U.S.C. § 7701(b)(3) and explained by the IRS in two conditions. You must be physically present in the US 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.
The 31-day floor stops prior-year days from making you resident in a year you barely visited. The weighting means a regular visitor can spend about four months a year in the US indefinitely, but not much more.
If you meet the test you are a resident alien for the year: generally taxed on worldwide income and filing Form 1040 rather than 1040-NR. If you hold a green card you are resident under the separate green card test whatever your days.
Days that do not count
The IRS lists four kinds of day you leave out of the count:
- Days you commute to work in the US from a residence in Canada or Mexico.
- 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 cannot leave because of a medical condition that developed while you were in the US.
Days as an exempt individual are also left out: foreign government-related individuals on A or G visas (not A-3 or G-5), teachers and trainees on J or Q visas (not if you were exempt as a teacher, trainee or student for any part of 2 of the 6 preceding calendar years, with a narrow exception when a foreign employer pays all your compensation), students on F, J, M or Q visas (exempt status is lost after more than 5 calendar years, unless you show you do not intend to live in the US permanently), and professional athletes temporarily in the US for a charitable sports event. You claim exempt days and medical days on Form 8843.
The closer connection exception (Form 8840)
Meeting the test is not always the end. If you were in the US fewer than 183 days this year, you can still be treated as a nonresident if you:
- kept a tax home in one foreign country for the whole year,
- had a closer connection to that country than to the US, and
- did not apply for, or have pending, lawful permanent resident status.
If you do not timely file Form 8840, Closer Connection Exception Statement for Aliens, you cannot claim the closer connection exception to the substantial presence test.
This is the route most Canadian and European snowbirds rely on. It only works while your actual days this year stay under 183, so the count still matters.
Worked examples
| Situation | Calculation | Result |
|---|---|---|
| 120 days in each of 2024, 2025 and 2026 | 120 + 120/3 + 120/6 = 120 + 40 + 20 = 180 | Does not meet the test (under 183) |
| 122 days in each of 2024, 2025 and 2026 | 122 + 40.67 + 20.33 = 183 | Meets the test |
| 150 days in 2026, 90 in 2025, 60 in 2024 | 150 + 30 + 10 = 190 | Meets the test, but under 183 actual days in 2026, so Form 8840 may keep you nonresident |
| 25 days in 2026, 300 in 2025 | Fails the 31-day floor for 2026 | Does not meet the test for 2026 |
How days are counted
For the Substantial Presence Test you are present on any day you are in the US at any time during the day. A morning arrival, a day trip across the border from Canada for shopping or a late-night departure all count as a full day. Other rules count very differently, which is why the same trip can be one day for the IRS and zero days somewhere else:
| Rule | What counts as a day |
|---|---|
| US Substantial Presence Test | Any part of a day in the US counts as a full day. (IRS, Substantial Presence Test) |
| US state 183-day rules (most states) | Varies by state. New York counts any part of a day; Pennsylvania counts a day as outside the state only if it is a full day, midnight to midnight; Ohio counts contact periods; many states publish no partial-day rule. (Each state's statute (see the state guide)) |
| FEIE physical presence test | Only full 24-hour days abroad, midnight to midnight, count. (IRS, Physical Presence Test) |
| UK Statutory Residence Test | A day counts if you are in the UK at midnight, subject to the transit exception and the deeming rule. (HMRC, RFIG20710) |
| Schengen 90/180 | The day you enter and the day you leave both count as days of stay. (Schengen Borders Code, Art. 6(1) and 6(2)) |
Guides and tools for US tax residency
- US Substantial Presence Test explained (full guide)
- Canadian snowbirds: the 30-day registration and the SPT
- US ESTA: 90-day visitor stays
- US B1/B2 visitor visa
- FEIE Physical Presence Test Calculator
- 183-Day Rule Calculator for US states
- International tax residency: how it works
- UK Statutory Residence Test Calculator
Frequently asked questions
- What is the Substantial Presence Test?
- It is the IRS day-count test that decides whether a non-citizen without a green card is a US resident for federal income tax. You meet it if you were in the US at least 31 days this year and at least 183 days over three years, counting all of this year's days, one third of last year's and one sixth of the year before's.
- How is the Substantial Presence Test calculated?
- Add your US days this year, plus one third of your US days last year, plus one sixth of your US days the year before. If that weighted total is 183 or more and this year's days are at least 31, you meet the test. Exempt days are left out before you add anything up.
- Do arrival and departure days count?
- Yes. The IRS treats you as present in the US on any day you are physically in the country at any time during the day, so the day you land and the day you fly out are both full days. The exceptions are narrow: commuting from Canada or Mexico, transit of less than 24 hours between two foreign places, foreign vessel crew, and a medical condition that arose in the US.
- Is 120 days a year in the US safe?
- Only just. 120 days every year gives 120 + 40 + 20 = 180, three days under the line. At 122 days a year the total reaches 183 and you meet the test, so one extra long weekend each year is enough to tip it.
- Who is an exempt individual?
- People whose days do not count while they hold the status: foreign government-related individuals on A or G visas (not A-3 or G-5), teachers and trainees on J or Q visas, students on F, J, M or Q visas, and professional athletes competing in a charitable sports event. Students are limited to 5 calendar years. Exempt individuals file Form 8843.
- What is Form 8840 and the closer connection exception?
- If you meet the test but were in the US fewer than 183 days this year, kept a tax home in one foreign country all year and had a closer connection to that country than to the US, you can stay a nonresident by filing Form 8840. If you do not file it on time you generally lose the exception. It is not available if you applied for a green card.
- Does the Substantial Presence Test apply to green card holders?
- No. A green card holder is a US tax resident under the separate green card test for any year they hold lawful permanent resident status, whatever their day count. The Substantial Presence Test is for everyone else who is not a US citizen.
- Can a tax treaty override the test?
- Sometimes. If you are a resident of both the US and a treaty country, the treaty's tie-breaker rules (permanent home, centre of vital interests, habitual abode, nationality) may treat you as a resident of the other country only. Claiming it has its own filing requirements, so take advice from an international tax professional.
- Is there an app that tracks the Substantial Presence Test?
- Yes. iReside counts your US days automatically from your phone's location and keeps the weighted three-year total live, with an alert before you reach 183. It is a record of where you were, not tax advice.
