
The substantial presence test
You're a US tax resident under the substantial presence test if you were in the US on at least 31 days this year and 183 weighted days over three years: all of this year's days, a third of last year's and a sixth of the year before's. Any part of a day counts.
This explains the rule as the IRS describes it. It isn't tax advice: a tax adviser can tell you what your count means for you.
The test in two lines
You meet the substantial presence test for a calendar year if you were physically in the US on:
- at least 31 days in the current year, and
- at least 183 days over three years, counting all of this year's days, a third of last year's and a sixth of the year before's.
If you meet it, you're treated as a US resident for tax for that year, unless an exception applies.
How to count, step by step
- Count every day you were in the US this year. Any part of a day counts as a day.
- If that's fewer than 31, stop. You don't meet the test this year.
- Count last year's days and divide by 3.
- Count the year before's days and divide by 6.
- Add the three numbers. 183 or more means you meet the test.
Leave out the days in the list below before you add them up. The 183-day calculator does the weighting for you: pick the United States and add your stays.
Worked examples
1. The same 120 days every year
This is the IRS's own example. 120 days in each of 2023, 2024 and 2025. For 2025: 120 + 40 (a third of 120) + 20 (a sixth of 120) = 180. That's under 183, so you don't meet the test for 2025.
2. Three more days tips it over
Change 2025 to 123 days and keep the other two years at 120: 123 + 40 + 20 = 183. Now you meet it. A long weekend can be the difference.
3. A long year, then a short one
300 days in 2024, then 30 days in 2025. For 2025 you're under 31 days this year, so you don't meet the test, however many days you had last year.
4. A steady 4 months a year
122 days every year: 122 + 40.67 + 20.33 = 183. That's exactly the line, so about four months a year, year after year, is where the test starts to bite.
Days that don't count
- Days you commute to work in the US from a home in Canada or Mexico, if you commute regularly.
- Days you're in the US for less than 24 hours while in transit between two places outside the US.
- Days you're in the US as a crew member of a foreign vessel.
- Days you can't leave because of a medical condition that started while you were in the US.
- Days you're an exempt individual: foreign government staff on an A or G visa (not A-3 or G-5), teachers and trainees on a J or Q visa, students on an F, J, M or Q visa who substantially comply with it, and professional athletes at a charitable sports event.
To leave out exempt or medical days, you file Form 8843 with your tax return, or on its own by the return's due date if you don't file one. Miss it and you generally can't exclude those days.
"The US" here means the 50 states, the District of Columbia and US territorial waters. US territories such as Puerto Rico and Guam, and US airspace, don't count.
Met the test? You may still be a nonresident
- The closer connection exception. If you were in the US fewer than 183 days this year, kept your tax home in another country and have a closer connection to it, you can be treated as a nonresident. It's claimed on Form 8840.
- A tax treaty. If you're also resident in a treaty country, the treaty's tie-breaker rules can settle where you're resident.
Where the day count comes from
You need a day-by-day record of when you were in the US, for three years. If you're on a visa, the I-94 travel history gives your arrival and departure dates. Google Maps Timeline, if you kept it, has the rest: open the export in the Google Timeline viewer to see your days per country.
Questions
Does a partial day count?
Yes. Being in the US at any time during a day counts as a full day of presence, unless one of the exceptions applies.
Is the substantial presence test the same as 183 days in a year?
No. It adds days from three years with weights: all of this year's days, a third of last year's and a sixth of the year before's. You also need at least 31 days in the current year.
Do days in transit count?
Not if you were in the US for less than 24 hours while travelling between two places outside the US.
Do days on an F-1 or J-1 visa count?
Usually not. Students and some teachers and trainees are exempt individuals while they substantially comply with their visa, and file Form 8843 to exclude those days.
Do Puerto Rico or Guam count as the US?
No. For this test the US is the 50 states, the District of Columbia and US territorial waters. US territories and US airspace aren't included.
I met the test. Am I definitely a resident?
Not always. The closer connection exception or a tax treaty can still treat you as a nonresident. Check with a tax adviser.
Know your US days before the IRS does
Globekeep counts your days in every country from your photos and location, and tells you before you reach the line.
- Trips from your photosPast trips too, from photos and Google Maps Timeline
- Flights from your inboxBooking emails become flights and stays
- Days in every countrySchengen and 183-day counts, with a warning first
- Private by designYour photos never leave your phone
Only launch news. Unsubscribe any time.


