The Substantial Presence Test: How the 183-Day Formula Works
The substantial presence test is the formula the IRS uses to determine whether a non-citizen without a green card is a US tax resident. It is not a simple 183-day-per-year rule, despite how it is commonly described. The test uses a weighted count across three years: all the days in the current year, one-third of the days in the prior year, and one-sixth of the days two years back. If that weighted total reaches 183 or more, and you were physically present in the US for at least 31 days in the current year, you are a US tax resident for the current year under IRC 7701(b)(3).
A Canadian who spends 120 days per year in the US every year will meet the substantial presence test: 120 + (120 / 3) + (120 / 6) = 120 + 40 + 20 = 180, which is under the threshold. But 122 days per year crosses it: 122 + 40.67 + 20.33 = 183. The margin is that thin. The closer connection exception (Form 8840) and the treaty tiebreaker (Article IV of the Canada-US tax treaty) are the two escape routes if you cross the line, and both require affirmative filings.
How does the formula work?
The substantial presence test under IRC 7701(b)(3) has two requirements, both of which must be met:
Requirement 1: You were physically present in the US for at least 31 days during the current calendar year.
Requirement 2: The sum of the following reaches 183 or more:
- All days present in the current year (weighted at 1)
- Days present in the first preceding year (weighted at 1/3)
- Days present in the second preceding year (weighted at 1/6)
A “day of presence” means any day you are physically in the US, even for a few hours. There are narrow exceptions: days you are in transit between two foreign countries (and are in the US for fewer than 24 hours), days you cannot leave due to a medical condition that arose in the US, days you are a crew member of a foreign vessel, days you are an exempt individual (foreign government, teacher/trainee under J/Q visa, or student under F/J/M/Q visa, subject to separate limits), and days you commute to work from Canada or Mexico on a regular basis.
The formula means that a Canadian snowbird who spends 4 months (roughly 120 days) per year in Florida over several consecutive years is right at the edge. Any variation in the pattern (a longer stay one year, an extra trip for a family event) can push the weighted count over 183.
What counts as a day of presence?
The IRS counts any part of a day as a full day. If you fly into Miami at 11 PM and fly out the next morning, that is two days of presence: the arrival day and the departure day. The IRS does not prorate partial days, and there is no minimum number of hours. The day you enter and the day you leave both count.
Specific rules for common situations:
- Same-day border crossings. A Canadian who drives to Buffalo for a shopping trip and returns the same evening counts one day of presence.
- Layovers. If you have a connecting flight through a US airport and do not leave the international transit area, the IRS position is that you are not “in the US” for this purpose. But if you clear customs (which happens at most US airports, since the US does not have a sterile transit zone for most passengers), the day counts.
- Cruises departing from US ports. The embarkation and disembarkation days count. Days at sea or in foreign ports generally do not, unless the ship is in US territorial waters.
- Medical emergencies. If you cannot leave the US because of a medical condition that arose while you were in the US, those days can be excluded, but only if you can show you intended to leave and were unable to. You need documentation (medical records, a letter from the physician). The exclusion does not apply if the medical condition existed before you entered the US.
What happens if I meet the test?
If you meet the substantial presence test and do nothing, the IRS treats you as a US tax resident for that calendar year. That means you owe US federal income tax on your worldwide income (not just US-source income), and you are subject to the same filing obligations as a US citizen, including FBAR, Form 8938, and all other information returns. For a Canadian who is also a Canadian tax resident, this creates a dual-residency problem that requires the treaty tiebreaker to resolve.
- Accidentally meeting the test without filing the proper exceptions lets the IRS assess tax on your worldwide income.
- Failure-to-file penalties apply: 5% per month, up to 25%.
- If you did not know you were supposed to file, the streamlined filing procedures may be available to come into compliance without penalties, though the compliance cost is significant.
How do I avoid US tax residency?
Two exceptions let you avoid US tax residency even if you meet the 183-day weighted count:
- Exception 1: The closer connection exception (Form 8840). If you were present in the US for fewer than 183 days in the current year (the unweighted count, just the current year) and you have a “tax home” in a foreign country and a “closer connection” to that country than to the US, you can file Form 8840 to claim the exception. The form is due with your tax return (or by the due date, including extensions, of a 1040-NR). The IRS looks at where your permanent home is, where your family lives, where your personal belongings are, where your bank accounts are, where your driver’s license is issued, where you vote, and where your social and professional organizations are based. For most Canadian snowbirds, the closer connection is clear, but the form must be filed every year.
- Exception 2: The treaty tiebreaker (Article IV). Even if you meet the substantial presence test and cannot use the closer connection exception (because you were present 183 or more days in the current year, unweighted), the Canada-US tax treaty Article IV tiebreaker can resolve the dual residency in your favor. The tiebreaker looks at permanent home, centre of vital interests, habitual abode, and citizenship, in that order. If the tiebreaker resolves you as a Canadian resident, you file a US nonresident return (1040-NR) with Form 8833 disclosing the treaty-based position. This is the fallback when the closer connection exception does not apply.
The critical difference: Form 8840 is simpler and avoids the treaty disclosure entirely, but it requires fewer than 183 actual days in the current year. The treaty tiebreaker works even if you exceeded 183 actual days but is a more aggressive filing position.
Does the test apply to green card holders?
No. Green card holders are US tax residents under the “lawful permanent resident” test (IRC 7701(b)(1)(A)(i)), regardless of how many days they spend in the US. The substantial presence test is relevant only for individuals who are neither US citizens nor green card holders. If you have a green card and live primarily in Canada, you are a US tax resident for as long as the green card is valid (or until you formally abandon it by filing Form I-407 with USCIS), and the day count is irrelevant.
- This is a common confusion for Canadians who held a green card years ago and assumed it expired.
- Green cards do not expire for tax purposes in the same way they expire for immigration purposes.
- Even a lapsed green card can leave you as a US tax resident until you formally abandon it.
- The giving up green card guide covers the process and the exit tax implications.
What about the first and last year?
The substantial presence test applies on a calendar-year basis. In the first year you enter the US (whether for work on a TN visa, a transfer, or a permanent move), you may be a nonresident for part of the year and a resident for the rest. IRC 7701(b)(2)(A) allows a “first-year election” to be treated as a resident starting from the first day of presence in the US, which simplifies the return (one Form 1040 instead of a dual-status return).
- In the last year (when you leave the US permanently), the treaty tiebreaker typically resolves you as a non-US resident from the date of departure. The departure year return covers the period of US residency, and the remaining months are covered by Canadian filing obligations only.
- For snowbirds who visit every year, there is no “first year” or “last year” complexity. The test runs every calendar year independently (using the prior two years’ weighted days), and Form 8840 is filed annually.
How should I track my days?
Keep a log. The IRS does not require a specific format, but a dated record of entry and exit is the evidence that matters if the day count is questioned. Canadian passport stamps, boarding passes, credit card transactions, and cell phone records all serve as backup. The CBP I-94 record is the official record of your entries and exits by air, and it can be downloaded online.
-
For land crossings (which account for most Canadian snowbird travel), the I-94 system does not consistently record departures.
-
Canada and the US share entry data, so a Canadian entry into Canada is recorded as a US departure, but the matching is not always immediate.
-
A personal log with dates, border crossing used, and method of travel is the best protection.
-
Snowbird and the Florida condo: does buying change your taxes?
The Cross-Border Assessment is a fixed $250. You get a written, CPA-reviewed analysis of your day count, whether you need Form 8840 or a treaty tiebreaker, and what filings you owe.
One or two plain-English guides a week on US-Canada tax. No spam, unsubscribe anytime.
Done. The next guide will land in your inbox.
Yarik Yarosh, CPA. "The Substantial Presence Test: How the 183-Day Formula Works." Blue Cloud CPA, August 30, 2026. https://bluecloudcpa.com/guides/substantial-presence-test-formula-days-count
This guide is general information, not tax advice for your specific situation. Which points apply, and how, depends on your facts.