Tax

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

The Substantial Presence Test is the day-counting formula that decides whether you are taxed as a U.S. resident or nonresident.

By Mohammad Bin-Hussain, ACCA Published

If you spend significant time in the United States on a visa, the IRS may consider you a U.S. tax resident — even if you’re not a citizen or green card holder. The tool it uses to make that call is the Substantial Presence Test, a day-counting formula that can quietly move you from being taxed only on your U.S. income to being taxed on your worldwide income.

Understanding this test matters because it determines which tax return you file — the resident Form 1040 or the nonresident Form 1040-NR — and how much of your income the U.S. can tax. Here’s exactly how the calculation works, and the exceptions that can change the outcome.

What the Substantial Presence Test Measures

The test asks a simple question with a not-so-simple formula: have you been physically present in the U.S. enough to be treated as a resident for tax purposes? It looks at your days in the country over a three-year window. If you pass, you’re a resident alien for tax purposes and report worldwide income. If you don’t, you remain a nonresident and are taxed only on U.S.-source income.

The Two-Part Test

To meet the Substantial Presence Test for the current year, you must be physically present in the United States on both:

  • At least 31 days during the current year, and
  • At least 183 days over the three-year period (the current year plus the two prior years), counted using the weighted formula below

Both conditions must be true. If you were in the U.S. fewer than 31 days this year, you don’t meet the test — regardless of how much time you spent in prior years.

The 183-Day Weighted Formula

Here’s the part that trips people up: you don’t simply add up three years of days. Each year is weighted differently.

  • All (100%) of your days present in the current year
  • One-third (1/3) of your days present in the first prior year
  • One-sixth (1/6) of your days present in the second prior year

If the weighted total equals 183 or more (and you were present at least 31 days this year), you meet the test.

A Worked Example

Suppose you were present 120 days in each of the last three years:

YearDays presentWeightCounted days
Current year120× 1120
First prior year120× 1/340
Second prior year120× 1/620
Total180

The total is 180 days — just under the 183-day threshold — so in this example you would not meet the Substantial Presence Test, even though you spent 120 days in the U.S. each year. Small changes in your travel can flip the result, which is why counting carefully matters.

Which Days Don’t Count

Not every day of physical presence counts. The IRS excludes, among others:

  • Days you regularly commute to work in the U.S. from a residence in Canada or Mexico
  • Days you’re in the U.S. for less than 24 hours while in transit between two foreign locations
  • Days you’re unable to leave because of a medical condition that developed while you were in the U.S.
  • Days you qualify as an “exempt individual” (see below)

“Exempt Individuals”: When Your Days Don’t Count at All

Certain visa holders are “exempt individuals,” meaning their days of presence don’t count toward the test for a period of time:

  • Students on F, J, M, or Q visas — generally exempt for their first five calendar years
  • Teachers and trainees on J or Q visas — generally exempt for two of the prior six years
  • Foreign-government-related individuals on A or G visas
  • Professional athletes temporarily in the U.S. to compete in certain charitable events

This is why an international student can live in the U.S. for years and still file as a nonresident on Form 1040-NR — during the exempt period, their days simply don’t count.

The Closer Connection Exception

Even if your day count technically meets the test, you may still be treated as a nonresident if you qualify for the closer connection exception. To claim it, you must:

  • Be present in the U.S. fewer than 183 days during the current year
  • Maintain a tax home in a foreign country during the year
  • Have a closer connection to that country than to the United States
  • Timely file Form 8840, Closer Connection Exception Statement for Aliens

The IRS weighs your ties — where your permanent home, family, belongings, bank accounts, and social life are — in deciding whether your connection abroad is genuinely closer than your connection to the U.S.

Why This Matters for Your Taxes

Passing or failing the Substantial Presence Test isn’t a technicality — it changes what the U.S. can tax. As a resident, you report worldwide income on Form 1040. As a nonresident, you report only U.S.-source income on Form 1040-NR and lose access to some deductions and credits. For a side-by-side look at the two returns, see our guide to Form 1040 vs. Form 1040-NR.

A Quick Checklist

  • Count your U.S. days for the current year and the two prior years
  • Apply the weighted formula (1, 1/3, 1/6) — don’t just add the totals
  • Subtract any days that don’t count (exempt individual, medical, transit, border commuting)
  • Check whether you’re still within an exempt period as a student or scholar
  • If you’re close to the threshold, consider whether the closer connection exception applies
  • Confirm which return the result points to — Form 1040 or Form 1040-NR

How Veris Financials Can Help

The Substantial Presence Test looks simple until exempt-individual periods, dual-status years, and treaty tie-breakers enter the picture — and an incorrect residency determination flows through to every line of your return. Veris Financials helps students, professionals, and businesses count days correctly, apply the right exceptions, and file the correct resident or nonresident return. If you’re unsure where you stand, get in touch for a straightforward assessment.

Frequently Asked Questions

Does the Substantial Presence Test count partial days?

Generally, any day you are physically present in the U.S. at any time counts as a full day, with specific exceptions such as transit of less than 24 hours or regular commuting from Canada or Mexico.

Do days on an F-1 student visa count?

Usually not, during your exempt period. F-1 students are typically exempt individuals for their first five calendar years, so those days don’t count toward the test — which is why many students file Form 1040-NR.

What’s the difference between the green card test and this test?

They’re two separate paths to residency. The green card test makes you a resident the moment you become a lawful permanent resident. The Substantial Presence Test makes you a resident based on days present. Meeting either one makes you a resident for tax purposes.

I think I meet the test but I have stronger ties abroad. What can I do?

You may qualify for the closer connection exception by filing Form 8840, provided you were in the U.S. fewer than 183 days this year and maintained a tax home and closer ties in another country.

Mohammad Bin-Hussain, ACCA

Mohammad Bin-Hussain is an ACCA-qualified accountant at Veris Financials. He writes these guides from the work the firm does every week: US and UK tax preparation, monthly bookkeeping, multi-state payroll, and white-label delivery for CPA practices.

This guide is general information, not advice on your situation. Tax and accounting outcomes turn on facts we have not seen. If you want an answer for your circumstances, book a free 30-minute call and we will give you one.

More guides

Everything else in the library

Have a question this guide did not answer?

Ask it directly. A qualified person replies within one business day, and the first 30-minute call is free.