Substantial Presence Test: How to Work Out If You Are a US Tax Resident
In this guide
- What does the substantial presence test actually decide?
- How does the 183-day formula work?
- Which days do not count as time in the US?
- Who is an exempt individual?
- What is Form 8843, and do you need it?
- Can you still be a nonresident if you pass the test?
- What is a dual-status year?
- Common mistakes
- Frequently asked questions
- Key takeaways
- Related guides
- Sources
Quick answer: The substantial presence test is the IRS’s day-count formula for deciding whether a non-citizen counts as a US tax resident. You pass it if you were in the United States on at least 31 days this year and your weighted three-year total reaches 183 days. That weighted total is every day this year, plus one third of last year’s days, plus one sixth of the year before.
If you have just moved to the US, or you spend part of every year there for work or study, this is the rule that quietly decides which tax return you file and how your income is taxed. It is easy to get wrong because the 183 figure does not mean what most people think. Below is how the test works, with worked numbers, the days you can ignore, and the exceptions that can still save you.
What does the substantial presence test actually decide?
For US tax purposes, the IRS starts from a simple default: a person who is not a US citizen is treated as a nonresident unless they meet one of two tests. The first is the green card test. The second is the substantial presence test. Both are measured over the calendar year, January 1 to December 31.
Why it matters: a resident alien is generally taxed in a similar way to a citizen, while a nonresident is taxed under different rules. If you want the nonresident side of the picture, read our guide to nonresident alien tax in the US.
How does the 183-day formula work?
You must be physically present in the US on both of these:
- At least 31 days during the current year, and
- At least 183 days over the 3-year period that includes the current year and the two years before it, counted with weights.
| Year | How many days count |
|---|---|
| Current year | All days you were present |
| One year before | One third of the days |
| Two years before | One sixth of the days |
Worked example from the IRS
The IRS gives a simple case: a person present for 120 days in each of 2023, 2024 and 2025. For 2025 the count is 120 + 40 + 20 = 180 days. That is below 183, so the person is not a resident under the test for 2025.
A second example with uneven years
Say you were in the US for 100 days this year, 150 days last year and 120 days the year before. The weighted total is 100 + 50 + 20 = 170, which is still under 183. You can see how a person who spends a lot of time in the US every year can stay just under the line, and how one extra long stay can push them over it.
Which days do not count as time in the US?
Not every day on US soil is counted. The IRS lists these as days that do not count toward the test:
- Regularly commuting to work in the US from a home in Canada or Mexico.
- Being in the US for fewer than 24 hours while travelling between two places outside the US.
- Working as a crew member on a foreign vessel.
- Being unable to leave because of a medical condition that began while you were in the US.
- Days when you were an exempt individual (see below).
For this test, “United States” means the 50 states, the District of Columbia, US territorial waters and certain adjacent seabed and subsoil. US territories and airspace are not included.
Who is an exempt individual?
Exempt individuals can leave certain days out of the count. The IRS page lists:
- People related to a foreign government on A or G visas (excluding A-3 and G-5).
- Teachers and trainees on J or Q visas who substantially comply with their visa requirements.
- Students on F, J, M or Q visas who substantially comply with their visa requirements.
- Professional athletes competing in a charitable sports event.
If you are a student, this is why many F-1 students are not US tax residents in their first years. It also affects payroll taxes, which we cover in FICA tax for international students.
What is Form 8843, and do you need it?
To exclude days because you are an exempt individual, or because of a medical condition, you must file Form 8843. This is the step people forget. If you file it late, the IRS says you lose the exclusion unless you can show by clear and convincing evidence that you took reasonable steps to learn about and meet the requirements.
Can you still be a nonresident if you pass the test?
Yes, in some cases. Even if you meet the substantial presence test, you may be treated as a nonresident if you qualify for the general closer connection exception, or for the closer connection exception that applies only to students. The IRS also notes that four elections can override the residency tests: the first-year choice, treating a nonresident spouse as a resident, the closer connection exception, and tax treaties. For treaties, see how US tax treaty benefits work.
What is a dual-status year?
A person can be a nonresident and a resident in the same year, usually the year they arrive in or leave the US. Someone in that position must file a dual-status return. The IRS refers readers to Publication 519, U.S. Tax Guide for Aliens, for the details, so read that before you file.
Common mistakes
- Counting 183 days only in the current year. The formula spreads over three years with weights.
- Not filing Form 8843 when you were entitled to exclude days.
- Assuming a visa type decides tax status. The day count and the green card test decide it, not the visa label alone.
- Forgetting that you may need a taxpayer number. See SSN vs ITIN for new immigrants.
Frequently asked questions
Is the substantial presence test the same as the 183-day rule?
People use the two names for the same idea, but the real formula has a 31-day minimum for the current year and a weighted three-year total of 183.
Does a green card make me a tax resident?
The IRS names the green card test as one of the two residency tests, alongside the substantial presence test.
Do days spent in a US territory count?
No. For this test the US excludes US territories and airspace.
What if I only arrived this year?
You may be a dual-status taxpayer in your arrival year. Check Publication 519 and the IRS dual-status guidance.
Key takeaways
- You need 31 days this year and a weighted total of 183 over three years.
- Some days, such as short transits and exempt-individual days, are ignored.
- File Form 8843 if you are claiming exempt days.
- A closer connection exception or a treaty may still treat you as a nonresident.
Related guides
- Nonresident alien tax in the US
- FICA tax for international students
- US tax treaty benefits explained
- SSN vs ITIN: which one do you need?
- UK tax residence and the Statutory Residence Test
- Your first 90 days in a new country
This page is general information, not tax or legal advice. Tax rules change, so confirm your position with the IRS or a qualified adviser. Last updated: October 2026.
Sources
- IRS: Substantial Presence Test
- IRS: Determining an Individual’s Tax Residency Status
- IRS: Dual-Status Aliens