The Substantial Presence Test: How to Accidentally Become a US Tax Resident in 2026

You don't need a green card, a US job, or any intention of staying to suddenly owe the IRS tax on your worldwide income. All it takes is spending more days in the country than you realized. That's the trap of the Substantial Presence Test — the IRS formula that decides whether you've become a US tax resident based purely on how many days you've been physically present. Frequent travelers, remote workers, students, visa holders, and Canadian "snowbirds" cross the line every year without noticing. Here's how the test actually works, which days don't count, and how to stay a nonresident using the closer connection exception.

Infographic: the US Substantial Presence Test 2026 — three-year weighted formula (current + 1/3 + 1/6), 31-day and 183-day thresholds, excluded days, closer connection exception

Why the Substantial Presence Test Catches People Off Guard

Green card holders are automatically US tax residents — no math involved. For everyone else, the IRS runs a calculation. If you've been physically present in the US for enough days across a three-year window, you're treated as a resident for tax purposes, which means filing Form 1040 and reporting your global income, not just your US-source income (Form 1040-NR).

What makes it sneaky is that it's a pure day-count test. Your status doesn't hinge on what you intended — it falls out of the arithmetic. Someone who flies into the US for a couple of months each year for work or family can quietly accumulate enough days over three years to become a resident without ever applying for anything.

How to Calculate the Substantial Presence Test

Two conditions must both be true for the test to be met:

  • you were in the US for at least 31 days in the current year; and
  • your weighted three-year day total reaches 183 days or more.

The weighting is the part most people get wrong. You don't simply add up three years of days — you discount the older ones:

  • all of your current-year days (× 1);
  • one-third of last year's days;
  • one-sixth of the year-before-last's days.

A common mistake is treating the 183 figure as a flat current-year count. It isn't — it's the weighted three-year sum. Here's a worked example of how to calculate the substantial presence test.

Example. You spent 120 days in the US in 2026, 120 in 2025, and 120 in 2024. The math: 120 + (120 ÷ 3 = 40) + (120 ÷ 6 = 20) = 180 days. That's just under 183 — you're not a resident. Add a handful of current-year days and you tip over the threshold. This is exactly why people who travel "about the same amount" every year end up right on the edge.

One detail that surprises travelers: you're counted as present on any day you're physically in the US for even part of the day. Land at 11 p.m. and that day counts in full.

Days That Don't Count Toward Substantial Presence

The IRS carves out several categories of days that are excluded from the count:

  • Transit days. If you're in the US for less than 24 hours while traveling between two points outside the country — a layover, for instance — that day doesn't count.
  • Medical-condition days. If a condition that arose while you were in the US prevented you from leaving, the days from onset until you left are excluded. If you came specifically for treatment, the exception doesn't apply.
  • Regular commuters from Canada or Mexico. Days you regularly (not occasionally) commute to work in the US while keeping your home across the border.
  • Exempt individuals. Certain visa holders don't count their days at all (more below).

Exempt Individuals: F, J, M and Q Visa Holders

This is a big one. Days don't count for students on an F-1 visa (for their first five calendar years) and for teachers or trainees on a J-1 visa (two years out of six). The crucial catch: the five years are counted cumulatively across your lifetime, not per visa. A student who studied two years, left, and returned will exhaust the exemption after three more years — not get a fresh five-year clock.

To document exempt status, exempt individuals file Form 8843. Failing to file it doesn't automatically make your days count, but it creates headaches if the IRS later questions your status.

The Closer Connection Exception (Form 8840)

Even if the formula tips you over 183, there's a legitimate escape hatch: the closer connection exception. It lets you remain a nonresident if you can show your real home is somewhere else. The conditions:

  • you were present in the US for fewer than 183 days in the current year (hit 183 actual days and the exception is off the table, no matter how strong your foreign ties);
  • you maintained a tax home in a foreign country for the entire year;
  • you have a closer connection to that country than to the US — a permanent home, family, bank accounts, driver's license, voter registration, and so on;
  • you have not applied for a green card or taken steps toward permanent residency.

To claim it, you file Form 8840 (Closer Connection Exception Statement) by your return deadline. If you file a 1040-NR, attach Form 8840 to it; if you have no filing requirement, mail it to the IRS Service Center in Austin, Texas. Miss the deadline and you can forfeit the exception unless you show reasonable cause by clear and convincing evidence — so keep a clean log of your days and your foreign ties.

Frequently Asked Questions

How do I calculate the substantial presence test?

Add all your current-year US days, plus one-third of last year's days, plus one-sixth of the year before. If the total is 183 or more — and you had at least 31 days in the current year — you're a tax resident. Example: 120 + 40 + 20 = 180 days, which is below the threshold.

Am I a US tax resident if I stayed 183 days?

If you were physically present for 183 or more days in the current year, then yes — almost certainly, and the closer connection exception is no longer available to you. Fewer than that, and it depends on the weighted three-year total and your ties abroad.

What days don't count toward the substantial presence test?

Transit days under 24 hours between two foreign points, days you couldn't leave due to a medical condition, regular Canada/Mexico commuter days, and the days of exempt individuals (F students, J teachers, and others).

What is the closer connection exception form 8840?

It's the statement you file to tell the IRS you have a closer connection to a foreign country and shouldn't be treated as a US tax resident, even though you technically met the test. It's filed each year by your return deadline.

Do arrival and departure days count?

Yes. Any day you're physically in the US for even part of the day counts as a day of presence, including your arrival day.

The Bottom Line

The Substantial Presence Test turns ordinary US trips into a tax question, because residency falls out of arithmetic rather than intent. Count your days with the weighted formula, keep the 31-day and 183-day thresholds in mind, check which days are excluded, and file Form 8840 for the closer connection exception when it applies. The hardest part is simply noticing when you're approaching the line. That's where it helps to track it automatically: LumoTravel's Tax Residency calculator runs the substantial presence test on the three-year formula and warns you, in advance, exactly how many days you have left before you'd become a US tax resident.

This article is for general information only and is not tax advice. IRS rules and deadlines change, and individual US states apply their own residency tests. Verify against the current IRS instructions (irs.gov) and consult a qualified tax professional for your situation.