Understanding the IRS Substantial Presence Test

For many globally mobile people, U.S. federal tax residency is not decided by a simple calendar-year total.

It is decided, in part, by a weighted three-year formula known as the IRS substantial presence test.

If you are not a U.S. citizen and you do not meet the green card test, that formula can still treat you as a U.S. resident for tax purposes. Understanding how it works, how days are counted, and when the closer connection exception may still apply is foundational for anyone who spends material time in the United States while maintaining a life elsewhere.

This article is general information only. It is not tax, legal, or immigration advice. Individual facts, visa status, treaty positions, and filing requirements can change the outcome. Review your situation with a qualified tax advisor before relying on any threshold or exception.

What the Substantial Presence Test Determines

Under U.S. federal rules summarized by the IRS in Publication 519, U.S. Tax Guide for Aliens, an alien individual is generally a U.S. resident for tax purposes if they meet either the green card test or the substantial presence test for the calendar year.

The substantial presence test is therefore one of the main federal day-count frameworks for noncitizens who spend time in the United States without lawful permanent resident status. Meeting it can create U.S. resident tax treatment for that year, subject to available exceptions and any applicable treaty analysis.

It is also distinct from state residency. New York statutory residency, California closest-connections analysis, and Florida domicile planning each use different concepts. Our 183-day rule guide, New York guide, and California guide cover those state frameworks separately.

The Two Thresholds You Must Meet

According to the IRS substantial presence test page, you meet the test for a calendar year if you are physically present in the United States on at least:

  1. 31 days during the current year, and
  2. 183 days during the three-year period that includes the current year and the two years immediately before it, counting:
    • all days present in the current year,
    • 1/3 of the days present in the prior year, and
    • 1/6 of the days present in the year before that.

Both parts matter. A high weighted total without 31 current-year days does not meet the test. A large current-year presence without a weighted total of at least 183 also fails.

How the 1/3 and 1/6 Weighting Works

The weighting is the feature most people underestimate.

Prior-year days do not disappear. They continue to contribute, at a discount, to the current-year analysis. That is why someone who spent heavily in the United States in prior years can cross the line with fewer current-year days than a newcomer would need.

The IRS publishes a clear illustration on its substantial presence page. In that example, a person present for 120 days in each of three consecutive years counts:

  • 120 days for the current year,
  • 40 days for the prior year (1/3 of 120), and
  • 20 days for the second prior year (1/6 of 120).

The weighted total is 180. Because that is below 183, the person is not considered a resident under the substantial presence test for the current year in that example.

Change the pattern only slightly, and the result can flip. That is why precise year-by-year day totals matter more than a rough sense of “about half the year.”

You can model an educational estimate of this formula with our free 183-day calculator, which includes an optional U.S. substantial presence mode. Calculator output is not a determination of your tax status.

What Counts as a Day of U.S. Presence

The IRS states that you are generally treated as present in the United States on any day you are physically present in the country at any time during the day.

That “any time during the day” rule is strict. A morning arrival or evening departure can still count.

There are, however, specific exclusions. The IRS lists categories of days that are not counted for the substantial presence test, including:

  • days you regularly commute to work in the United States from a residence in Canada or Mexico,
  • days you are in the United States for less than 24 hours while in transit between two places outside the United States,
  • days you are in the United States as a crew member of a foreign vessel,
  • days you are unable to leave because of a medical condition that develops while you are in the United States, and
  • days you are an “exempt individual” under IRS rules (a defined status for certain visa categories and situations, not a general tax exemption).

Details and conditions appear on the IRS substantial presence page and in Publication 519. Exclusions are narrow. They should not be assumed without confirming the exact rule that applies to your facts and any required forms.

The IRS also explains what “United States” means for this test: the 50 states and the District of Columbia, plus certain territorial waters and related submarine areas. It does not include U.S. territories or U.S. airspace for this purpose.

The Closer Connection Exception

Even if the weighted formula is met, the IRS provides a closer connection exception that can still allow treatment as a nonresident for U.S. tax purposes in defined circumstances.

