What counts
Which days count as days of presence?
Any day you are physically present in the U.S. for any part of the day counts โ whether you arrived at 11:59 PM or spent the entire day. However, the IRS excludes several categories of days:
- Commuter days from Canada or Mexico. If you regularly commute to work in the U.S. from a residence in Canada or Mexico, those commuting days do not count.
- Transit days. If you are in transit between two foreign points and physically in the U.S. for less than 24 hours, that day does not count.
- Medical emergency days. If you intended to leave the U.S. but could not because of a medical condition that arose while you were here, those days may be excluded. You must be able to document the medical condition.
- Exempt individual days. Days when you are a foreign government official (A or G visa), teacher or trainee on a J or Q visa (for 2 calendar years), student on an F, J, M, or Q visa (for 5 calendar years), or a professional athlete competing in a charitable event.
Who qualifies as an exempt individual?
The term "exempt individual" in this context does not mean exempt from tax โ it means exempt from counting days toward the substantial presence test. The four categories are:
- Foreign government-related individuals โ diplomats and their families on A or G visas.
- Teachers and trainees โ J-1 or Q-1 visa holders who are not students, exempt for 2 out of the preceding 6 calendar years.
- Students โ F-1, J-1, M-1, or Q-1 visa holders who are students, exempt for 5 calendar years (with a possible extension if they can show they do not intend to permanently reside in the U.S.).
- Professional athletes โ only for charitable sporting events.
If you qualify as an exempt individual, you must file Form 8843 with your tax return (or by itself if you have no filing requirement) to document your status. Without Form 8843, the IRS may not recognize your exempt days. For more on how F-1 and J-1 status affects taxes, see our OPT FICA exemption guide and J-1 visa tax rules.
What is the closer connection exception?
Even if your weighted days total 183 or more, you can remain a nonresident alien if all three conditions are met:
- You were present in the U.S. for fewer than 183 days in the current year (note: this is actual days, not weighted days).
- You maintained a tax home in a foreign country for the entire year.
- You had a closer connection to that foreign country than to the U.S. โ evidenced by factors like where your family lives, where your personal belongings are, where your bank accounts are, where you vote, and where you hold a driver's license.
You claim this exception by filing Form 8840 (Closer Connection Exception Statement) by the due date of your return, including extensions. If you fail to file Form 8840 on time, you may lose the ability to claim the exception.
What are the tax consequences of meeting the test?
If you meet the substantial presence test and no exception applies, you are a U.S. resident alien for the entire tax year (starting from your residency start date, which is generally the first day of presence in the current year that counts toward the test). This means:
| Factor | Resident alien (met test) | Nonresident alien (did not meet) |
|---|---|---|
| Income taxed | Worldwide income | U.S.-source income only |
| Tax return form | Form 1040 | Form 1040-NR |
| Standard deduction | Yes | Generally no |
| FICA on U.S. wages | Yes | Depends on visa type |
| FBAR / FATCA reporting | Yes, if thresholds met | No FBAR; FATCA has different rules |
| Filing status options | All (single, MFJ, HoH, etc.) | Single or MFS only |
For a full breakdown of how resident aliens are taxed, see our H-1B visa tax guide (which applies to all resident aliens, not just H-1B holders). For green card holders who automatically qualify as resident aliens, see our green card tax obligations page.
First-year choice and dual-status years
If you arrive in the U.S. mid-year, you may not meet the substantial presence test until the following year. In some cases, you can make a first-year choice election to be treated as a resident alien for part or all of your first year. This can be advantageous because it lets you claim the standard deduction and file Form 1040 from the start.
To make this election, you must meet the substantial presence test in the following year, and your first day of presence in the election year must be no later than a specific date (generally early March of the election year). See IRS guidance on first-year choice for the exact requirements.
Common mistakes with the substantial presence test
- Counting only current-year days. The test uses a 3-year weighted formula. Someone with only 100 days in the current year can still meet the test if they had heavy presence in the prior two years.
- Forgetting to file Form 8843. Students and exchange visitors must file this form every year to document exempt status, even if they have no income. Without it, the IRS may count all their days.
- Ignoring the 31-day minimum. Both conditions must be met: 31+ days in the current year AND 183+ weighted days. Meeting only one is not enough.
- Not filing Form 8840 for the closer connection exception. The exception is not automatic โ you must affirmatively claim it by filing the form on time.
- Confusing "exempt individual" with "tax-exempt." Being an exempt individual only means your days do not count toward the presence test. You may still owe U.S. taxes on U.S.-source income as a nonresident alien.
Questions
Substantial presence test FAQ
What is the substantial presence test formula?
You meet the test if you were physically present in the U.S. for at least 31 days in the current year AND your weighted total equals 183 or more. The weighted total is: all days present in the current year, plus 1/3 of the days present in the first prior year, plus 1/6 of the days present in the second prior year. For example, if you were present 120 days in 2026, 120 days in 2025, and 120 days in 2024: 120 + (120 × 1/3) + (120 × 1/6) = 120 + 40 + 20 = 180 โ you do NOT meet the test.
Which days count as days of presence?
Any day you are physically present in the U.S. for any part of the day counts as a day of presence, with specific exceptions. Days that do NOT count include: days you commute to work from Canada or Mexico, days you are in transit between two foreign destinations and are in the U.S. for less than 24 hours, days you cannot leave due to a medical condition that arose in the U.S., and days you are an exempt individual (F, J, M, or Q visa holder within the exempt period).
What is the closer connection exception?
Even if you meet the 183-day formula, you may still be treated as a nonresident alien if you were present in the U.S. for fewer than 183 days in the current year, you maintained a tax home in a foreign country during the entire year, and you had a closer connection to that foreign country than to the U.S. You claim this exception by filing Form 8840 with the IRS by the filing deadline.
Are F-1 and J-1 visa holders exempt from the substantial presence test?
F-1 and J-1 visa holders are classified as exempt individuals during their initial period in the U.S. (5 calendar years for students, 2 calendar years for non-student J-1 holders). During this period, their days of presence do not count toward the 183-day formula. They must file Form 8843 annually to document this exempt status. After the exempt period ends, their days count normally.
What happens if I meet the substantial presence test?
You become a U.S. resident alien for tax purposes. This means you must report worldwide income to the IRS (not just U.S.-source income), you file Form 1040 instead of 1040-NR, you can claim the standard deduction, and you owe FICA taxes on U.S. wages. Your residency start date is generally January 1 of the year you first meet the test.
Can a tax treaty override the substantial presence test?
Yes. Some tax treaties contain tie-breaker rules that can treat you as a nonresident alien for income tax purposes even if you meet the substantial presence test. You must file Form 8833 to claim a treaty-based position. Note that even if a treaty overrides your resident status for income tax, you may still be subject to FICA if you have a U.S. employer.
- Sources: IRS โ Substantial Presence Test ยท IRC Section 7701(b) ยท IRS Publication 519 (Tax Guide for Aliens).
- ๐ Last updated July 31, 2026 ยท Tax year 2026
โ Back to the full salary calculator ยท Related: H-1B visa taxes ยท OPT FICA exemption ยท Nonresident alien withholding ยท FICA calculator
