Clear pricing, quoted before any work begins. Book a free fit call.

Cross-Border Tax (U.S.–Canada)

The Substantial Presence Test: How the Weighted 183-Day Formula Works, Which Days Don't Count, and Where the Exceptions Are

Reviewed by the Fairlight Accounting cross-border tax team — U.S. & Canadian Tax Desks

On this page

Short version: Substantial Presence Test: How Days Make You a U.S. Resident

The substantial presence test is the rule that turns a visitor into a US tax resident, and it is misunderstood because it is not a 183-day rule in the simple sense. It counts 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, and it is met when the total reaches 183 and the current year has at least 31. A person who spends 122 days a year in the US for three years meets it. The test has exclusions for certain visa holders, commuters, medical conditions, and transit; an exception for people with a closer connection to another country; and a treaty override. Getting the count right is the first step in every cross-border file.

Key takeaways

  • The formula: at least 31 days in the current year, and 183 or more when adding all current-year days, one-third of prior-year days, and one-sixth of days in the second prior year. Any part of a day counts as a day.
  • Excluded days: days as an exempt individual (foreign government employees, teachers and trainees on J or Q visas for two years, students on F, J, M, or Q visas for five years, professional athletes at charitable events); days a regular commuter from Canada or Mexico spends in the US on workdays if they return home the same day on more than 75% of workdays; days in transit under 24 hours; days unable to leave because of a medical condition that arose in the US.
  • Residency start date: in the year the test is first met, residency begins on the first day of presence in that year (subject to a de minimis exclusion of up to 10 days with a closer connection to another country).
  • Closer connection exception: a person who meets the test but is present fewer than 183 days in the current year, has a tax home in another country, and has a closer connection to it can remain a non-resident by filing Form 8840.
  • Treaty tie-breaker: a person who meets the test and is also a Canadian resident can be assigned to Canada under the treaty tie-breaker in Article IV, filing a 1040-NR with Form 8833.

Counting

Count every calendar day on which the person was physically present in the US at any time, including arrival and departure days. Multiply the prior year's count by one-third and the year before that by one-sixth, and add. A person with 130, 120, and 110 days over three years has 130 + 40 + 18.3 = 188.3 in the current year: test met. A person with 120, 120, and 120 has 120 + 40 + 20 = 180: not met. A person with 200 days in the current year alone meets it on the current year.

The 31-day minimum in the current year means a person with zero days this year is not a resident under the test regardless of prior years.

The exclusions

Exempt individuals. Days do not count for a teacher or trainee on a J-1 or Q visa for any part of two calendar years out of the current and six preceding (with a four-of-six lookback limit), a student on an F-1, J-1, M-1, or Q visa for five calendar years (with a facts-and-circumstances extension), a foreign government or international organization employee on an A or G visa, and a professional athlete competing in a charitable sports event. Form 8843 must be filed annually to claim exempt status.

Commuters. A resident of Canada (or Mexico) who commutes to work in the US and returns home the same day on more than 75% of the workdays in the period does not count those commuting days. Windsor-Detroit and Vancouver-Blaine commuters rely on this.

Transit. Days in the US for fewer than 24 hours while in transit between two foreign points.

Medical condition. Days a person was unable to leave the US because of a medical condition or problem that arose while in the US (not a pre-existing condition the person came to treat). Form 8843 documents it.

The first year

When the test is met for the first time in a year, the person is a US resident from the first day of presence in that year, not from the day the count crossed 183. A Canadian who visited in February and moved in June is resident from February, unless the February visit qualifies for the de minimis rule (up to 10 days of presence during which the person had a closer connection to Canada). The year is a dual-status year; the pre-residency period is filed as a non-resident. The residency start date also starts the FBAR and Form 8938 obligations and the TFSA exposure.

The closer connection exception

