US · rules v2026.1 · last verified 2026-08-28

The US Substantial Presence Test, explained

Not tax or legal advice. Verify with a qualified professional.

Free calculator Check your own days Runs in your browser. Nothing you enter is transmitted.

The Substantial Presence Test is the arithmetic the IRS uses to decide whether a non-citizen is a US tax resident for a calendar year. It is not a simple annual tally, and that is where most people get it wrong: the test reaches back three years, so a year that felt light can still tip you over because of where you were two years ago.

US · v2026.1

US Substantial Presence Test

You meet the Substantial Presence Test if you are present in the US at least 31 days in the current year AND your weighted total reaches 183: all current-year days, plus one third of last year's days, plus one sixth of the year before. Any part of a day present counts (with narrow exceptions such as certain transit and commuting days). Meeting the test makes you a US tax resident unless an exception (closer connection, treaty) applies.

Reference period calendar year
Aggregation 183 days over 3 years

How days are counted

  • Any part of a day present counts as a full day.
  • Pure transit, without passing border control, is excluded.

Official source Last verified 2026-08-28 Effective from 2000-01-01

How the test weights your days

You meet the test when two things are true at once. You were present at least 31 days in the current year — a gate that stops brief visits from ever triggering the test — and your weighted total across 3 calendar years reaches 183.

The weighting is exact, and it is easiest to think of in sixths rather than fractions. Each current-year day counts 6 sixths — a full day. Each day from the preceding year counts 2 sixths, and each day from the year before that counts 1 sixth. Working in sixths matters because rounding at the wrong point moves the answer: the arithmetic should be done in whole sixths and compared once at the end.

The practical consequence is that two heavy years followed by a modest one can push you over in the modest year. If you spent long stretches in the US in each of the two prior years, your budget for the current year is far smaller than the headline threshold suggests.

Which days count, and which do not

Any part of a day present counts as a full day. There is no midnight rule here — an arrival at 23:40 uses a day, and both the arrival and departure days count. That is stricter than the UK’s Statutory Residence Test, and it is the single most common source of miscounting among people who move between the two systems.

Several categories of day are excluded rather than counted:

  • Days you regularly commute to work from Canada or Mexico.
  • Days in transit of under 24 hours when travelling between two points outside the United States.
  • Days you were unable to leave because of a medical condition that arose while you were present.
  • Days as an exempt individual — certain students, teachers, trainees, diplomats and professional athletes at charitable events. Exempt status is time-limited and has its own conditions.

Exclusions are not rounding errors. A single mislabelled category can move a borderline year, so each excluded day needs a reason recorded against it, not just a mental note.

The closer connection exception

Meeting the test makes you a US tax resident unless something displaces that result. The most common escape is the closer connection exception: if you were present fewer than 183 days in the current year, maintained a tax home in a foreign country for the whole year, and had a closer connection to that country than to the United States, you can keep non-resident status by filing Form 8840. Note the asymmetry — the exception is measured against the current year alone, even though the test that caught you was measured across three.

Separately, a tax treaty tie-breaker can allocate residence to the other country where both countries would otherwise claim you. Treaty positions have their own filing requirements and are worth professional advice rather than a calculator.

What Residay computes and what it asks

From your trip history the app derives the weighted total across the lookback years, the current-year count against the entry gate, and the date the threshold would be crossed if you continued as planned. It flags the exclusions it cannot see for itself — commuter days, transit, medical days and exempt status are labels you apply, each kept with its reason so the count can be explained later rather than merely asserted.

Planning notes

  • Check the weighted total before booking, not after. The lookback means this year’s freedom was partly decided two years ago.
  • If you expect to be near the line, the current-year figure of 183 days is the one that governs the closer connection exception — crossing it forecloses that route even if the exception would otherwise have applied.
  • Federal and state tests count different things over the same calendar. Clearing this one tells you nothing about New York.
  • Keep evidence, not just counts. The exclusions are where an audit lands, and they are the part a bare day count cannot defend.

Last reviewed 2026-08-29

Common questions

How does the Substantial Presence Test count days?

It counts every day you were physically present in the United States for any part of the day, then weights them across three calendar years in exact sixths: current-year days at full weight, the preceding year at a third, and the year before that at a sixth. You meet the test when the weighted total reaches 183 and you were present at least 31 days in the current year.

Which days do not count toward the Substantial Presence Test?

Days you commute regularly from Canada or Mexico, days in transit of under 24 hours between two foreign points, days you could not leave because of a medical condition that arose while in the United States, and days as an exempt individual such as certain students, teachers and diplomats.

Can I meet the Substantial Presence Test and still not be taxed as a US resident?

Yes. The closer connection exception lets you keep non-resident status if you were present fewer than 183 days in the current year, maintain a tax home abroad and have a closer connection to that country, claimed on Form 8840. A tax treaty tie-breaker can also override the result.

Does the day I arrive in the United States count?

Yes. Any part of a day present counts as a full day, so both the arrival and departure days count. This is stricter than the UK, which counts only days where you are present at midnight.