Resident or non-resident for US tax: the substantial presence test

Foreign owners who spend time in the US can become US tax residents without realizing it, and residents are taxed on worldwide income. The substantial presence test is how the IRS decides. This guide explains the count, the days that are excluded, and the ways out.

By Muhammad Bilal, Chartered Accountant. Reviewed by Hamza Fida, Chartered Accountant. Checked against official sources on . 3 minute read.

Short answer

Under the substantial presence test, you are a US resident for tax if you are in the US at least 31 days this year and 183 days over three years, counting all days this year, one-third of last year's days and one-sixth of the year before. Some days do not count, and a closer connection to another country or a tax treaty can still make you a non-resident.

At a glance

Minimum this year
31 days in the US
Three-year count
183 days, weighted
Weighting
All days this year, 1/3 of last year, 1/6 of the year before
Days that do not count
Certain students, teachers, diplomats, medical stays, transit
Closer connection exception
Form 8840, if under 183 days this year
Treaty tie-breaker
Form 8833 with Form 1040-NR
Resident or non-resident for US tax: the substantial presence testMinimum this year: 31 days in the US; Three-year count: 183 days, weighted; Weighting: All days this year, 1/3 of last year, 1/6 of the year before; Days that do not count: Certain students, teachers, diplomats, medical stays, transit; Closer connection exception: Form 8840, if under 183 days this year; Treaty tie-breaker: Form 8833 with Form 1040-NR.KEY FACTS AT A GLANCEResident or non-resident for US tax: thesubstantial presence testMinimum this year31 days in the USThree-year count183 days, weightedWeightingAll days this year, 1/3of last year, 1/6 of theyear beforeDays that do not countCertain students,teachers, diplomats,medical stays, transitCloser connection exceptionForm 8840, if under 183days this yearTreaty tie-breakerForm 8833 with Form1040-NRChecked against official sourcesTax BakersResident or non-resident for US tax: the substantial presence testMinimum this year: 31 days in the US; Three-year count: 183 days, weighted; Weighting: All days this year, 1/3 of last year, 1/6 of the year before; Days that do not count: Certain students, teachers, diplomats, medical stays, transit; Closer connection exception: Form 8840, if under 183 days this year; Treaty tie-breaker: Form 8833 with Form 1040-NR.KEY FACTS AT A GLANCEResident or non-resident for UStax: the substantial presence testMinimum this year31 days in the USThree-year count183 days, weightedWeightingAll days this year, 1/3 of last year, 1/6 ofthe year beforeDays that do not countCertain students, teachers, diplomats,medical stays, transitCloser connection exceptionForm 8840, if under 183 days this yearTreaty tie-breakerForm 8833 with Form 1040-NRChecked against official sourcesTax Bakers
Key facts at a glance, as set out in this guide.

Why does residency matter?

A US resident for tax is taxed on worldwide income and files Form 1040. A non-resident is taxed only on US-source income and income effectively connected with a US business, and files Form 1040-NR where required. For foreign owners of US companies, the difference can be large.

There are two ways to become a US resident for tax: holding a green card, or meeting the substantial presence test. This guide covers the second.

How does the test work?

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

  1. At least 31 days during the current year, and

    Any part of a day counts as a day, with the exceptions below.

  2. At least 183 days over the three-year period

    Counting all days in the current year, one-third of the days in the previous year, and one-sixth of the days in the year before that.

What does the count look like?

Example AExample B
Days in the US in 2026120150
Days in 2025 (counted at one-third)60, counting 20120, counting 40
Days in 2024 (counted at one-sixth)90, counting 1560, counting 10
Weighted total155200
Resident for 2026 under the test?NoYes, unless an exception applies

Which days do not count?

  • Days as an exempt individual, such as certain students on F or J visas, teachers and trainees on J visas, and foreign government officials. They file Form 8843.
  • Days you intended to leave but could not because of a medical condition that arose in the US.
  • Days in transit between two foreign points, if you were in the US for less than 24 hours.
  • Days commuting to work in the US from a home in Canada or Mexico, if you commute regularly.

What is the closer connection exception?

If you were in the US fewer than 183 days in the current year, have a tax home in another country for the whole year, and have a closer connection to that country than to the US, you can be treated as a non-resident even though you meet the test. Claim it by filing Form 8840 by the due date of your return. Factors include where your home, family, belongings, bank accounts, business and driving license are.

Can a tax treaty override the test?

Many US tax treaties include tie-breaker rules for people treated as residents of both countries, looking at where you have a permanent home, your centre of vital interests and your habitual abode. If the treaty makes you a resident of the other country, you can be taxed as a US non-resident, filing Form 1040-NR with Form 8833 to disclose the treaty position.

What does this mean for LLC owners?

Owners who visit the US often for their business should count days each year. Crossing the line can make worldwide income taxable in the US and change the reporting for foreign accounts. Time in the US working for your LLC can also create a US trade or business, a separate question. See what counts as a US trade or business.

New US residents who receive large gifts from family abroad may need Form 3520, and those with foreign accounts should see FBAR vs Form 8938.

Once you become resident, see your first US tax return after moving to the US.

Close to the 183-day line?

We count your days, check the exceptions and treaty position, and tell you which return to file.

Questions people ask

What is the substantial presence test?

The IRS test for US tax residence based on days: at least 31 days this year, and 183 weighted days over three years.

How are days counted for the substantial presence test?

All days in the current year, one-third of days in the previous year, and one-sixth of days in the year before that.

Can I be in the US for 183 days and still be a non-resident?

If you were in the US fewer than 183 days in the current year, the closer connection exception on Form 8840 or a treaty tie-breaker can keep you a non-resident.

Do student days count towards the test?

Days as an exempt individual, including certain F and J visa students, generally do not count.

Sources

Every fee, date and rule on this page was taken from these official and primary sources.

  1. IRS: Substantial presence test
  2. IRS Publication 519: U.S. Tax Guide for Aliens
  3. IRS: Form 8840, Closer Connection Exception Statement for Aliens
  4. IRS: Form 8843, Statement for Exempt Individuals
  5. Internal Revenue Code section 7701(b): definition of resident alien

Rules and fees change. If you are reading this long after September 30, 2026, confirm the figures with the source before you rely on them.

More in Foreign-owned and non-resident companies

This guide is general information. It is not tax or legal advice for your situation.