A person who meets the test but was present fewer than 183 days in the current year, maintains a tax home in a foreign country for the full year, and has a closer connection to that country (home, family, belongings, social and economic ties, licences, voting) can elect to remain a non-resident by filing Form 8840 by the 1040-NR due date. The exception is unavailable to anyone who has applied for a green card. Snowbirds at 120 to 150 days a year rely on it.

The treaty tie-breaker

A person who meets the substantial presence test and is also a resident of Canada under Canadian rules is a dual resident, and Article IV(2) assigns them to one country (permanent home, centre of vital interests, habitual abode, citizenship). A person assigned to Canada files a 1040-NR with Form 8833 and is a non-resident for US income tax, though certain reporting obligations (and, for green card holders, the expatriation risk) attach.

Visa interaction

The test applies regardless of visa. H-1B, L-1, TN, O-1, and E-2 holders count every day; they become residents in the year the count is met. F-1 students and J-1 teachers are exempt individuals for their exempt years and non-residents until the exemption expires. Green card holders are residents under the green card test regardless of days. Visitors without status (Canadians entering visa-free) count every day.

Worked example

A Calgary retiree spent 140 days in Palm Springs in 2024, 150 in 2025, and plans 160 in 2026. Her daughter, a US citizen, is considering sponsoring her.

  • 2024. 140 + (prior years' weighted days) likely under 183 if earlier years were shorter; assume not met.
  • 2025. 150 + 47 + (2023 days ÷ 6): if 2023 was 130 days, 150 + 47 + 22 = 219. Test met; 2025 is a US resident year unless she claims the closer connection exception (fewer than 183 current-year days; Calgary tax home; closer connection to Canada). Form 8840 by June 15, 2026.
  • 2026. 160 + 50 + 23 = 233. Met again; Form 8840 again.
  • Sponsorship. If the daughter files an I-130, the closer connection exception is unavailable from that year; the retiree would be a US resident under the test unless the treaty tie-breaker assigns her to Canada (permanent home in Calgary; Form 8833 on a 1040-NR).
  • Alternative. Keep 2026 to 120 days: 120 + 50 + 23 = 193, still met; keep it to 100: 100 + 50 + 23 = 173, not met, no Form 8840 needed.

Official sources

"You will be considered a United States resident for tax purposes if you meet the substantial presence test for the calendar year. To meet this test, you must be physically present in the United States (U.S.) on at least: 31 days during the current year, and 183 days during the 3-year period that includes the current year and the 2 years immediately before that." — Internal Revenue Service, Substantial Presence Test, https://www.irs.gov/individuals/international-taxpayers/substantial-presence-test

To claim the closer connection exception, you must have "Were present in the United States less than 183 days during the year, and Had a closer connection during the year to one foreign country in which you had a tax home than to the United States." "You must file Form 8840, Closer Connection Exception Statement for Aliens, to claim the Closer Connection Exception." — Internal Revenue Service, Closer Connection Exception to the Substantial Presence Test, https://www.irs.gov/individuals/international-taxpayers/closer-connection-exception-to-the-substantial-presence-test

Practitioner note

The substantial presence test is arithmetic, and we do the arithmetic for the prior three years on every file before anything else, because the answer decides which year the US filings began. Snowbirds who were told 'six months' are surprised that four months for three winters was enough. The fix is Form 8840 every year, and a day budget that keeps the weighted count under 183 when the green card question arises.

See also: Planning a move? Start with the Canada-to-US tax checklist and browse every corridor by city, province, and state.

Next step

Fairlight prepares the three-year day count and residency start determination, Form 8840 or the treaty tie-breaker where applicable, and the first-year returns that follow. See cross-border pricing or book a call.

Cross-border taxes, handled in one place

U.S. and Canadian filings prepared together by our U.S. and Canadian Tax Desks.

Book a free fit call

Have a question about Cross-Border Tax (U.S.–Canada)?

Book a free consultation and get a straight answer from our cross-border tax team — no obligation.