Nolly.com is listed by the IRS as a Certifying Acceptance Agent in Canada.See the listing
  1. Home
  2. Guides
  3. Substantial Presence Test: Are You a U.S. Tax Resident?
Tax returns

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

Learn how the substantial presence test counts U.S. days: the 183-day formula, the 31-day minimum, exempt-individual days and the closer connection exception.

Published by Nolly.comUpdated 6 min read
Woman at a kitchen table counting dates on a paper calendar next to a closed passport and boarding pass stubs
On this page8 sections
  1. How the 183-day weighted formula is calculated
  2. The 31-day minimum in the current year
  3. Days that do not count as U.S. presence
  4. Exempt individuals and Form 8843
  5. What counts as the United States for this test
  6. The closer connection exception and what the result means
  7. Frequently asked questions
  8. Have your 1040-NR prepared by Nolly.com

The substantial presence test treats a non-citizen as a U.S. resident for tax purposes for a calendar year if they were physically present in the United States on at least 31 days that year and on at least 183 days over a three-year weighted count. The count uses all days in the current year, one-third of the days in the prior year and one-sixth of the days in the year before that.

Not every day counts. Some days are excluded by rule, and some people who pass the test can still be treated as non-residents.

How the 183-day weighted formula is calculated

The test looks at a three-year window: the current year and the two years immediately before it. Each year carries a different weight. Days in the current year count in full. Days in the first prior year count at one-third. Days in the second prior year count at one-sixth. The weighted days are added together, and a total of 183 or more meets this part of the test.

The IRS gives an example of someone present on 120 days in each of 2023, 2024 and 2025. Testing 2025, the count is 120 + 40 + 20 = 180, so that person does not meet the test for 2025. The table below adds a second, hypothetical pattern for comparison.

YearWeightIRS example (120 each year)Hypothetical (150 / 90 / 60)
Current yearAll days120150
First prior year1/34030
Second prior year1/62010
TotalNeeds 183180: not met190: met

The 31-day minimum in the current year

The weighted total is only half of the test. The person must also be physically present in the United States on at least 31 days during the current year. Both conditions have to be met for the same calendar year.

This floor matters for people with heavy presence in earlier years and very little in the current one. Someone who spent most of the two prior years in the U.S. could have a large weighted total from those years alone. If they were present on only 20 days in the current year, they do not meet the substantial presence test for that year, whatever the three-year total says.

A day of presence means any day the person is physically in the country at any time during the day. Arriving late in the evening still counts as a day. That is why careful travel records, such as boarding passes and passport stamps, make the count easier to reconstruct later.

Days that do not count as U.S. presence

The IRS lists several kinds of days that are left out of the count, even though the person was physically in the country:

  • Days commuting to work in the U.S. from a residence in Canada or Mexico, for someone who regularly commutes from Canada or Mexico.
  • Days in the U.S. for less than 24 hours while in transit between two places outside the United States.
  • Days in the U.S. as a crew member of a foreign vessel.
  • Days the person cannot leave the U.S. because of a medical condition that developed while they were in the United States.
  • Days the person is an exempt individual.

For the details behind each exclusion, other than the exempt-individual category, the IRS points readers to Publication 519, U.S. Tax Guide for Aliens. Excluding medical-condition days also carries a filing step, covered in the next section.

Exempt individuals and Form 8843

An exempt individual is not someone exempt from U.S. tax. The term only means certain days are not counted toward the test. The IRS names four categories:

  1. Foreign government-related individuals temporarily present on an A or G visa, other than A-3 or G-5 visa holders.
  2. Teachers or trainees temporarily present on a J or Q visa who substantially comply with the visa requirements.
  3. Students temporarily present on an F, J, M or Q visa who substantially comply with the visa requirements.
  4. Professional athletes temporarily in the U.S. to compete in a charitable sports event.

Anyone who excludes days as an exempt individual, or because of a medical condition, must include Form 8843, Statement for Exempt Individuals and Individuals With a Medical Condition, with their income tax return. If no return is required, the form is mailed on its own to the address in its instructions by the return due date. The guide to who files Form 8843 covers the form line by line.

What counts as the United States for this test

Days only count when the person is inside the area the IRS defines as the United States. For the substantial presence test, that area includes:

  • All 50 states and the District of Columbia.
  • U.S. territorial waters.
  • The seabed and subsoil of submarine areas adjacent to U.S. territorial waters, where the United States has exclusive rights under international law to explore and exploit natural resources.

The definition does not include U.S. territories or U.S. airspace. Time spent in a U.S. territory is therefore not a day of presence for this test, and neither is time flying over the country without landing.

This definition is narrower than many travelers assume. When reconstructing a day count, each entry should be checked against where the person actually was on the ground or in the water, not simply which country’s jurisdiction they were near.

The closer connection exception and what the result means

Meeting the substantial presence test does not always settle residency. The IRS says a person who meets it can still be treated as a non-resident if they qualify for an exception. It names two: the general closer connection exception, and a separate closer connection exception available only to students. Each has its own IRS page with the conditions and the filing steps, and those pages decide who qualifies.

The result drives which return is filed. Non-residents file Form 1040-NR, not Form 1040. The comparison of 1040-NR vs 1040 returns explains the practical differences between the two.

Residency status is only the first question.

Frequently asked questions

Yes, as a rule. The IRS treats a person as present on any day they are physically in the United States at any time during that day. A few hours counts the same as a full day, unless the day falls under one of the listed exclusions, such as short transit between two foreign places.

No. The IRS states that the term does not refer to someone exempt from U.S. tax. It only means the days spent in one of the listed categories, such as qualifying students or teachers, are left out when counting days of presence for the substantial presence test.

A person who does not timely file Form 8843 cannot exclude the days they were present as an exempt individual or because of a medical condition. The IRS makes an exception for someone who shows, by clear and convincing evidence, reasonable actions to learn the requirements and significant steps to comply.

Yes. The substantial presence test is applied for each calendar year on its own. Because the three-year window moves forward every year and the 31-day minimum applies to the current year, a change in travel patterns can change the result from one year to the next.

Have your 1040-NR prepared by Nolly.com

Nolly.com is an IRS Certifying Acceptance Agent in Toronto. We prepare your U.S. non-resident tax return from your income documents, and you review and sign it before we file. Get your 1040-NR prepared. Form 1040-NR preparation at Nolly.com is $150, or $349 with the ITIN application.

Source: IRS.gov, Substantial presence test.

This guide is general information, not tax advice. Rules change and every situation is different, so check the IRS page above or ask a qualified tax professional about your own case.

Published November 22, 2026. General information, not tax advice. Nolly Services Inc is a private company and is not part of the IRS.