Substantial Presence Test Calculator
The IRS Substantial Presence Test determines your US tax residency status based on days spent in the US over three years. Enter your days below to calculate your weighted total and know exactly where you stand.
What Is the Substantial Presence Test?
The IRS Substantial Presence Test is the formula used to decide whether a non-citizen must be treated as a US tax resident. It is based entirely on how many days you were physically present in the US over the past three years, not on your visa type.
You meet the test for a calendar year if both of the following are true:
- You were physically present in the US for at least 31 days in the current year, and
- Your weighted three-year total is 183 days or more
The IRS weights each year differently:
| Year | Weight |
|---|---|
| Current year | 100% (× 1) |
| One year prior | 33% (× 1/3) |
| Two years prior | 17% (× 1/6) |
Example: Arjun spent 120 days in the US in each of 2024, 2025, and 2026. Weighted total: 120 + 40 + 20 = 180 days. Below 183, so he is treated as a nonresident alien for 2026.
Why it matters: The difference between resident alien vs nonresident alien status determines everything about your US tax return. A resident alien files Form 1040 and reports worldwide income. A nonresident alien files Form 1040-NR and reports only US-source income. If you hold NRO or NRE accounts or Indian investments, this changes your tax picture significantly.
What Days Count, and What Days Don’t?
Any day you are physically present in the US for any part of the day counts as a full day, including arrival and departure days.
The following days are excluded from the count:
- Exempt individuals: Students on F, J, M, or Q visas are exempt for up to 5 calendar years. Teachers and trainees on J or Q visas are exempt for 2 years out of any 6-year period. Foreign government employees on A or G visas are exempt for the duration of that status.
- Medical condition: Days you intended to leave but could not because a medical condition arose while you were in the US.
- Transit: Days you were in the US for less than 24 hours while traveling between two foreign destinations, with no business meeting.
- Canada/Mexico commuters: Days you commuted to US work from a residence in Canada or Mexico.
- Foreign vessel crew: Days spent as a crew member of a foreign vessel not engaged in US trade.
Exempt individuals must file Form 8843 to claim any exclusion, even with no US income. Any day not formally excluded is counted in your total.
How Does This Apply to F-1 Students and H-1B Holders?
F-1 and J-1 Students
Your days do not count during the first 5 calendar years you are in the US on an F-1 or J-1 student visa. From year 6 onward, every day counts. Many students miss this transition and continue filing incorrectly as nonresident aliens past year 5.
H-1B, L-1, and O-1 Holders
No exemption applies. Every day counts from day one. Most NRIs on H-1B establish US tax residency status within their first full calendar year.
The F-1 to H-1B Transition Year
This is the scenario handled incorrectly most often. Meera was an F-1 student from 2019 to 2023. She switched to H-1B in October 2024. Year 6 means her F-1 days are no longer exempt. Combined with H-1B days, she almost certainly meets the test for 2024 and must file as a resident alien.
If this was your situation recently, get your filing reviewed before submitting. The transition year is also called a dual status year, and the rules for what income to report differ from a standard full-year resident return.
What Is the Closer Connection Exception?
Meeting the Substantial Presence Test does not automatically make you a resident alien. The Closer Connection Exception lets you maintain nonresident alien status even after hitting the 183-day threshold.
You qualify if all four are true:
- You were present in the US for fewer than 183 actual days in the current year
- You maintained a tax home in a foreign country throughout the year
- You had stronger ties to that country than to the US (home, family, bank accounts, voter registration)
- You have not applied for a green card
You claim it by filing Form 8840 by the tax return due date. Miss the deadline and the exception is gone for that year.
NRIs on H-1B who spend fewer than 183 actual days in the US and maintain genuine ties to India may qualify. The DTAA Tax Calculator can help you model how your classification affects your cross-border tax.
What Are the Tax Consequences of Meeting the Test?
If You Are a Resident Alien
You are classified as a resident alien for tax purposes and taxed on worldwide income. You file Form 1040. This includes income from Indian salary, NRO account interest, rental income, mutual fund gains, and property sales. You will also need to:
- File FinCEN Form 114 (FBAR) if your Indian accounts exceeded $10,000 at any point during the year. Check your FBAR obligations as an NRI for threshold details.
- File Form 8938 (FATCA) if foreign assets exceed $50,000 at year end
- Report Indian mutual funds as PFICs under IRC Section 1297
- Claim a Foreign Tax Credit via Form 1116 to offset taxes already paid in India
If You Are a Nonresident Alien
You file Form 1040-NR and pay US tax only on US-source income. Indian salary, bank interest, and investment gains are outside IRS jurisdiction. FBAR and FATCA do not apply.
NRI-Specific Obligations to Know
NRE account interest (tax-free in India) becomes taxable in the US once you are a resident alien. Indian mutual funds face PFIC taxation. PPF and EPF may trigger Form 3520 foreign trust reporting on top of FBAR. Knowing these common financial mistakes NRIs make before your first resident alien filing year saves money.
Common Mistakes That Lead to the Wrong Result
- Counting exempt days as an F-1 student — Many students run the SPT formula without removing exempt days and incorrectly conclude they are resident aliens.
- Missing the 5-year student exemption cutoff — Students past year 5 often continue filing as nonresidents because they were told “students are exempt.” The exemption expires.
- Assuming visa type determines tax status — An H-1B does not make you a resident alien automatically. An F-1 does not make you a nonresident alien permanently. The day count decides.
- Missing the Form 8840 deadline — The Closer Connection Exception must be claimed on time. There is no retroactive filing option once the deadline passes.
- Not accounting for the transition year — The year you switch from an exempt visa to a non-exempt one is the year most people file incorrectly.
Run your numbers through the Substantial Presence Test calculator above before assuming your status. The weighted formula trips people up more than any other step.
Frequently Asked Questions
What is the Substantial Presence Test?
It is the IRS formula that determines US tax residency status for non-citizens. You meet it if you were present at least 31 days in the current year and your weighted three-year total (100% of current year + 1/3 of prior year + 1/6 of the year before) reaches 183 days or more. Meeting it means you file Form 1040 and pay US tax on worldwide income.
How do I calculate my weighted days?
Add all your US days in the current year, plus one-third of last year's days, plus one-sixth of the year before. If the total is 183 or more and you were present at least 31 days this year, you meet the test. The Substantial Presence Test calculator at the top of this page does this automatically. You can also verify the formula on the IRS Substantial Presence Test page.
What days are excluded from the count?
Days as an exempt individual (F/J/M/Q student for up to 5 years; J/Q teacher for 2 of any 6 years; A/G diplomat), days you could not leave due to a medical condition that arose in the US, transit days under 24 hours between two foreign points, regular commute days from Canada or Mexico, and foreign vessel crew days. File Form 8843 to claim any exclusion.
Do I need to file Form 8843 even with no US income?
Yes. Form 8843 is required for any exempt individual claiming the exclusion, regardless of income. Missing it means the IRS counts all your days, which can change your residency status retroactively.
Can I avoid US residency even if I meet the 183-day threshold?
Yes, if you qualify for the Closer Connection Exception. You must have spent fewer than 183 actual days in the US, maintained a tax home abroad, had stronger ties to that country than the US, and not applied for a green card. File Form 8840 on time to claim it.
How does meeting the test affect my Indian accounts and investments?
Once you are a resident alien, all Indian income is reportable in the US. Interest on your NRO account is taxable. Indian mutual funds are classified as PFICs. If your Indian account balances exceeded $10,000 at any point during the year, you must file an FBAR. Review your FBAR requirements for NRIs to assess your position.
Your US tax residency status shapes everything you owe
Your status decides which forms you file, which income the US can tax, and whether FBAR, FATCA, and PFIC rules apply to your Indian accounts. An advisor can map these to your situation so you file right the first time.