Substantial presence test: how US tax residency days are counted

You meet the substantial presence test — and are treated as a US resident for tax purposes — if you’re in the US for at least 31 days this year and 183 days over three years, counting all of this year’s days, a third of last year’s and a sixth of the year before’s.

Substantial presence test calculator

Count every day you were in the US for any part of it, leaving out the days that don’t count (below). Exempt individuals, such as students on an F or J visa, leave out those years’ days.

How the test works

You meet the substantial presence test for a calendar year if you were physically present in the US on at least:

  1. 31 days during the current year, and
  2. 183 days during the 3-year period made of the current year and the two years before, counting:
    • all the days you were present in the current year,
    • a third of the days in the first year before, and
    • a sixth of the days in the second year before.

Example. 120 days in the US in each of three years: 120 + 40 + 20 = 180 weighted days — under 183, so the test isn’t met.

Which days count

You’re treated as present on any day you’re in the US at any time during the day. These days don’t count:

  • days you commute to work in the US from a home in Canada or Mexico;
  • days you’re in the US in transit for less than 24 hours between two foreign places;
  • days as a crew member of a foreign vessel;
  • days you couldn’t leave because of a medical condition that arose while you were in the US;
  • days you’re an exempt individual.

Exempt individuals

Days in these statuses don’t count toward the test:

  • foreign government-related individuals (A or G visas, other than A-3 and G-5);
  • teachers or trainees on a J or Q visa;
  • students on an F, J, M or Q visa;
  • professional athletes competing in a charitable sports event.

To exclude these days — or days kept by a medical condition — you file Form 8843 with your tax return.

The closer connection exception

Even if you meet the test, you can be treated as a nonresident for the year if all of these hold:

  • you were in the US for fewer than 183 days during the year;
  • you kept a tax home in a foreign country for the entire year;
  • you had a closer connection to that country than to the US;
  • you haven’t taken steps toward a green card or had an application pending.

You claim it on Form 8840. If you don’t file it on time, you can’t claim the exception unless you can show you took reasonable steps to learn about the filing requirement.

How FlySee counts it

FlySee doesn’t have a tracker for the substantial presence test. Its Log records the days you’re in the US the same way the test counts them — any part of a day is a day — and its export lists your days by country, so you can weigh each year yourself. The calculator above is the IRS formula: it weighs the days you type in, nothing more.

Substantial presence test: questions and answers.

Does a day I fly in or out count?

Yes. You’re treated as present in the US on any day you’re physically present at any time during the day — unless the day is one of those that don’t count, such as a transit of less than 24 hours between two foreign places.

Do F-1 and J-1 students count their days?

Students on F, J, M or Q visas are exempt individuals: their days in that status don’t count toward the test. To exclude them, they file Form 8843.

Can I meet the test and still be treated as a nonresident?

Yes, through the closer connection exception — if you were in the US for fewer than 183 days in the year, kept a tax home in a foreign country all year, had a closer connection to it than to the US, haven’t applied for a green card, and file Form 8840 on time.

What is Form 8843?

The statement exempt individuals — and people excluding days for a medical condition — file to exclude those days. Without it, the days can’t be excluded.

Sources

FlySee counts days; it doesn’t give tax advice. Whether you’re resident is for you and your adviser.

Track it in FlySee

Track days in every country and know the date you can stay until. Coming soon to iPhone.

  • Logs the days you’re in the US, automatically — any part of a day is a day
  • Rebuilds past years from your photos, so earlier years’ days are on record
  • Exports your days by country as PDF, Excel or CSV for your tax preparer
Coming soon to the App Store
  • Your photos never leave your iPhone
  • Works offline
  • No account