The Substantial Presence Test: Are You a U.S. Tax Resident?
substantial presence test

The Substantial Presence Test: Are You a U.S. Tax Resident?

USTAXX Team
October 19, 20269 min read

Quick answer: You pass the substantial presence test, and are treated as a U.S. tax resident, if you were physically in the United States at least 31 days during the current year and 183 days over a weighted three-year count that includes the current year and the two years before it, according to the IRS Substantial Presence Test rules. Some days don't count at all — students, teachers, and certain other visa holders can exclude them as "exempt individuals." If you meet the day count but your tax home and closer connections are in another country, a separate exception may still let you file as a nonresident.

Key takeaways

  • The three-year count weights days unevenly: all current-year days count fully, prior-year days count at one-third, and the year before that counts at one-sixth, per IRS guidance.
  • F, J, M, and Q visa holders can be "exempt individuals" for part of their stay — exempt doesn't mean tax-exempt, it means those days don't count toward the 183-day total.
  • Passing the test means filing Form 1040 as a resident; failing it (or qualifying for an exception) generally means filing Form 1040-NR instead.
  • Students and scholars who are exempt individuals still typically need to file Form 8843 even if they owe no tax and have no income to report.

U.S. Tax Residency: Substantial Presence Test

How does the day count actually work?

The IRS does not simply add up your days in the U.S. over three years — it weights them. Under the substantial presence test described in IRS Topic 851, you count:

  • All the days you were present in the current tax year
  • One-third of the days you were present in the first year before the current year
  • One-sixth of the days you were present in the second year before the current year

If that weighted total reaches 183 days, and you were in the U.S. for at least 31 days in the current year itself, you meet the test.

Here's a worked example. Say someone was in the U.S. for 120 days in 2026, 120 days in 2025, and 120 days in 2024. The math looks like this:

Year Days present Weight Counted days
2026 (current year) 120 ×1 120
2025 (prior year) 120 ×1/3 40
2024 (two years prior) 120 ×1/6 20
Total 180

That person falls just short of 183 and does not meet the substantial presence test for 2026, even though they spent four full months in the country each year. Push any one of those years up by a handful of days and the outcome flips. This is why the test rewards careful day-counting, not rough estimates.

A "day" generally means any day you were physically present in the U.S. for any part of the day — arriving at 11 p.m. still counts as a full day under the IRS's general counting rule. There are specific exceptions for commuters from Canada or Mexico and for certain medical conditions arising while in the U.S.; see IRS Topic 851 for how those are counted.

Who gets to exclude days as an exempt individual?

An exempt individual is someone whose days in the U.S. don't count toward the substantial presence test, even though they were physically present — the term describes a day-counting exclusion, not an exemption from tax itself. The main categories, per the IRS:

  • Foreign government-related individuals on A or G visas
  • Teachers and trainees on J or Q visas, generally for two of the last six calendar years
  • Students on F, J, M, or Q visas, generally for any part of five calendar years
  • Professional athletes temporarily in the U.S. to compete in a charitable sports event

The student exclusion is the one that trips people up most often. A student who has been in the U.S. on an F-1 visa for five calendar years, even just one day in each, has typically used up the exemption and starts counting days like anyone else from year six onward. The clock is calendar years, not a rolling 60-month count, which surprises people who arrived mid-year.

Scholars and trainees on J or Q status have a shorter window — generally two of the prior six calendar years — and the rules for switching between exempt categories can get complicated if someone changes visa status mid-stream.

Don't skip this: Exempt individuals still usually have a filing obligation. If you were an exempt student or scholar with no U.S. income, you generally still need to file Form 8843 to document your exempt status for that year, according to IRS instructions. Skipping it doesn't erase tax owed, but it can create problems later if the IRS or an immigration officer asks how your exempt years were tracked.

What if I pass the day count but I'm still not a resident?

You may still qualify as a nonresident under the closer connection exception, even if your weighted day count hits 183 or more. To use this exception, according to the IRS, you generally must show all of the following:

  • You were present in the U.S. fewer than 183 days in the current year
  • You maintained a tax home in a foreign country during the year
  • You had a closer connection to that foreign country than to the United States

