The substantial presence test in 60 seconds
A person who is not a U.S. citizen is a U.S. tax resident for a calendar year if they pass either of two tests: the green card test or the substantial presence test. Pass neither and you are a nonresident alien for that year. The substantial presence test is the one that catches people who never applied for anything. It is pure arithmetic on the days you were here.
The test has two parts, and you must pass both. First, at least 31 days in the United States in the current year. Second, at least 183 days over a three-year window, using a weighted count: every day of the current year, one third of the days in the prior year, and one sixth of the days in the year before that.
The answer matters because residents are taxed on worldwide income and nonresidents generally only on U.S. income. This page walks through how to count, which days drop out, who is exempt, and the exceptions that can keep you a nonresident even when the math says otherwise. It is educational, not individualized tax advice.
Because of the weighting, someone present the same number of days every year reaches 183 weighted days only at 122 days a year (122 plus 40.67 plus 20.33). Stay at 121 days or fewer each year and you will not meet the test on presence alone. Uneven years are where people get caught, because one long year counts in full and then keeps counting for two more years at a discount.
How to count days under the substantial presence test
A day counts if you were physically in the United States at any time during that day. Arriving at 11 p.m. counts as a full day. So does the morning you fly out. There is no partial day credit.
Run the count for the year in question. For 2026, take your 2026 days in full, add one third of your 2025 days and add one sixth of your 2024 days. If 2026 has at least 31 days and the weighted total is 183 or more, you meet the test for 2026.
| Year | Days that count | Weight |
|---|---|---|
| 2026 (current year) | All days present, and at least 31 | 100% |
| 2025 (first prior year) | All days present | One third |
| 2024 (second prior year) | All days present | One sixth |
| Total needed | Weighted sum | 183 days or more |
Exclude days that do not count (next section) before applying the weights.
Two worked day counts
Both examples below are hypothetical, with round numbers, and assume none of the days fall into an excluded category.
Worked example
Example 1: steady 120 days a year
- 2026 days (counted in full)
- 120
- 2025 days: 120 times one third
- 40
- 2024 days: 120 times one sixth
- 20
- Weighted total
- 180
- Result for 2026
- Does not meet the test
This follows the IRS’s own example on its substantial presence test page. At 180 weighted days, the person is not a resident under this test for the year, even though they spent a third of every year here.
When one long year tips the count
Now suppose a consultant spends 90 days in the United States in 2024, 120 days in 2025, and takes a long project in 2026 that keeps them here 150 days.
Worked example
Example 2: rising presence
- 2026 days (counted in full)
- 150
- 2025 days: 120 times one third
- 40
- 2024 days: 90 times one sixth
- 15
- Weighted total
- 205
- Result for 2026
- Meets the test
The consultant meets the test for 2026 even though they were here well under half the year. Because they were present fewer than 183 days in 2026, they may still be treated as a nonresident under the closer connection exception if they keep a foreign tax home and file Form 8840 on time. Educational, not individualized tax advice.
Days that do not count
Some days of physical presence are left out of the count entirely. The 2026 Form 8843 instructions list six categories.
- Days you regularly commuted to work in the United States from a residence in Canada or Mexico.
- Days you were in the United States for less than 24 hours while traveling between two places outside the United States. Pub 519 says a business meeting during the stop, even at the airport, defeats this exclusion.
- Days you were temporarily here as a regular crew member of a foreign vessel traveling between the United States and a foreign country or U.S. territory, unless you also did business that day.
- Days you could not leave because of a medical condition or medical problem that arose while you were in the United States.
- Days you were here under a NATO visa as a member of a force or civilian component to NATO (family members still count their days).
- Days you were an exempt individual, explained in the next section.
Medical days need a timely Form 8843
Per the Form 8843 instructions, if you do not file Form 8843 on time you may not exclude days spent here because of a medical condition (or as a professional athlete), which can make you a resident under the test. The IRS waives this only with clear and convincing evidence that you took reasonable steps to learn about and comply with the requirement.
Exempt individuals: students, teachers and others
An exempt individual does not count days in that status. Exempt here means exempt from counting days, not exempt from tax. The categories in the 2026 Form 8843 instructions:
| Category | Who qualifies | Limit |
|---|---|---|
| Student | Temporarily present on an F, J, M or Q visa and substantially complying with it | Not exempt if exempt as a teacher, trainee or student for any part of more than 5 calendar years, unless you show you do not intend to reside permanently in the U.S. |
| Teacher or trainee | Temporarily present on a J or Q visa (other than as a student) and substantially complying with it | Not exempt if exempt as a teacher, trainee or student for any part of 2 of the 6 prior calendar years (a limited exception applies when a foreign employer paid all compensation) |
| Foreign government related | Temporarily present on an A or G visa | A-3 and G-5 visa holders are not included and count every day |
| Professional athlete | Temporarily present to compete in a charitable sports event | Only the days competing in that event |
The teacher and trainee exception for foreign-paid compensation is described in Pub 519, chapter 1.
Students and teachers claim the status by filing Form 8843 each year, even with no income. See Form 8843 explained for line-by-line guidance and the mailing rules.
Meeting the test but staying a nonresident
Passing the test is not always the end of it. The closer connection exception lets you be treated as a nonresident if all of these are true: you were present fewer than 183 days during the year, you kept a tax home in one foreign country for the entire year, you had a closer connection to that country than to the United States, and you did not take steps toward a green card or have an application to adjust status pending during the year.
You claim it on Form 8840, attached to your return or mailed by the return due date if you do not file one. Miss that deadline and you generally cannot claim the exception, unless you show by clear and convincing evidence that you took reasonable steps to learn and meet the filing requirement.
Someone with 183 or more days in the current year cannot use the closer connection exception. Their remaining route is usually a tax treaty tie-breaker, which treats a person who is a resident of both countries as a resident of only one. That route is claimed on Form 1040-NR with Form 8833.
Details: Form 8840 and the closer connection exception and Form 8833 treaty-based return positions.
When to hire a CPA and when to do it yourself
Counting days is something you can do yourself, and you should. If you are a student in your first five years, have no U.S. income and simply need Form 8843, a careful read of the instructions is usually enough.
Get help when the answer changes your return: a year where the weighted count lands near 183, a planned green card application alongside a closer connection claim, a treaty tie-breaker position, a dual-status arrival or departure year, or foreign accounts that become reportable once you are a resident. Those are the years where a wrong status leads to the wrong form, a missed FBAR or an amended return later.
What to check before you act
A practical review sequence for the return, books, or planning file.
Build a day log for the current year and the two prior years from passport stamps and travel records.
Remove excluded days: transit under 24 hours, regular Canada or Mexico commuting, medical days, crew days and exempt individual days.
Apply the weights: current year in full, one third of the prior year, one sixth of the year before.
Check both parts: at least 31 days this year and at least 183 weighted days.
If you meet the test with fewer than 183 days this year, look at the closer connection exception and Form 8840.
File Form 8843 every year you exclude days as a student, teacher, trainee or for a medical condition.
“I recently had the pleasure of working with Taxstra, and I must say, the experience exceeded my expectations. From start to finish, their professionalism, expertise, and customer care were outstanding.”
Published client feedback. Individual experiences vary.
High income earner, business owner or landlord? Here is what this changes for you.
Book your free 30-minute tax fit call to talk through your next steps.
Common mistakes
The shortcuts most likely to produce a confident but wrong answer.
Counting only full days
Any part of a day in the United States counts as a day, including arrival and departure days.
Forgetting the prior two years
A long year counts in full once and then at one third and one sixth for the next two years. People often meet the test in the year after their longest stay.
Assuming a student visa makes you exempt forever
Students generally stop being exempt after any part of more than five calendar years, unless they establish they do not intend to reside here permanently.
Skipping Form 8843 because there was no income
Exempt students and teachers still file Form 8843 to exclude their days, and medical day exclusions depend on filing it on time.
Claiming a closer connection while applying for a green card
A pending adjustment of status application, or personal steps toward permanent residence, rules out the closer connection exception for that year.