In summary, the IRS states that you may still be treated as a nonresident if you:

  • were present in the United States less than 183 days during the year,
  • had a closer connection during the year to one foreign country in which you had a tax home than to the United States (with a separate rule for certain mid-year moves between two foreign countries),
  • maintained a tax home in that foreign country during the entire year, and
  • had not taken steps toward, and did not have an application pending for, lawful permanent resident status.

The “less than 183 days” current-year limit is critical. Crossing 183 unweighted days in the current year generally closes this path, even if other connections point abroad.

The IRS evaluates closer connection through facts and circumstances. Factors it lists include the country of residence designated on forms, the types of forms filed, and the location of your permanent home, family, personal belongings, social and cultural affiliations, business activities (other than those that constitute your tax home), driver’s license, voting jurisdiction, and charitable contributions.

There is also a limited two-country version of the exception when a tax home moves from one foreign country to another during the year and additional conditions are met. The IRS describes those conditions on the closer connection page.

Form 8840 Is Part of the Claim

To claim the closer connection exception, the IRS requires Form 8840, Closer Connection Exception Statement for Aliens.

If you are filing a U.S. federal income tax return, Form 8840 is attached to that return. If you do not have to file a U.S. return, the IRS instructs you to send Form 8840 to the service center indicated in the form instructions by the due date for filing an income tax return.

Timely filing matters. The IRS states that if you do not timely file Form 8840, you generally cannot claim the closer connection exception, unless you can show by clear and convincing evidence that you took reasonable actions to become aware of the filing requirements and significant steps to comply with them.

A separate closer connection path exists for certain students. That is a distinct rule and should not be confused with the general Form 8840 exception.

Why This Matters for Globally Mobile Households

For high-net-worth individuals who keep homes, advisors, and business interests in more than one country, the substantial presence test creates a quiet operational risk:

  • prior years continue to affect the current weighted total,
  • partial U.S. days often count,
  • exclusions are technical rather than intuitive, and
  • the closer connection exception has both a hard day-count gate and a qualitative contacts analysis.

Someone can feel “mostly abroad” while still approaching the weighted 183 threshold because of last year’s presence. Someone else can stay under 183 current-year days, still meet the weighted test, and then need to evaluate whether Form 8840 is available and supportable.

State residency questions do not disappear when federal status is clear. A person managing U.S. federal exposure may also be managing New York abode and day-count risk, California connections, or a Florida domicile narrative at the same time. Treat federal and state analyses as parallel workstreams, not substitutes.

Tracking Presence Before the Formula Becomes a Guess

The formula is only as reliable as the underlying day counts.

If your U.S. presence is reconstructed months later from passports, calendars, and credit-card trails, small gaps become large uncertainties. When the difference between 180 and 183 weighted days can change the analysis, reconstruction risk is not theoretical.

A contemporaneous record of where time was spent makes the math reviewable. It also supports conversations with advisors about margin, planned travel, and whether any exclusion or exception might be relevant.

That is the operational layer Residance is built for. The app tracks physical presence across jurisdictions, shows progress against thresholds you configure, and helps you export records for professional review. It does not determine whether you meet the substantial presence test, qualify for the closer connection exception, or owe U.S. tax. Those are questions for qualified advisors using official rules and your complete facts.

If you want a quick educational estimate first, start with the 183-day calculator. If you are comparing tools for ongoing tracking, see our Residance vs TaxBird comparison or the broader best tax residency tracker apps overview.

Practical Takeaways

  • Learn both gates: the 31-day current-year requirement and the weighted three-year 183-day total.
  • Do not ignore discounted prior-year days. The 1/3 and 1/6 weights are part of the test.
  • Assume any part of a U.S. day may count unless a specific IRS exclusion applies.
  • Treat the closer connection exception as a structured claim with Form 8840 requirements, not as an informal lifestyle argument.
  • Keep federal substantial presence analysis separate from state domicile and statutory residency planning.
  • Maintain clean presence records before year-end pressure begins.

Final Thought

The IRS substantial presence test is precise on paper and easy to misread in practice.

It is not the same as “stay under 183 days this year.” It is a current-year gate plus a weighted three-year formula, with defined day-count rules and a closer connection exception that has its own limits.

If U.S. presence is part of your life, know the formula early, track the days carefully, and involve a qualified tax advisor before travel plans harden into a filing position.

When you are ready for continuous presence tracking on iOS, download Residance on the App Store.