"Closer connection" isn't a vague feeling — the IRS looks at specific, documentable facts: where your permanent home is, where your family lives, where your car is registered, where you vote, which country issued your driver's license, and where your personal belongings are. No single factor decides it; the IRS weighs the whole picture.

This exception has real limits. It's not available to anyone who has applied for or holds a green card, and it generally can't be claimed if you were present 183 days or more in the current year alone — the fewer-than-183-day current-year threshold is separate from the three-year weighted total. You claim it by filing Form 8840, the Closer Connection Exception Statement, attached to your return by the filing deadline.

Resident or nonresident: which return do I actually file?

This determines which return you file, and the two forms work very differently. Someone who meets the substantial presence test (and doesn't qualify for an exception) files Form 1040 and is taxed on worldwide income, the same as a U.S. citizen. Someone who is a nonresident for the year generally files Form 1040-NR, which taxes only U.S.-source income and limits which deductions and credits are available.

Resident (passes SPT) Nonresident (fails SPT or uses exception)
Form filed Form 1040 Form 1040-NR
Income taxed Worldwide U.S.-source only
Standard deduction Generally available Generally not available
Common filers Long-term visa holders, green card holders New arrivals, exempt students/scholars, short-term workers

Dual-status years — where someone is a nonresident for part of the year and a resident for the rest, often the year someone arrives or departs the U.S. permanently — add another layer of complexity, since income and deductions have to be split by the date residency started or ended. These returns typically combine elements of both forms and are among the easiest to get wrong without careful day-by-day tracking.

What records should I actually keep to prove my day count?

Keep a running log, because the IRS can ask you to substantiate your day count and most people don't remember exact dates eighteen months later. A basic record should include:

  • Save every boarding pass, I-94 printout, or passport stamp page showing entry and exit dates
  • Pull your official travel history from the CBP I-94 website, which tracks arrivals and departures electronically for most travelers
  • Track visa category changes with the exact date each status began and ended
  • Log the calendar years you've claimed exempt individual status, since student and scholar exemptions are capped by year count
  • Note any days excluded for medical conditions or as a commuter, with supporting documentation
  • Keep copies of every Form 8843 filed in prior years, even in years with no income

If you've already missed filing Form 8843 or a return for a prior year while your status was still unsettled, that's a separate problem worth untangling — our guide to unfiled tax returns and back taxes walks through what catching up usually involves.

Getting the residency determination right matters because it decides which form you file, what income is taxable, and which deductions apply — get it wrong in either direction and you risk either overpaying or under-reporting. If you're a student or scholar sorting out exempt status, the Form 8843 guide covers who must file and what information it requires. For anyone weighing whether this is the year they cross into resident status, our breakdown of what to expect at your first meeting with a tax advisor is a useful next step before you file.

USTAXX Consulting Services prepares individual returns for both residents and nonresidents, including the day-count analysis that determines which form applies. Book a consultation to go through your travel history and visa timeline before you file.

Checklist: Determine your U.S. tax residency status

  • Gather travel records for the current year and the two years before it.
  • Pull your official I-94 entry/exit history from the CBP website.
  • Count your current-year days present, then apply the one-third and one-sixth weights to the two prior years.
  • Confirm whether you qualify as an exempt individual, and for how many calendar years you've already claimed it.
  • Check whether you meet the fewer-than-183-day threshold needed for the closer connection exception.
  • Document your tax home and closer-connection facts if you plan to claim Form 8840.
  • Decide whether Form 1040 or Form 1040-NR applies based on your result.
  • File Form 8843 if you were an exempt student or scholar, even with no income to report.

Related articles

Back to Knowledge Hub
substantial presence test

Blog by Segeo — new article every day.

Ready to optimize your tax strategy?

Our IRS-authorized experts specialize in complex tax preparation for owner-operators, gig workers, and small businesses.

Schedule Your Consultation
The Substantial Presence Test: Are You a U.S. Tax Resident?