REFERENCE
The Substantial Presence Test, explained
The Substantial Presence Test is how the IRS decides that a non-citizen has spent enough days in the US to be taxed as a resident alien, meaning taxed on worldwide income. It is pure day-count arithmetic, it catches people by surprise because of its three-year memory, and it is checked against records, not intentions.
The formula
You meet the test for a calendar year if both are true:
- You were in the US at least 31 days during the current year, and
- Your weighted total reaches 183: all of this year's US days + 1/3 of last year's + 1/6 of the year before's.
The IRS's own example: 120 days in each of the last three years. That is 120 + 40 + 20 = 180, three short of the line, so the test is not met. This is why the folk rule of thumb is "about 120 days a year is sustainable": at that steady pace the weighted total never reaches 183. Any part of a day in the US generally counts as a full day. The table below shows the same arithmetic across four different real-world patterns.
Four patterns, worked out
The weighting means the same three-year total can pass or fail depending on when the days fell. Four common patterns, in full:
| Pattern | This year | Last year (×1/3) | 2 years ago (×1/6) | Weighted total | Meets SPT? |
|---|---|---|---|---|---|
| Steady long-term visitor | 120 | 120 → 40 | 120 → 20 | 180 | No — 3 short |
| Snowbird who traveled more this year | 150 | 90 → 30 | 60 → 10 | 190 | Yes — 7 over |
| First year in the US, arrived mid-year | 200 | 0 → 0 | 0 → 0 | 200 | Yes — this year alone clears 183 |
| Tapering off after two heavy years | 60 | 150 → 50 | 150 → 25 | 135 | No — well under |
All four patterns clear the separate 31-day-this-year gate, so the weighted total is what decides each one. Note the third row: a single busy first year can trigger the test on its own, with no history at all — the three-year lookback only matters once you have prior years to weight.
Run your own numbers
Days that don't count
The test has carve-outs, and they matter: days as an exempt individual (F and J students within their exempt years, teachers and trainees on J/Q visas), days you were unable to leave because of a medical condition that arose in the US, regular commuter days from Canada or Mexico, days in transit between two foreign points for under 24 hours, and days as vessel crew. Exempt individuals file Form 8843 to claim the exclusion.
Exempt individuals: how long each visa is exempt
An "exempt individual" does not mean tax-exempt; it means the days on that visa do not count toward the Substantial Presence Test at all, for a set window. The windows differ sharply by visa:
| Visa / status | Days exempt from the count |
|---|---|
| F-1 / M-1 student (and F-2/M-2 dependents) | First 5 calendar years of presence (a lifetime limit, counting any prior year on an F/J/M/Q status). |
| J-1 / Q student | First 5 calendar years, on the same lifetime basis as F-1. |
| J-1 / Q teacher, trainee, or scholar (non-student) | 2 calendar years out of the current plus prior 6 years. |
| A or G visa (foreign-government related) | Exempt while in that status (immediate family included). |
After the window closes, the days start counting normally. To claim exempt status for a year you file Form 8843, even if you owe no tax and file nothing else. A student who wants to keep excluding days beyond 5 years must show they do not intend to reside in the US permanently.
Two escapes if you meet the test
The closer connection exception (Form 8840): if your current-year actual days were under 183, your tax home is in another country, and your connections there are closer, you can be treated as a nonresident anyway. This is the annual filing many Canadian snowbirds rely on; run the numbers with the Form 8840 calculator. Treaty tie-breakers: if your country has a tax treaty with the US, its residence article can assign you to the other country even when the SPT is met, with its own filing mechanics.
The first-year choice: electing residency early
The reverse problem also comes up: you don't meet the SPT this year but you will next year, and you want to be treated as a resident for part of this year (often to file jointly with a resident spouse or claim certain deductions). The first-year choice election under IRC §7701(b)(4) allows it, if all of these hold:
- You are not a resident for the current year and were not one for the prior year;
- You meet the Substantial Presence Test in the following year;
- You are present at least 31 days in a row in the current year; and
- You are present at least 75% of the days from the start of that 31-day period through December 31 (up to 5 days of absence are ignored).
If you qualify, your residency starting date is the first day of that 31-day period, not January 1, so you become a dual-status filer for the year. You make the election by attaching a signed statement to your Form 1040, and because you must first meet the SPT in the following year, you often have to file for an extension and wait before you can make it. It is optional: weigh it against staying a nonresident for the year.
Not the same as a state's 183-day rule
The SPT is a federal test, and it is commonly mixed up with a state's statutory-residency threshold, but they answer different questions and run independently. A state (New York, California, and others) counts your actual days physically present in that state over a single calendar year; more than 183 (184+) plus a home there can make you a full-year state resident, regardless of your federal status. The SPT counts your days anywhere in the US as a whole over a weighted three-year window and decides federal tax residency, not state. You can meet one, both, or neither — a person who splits time between New York and Canada can clear the federal SPT on total US days while never crossing New York's own 183-day line, or the reverse. See the 183-day state rule calculator to check the state test separately.
What meeting the test means
Resident-alien status: US tax on your worldwide income for the residency period, regular graduated rates, and the associated information-reporting obligations. The year you first meet the test is typically a dual-status year, split between nonresident and resident periods, with its own start-date rules. See resident alien vs. nonresident alien for what changes.
The record problem
Every branch of this test consumes one input: your actual US days, per year, for three years. People reconstruct them from passport stamps and memory, and border records disagree with both. SpyglassBeacon counts US days automatically as you live them, keeps the three-year history the weighted formula needs, and exports a timestamped day-by-day record.
Frequently asked questions
What is the Substantial Presence Test in one sentence?
The IRS rule that makes a non-citizen a US tax resident when this year's US days plus a third of last year's plus a sixth of the year before's reach 183, with at least 31 days this year.
Do partial days count?
Generally yes: any part of a day present in the US counts as a full day, with narrow exceptions like sub-24-hour transit between foreign points.
I meet the test. Am I stuck?
Not necessarily: under 183 actual current-year days with a foreign tax home and closer connection, Form 8840 keeps you a nonresident. Treaty tie-breakers are the other route.
How many US days a year are sustainable?
A steady pace of about 120 days a year keeps the weighted total just under 183 indefinitely. The calculator above shows your exact current-year maximum.
Is the SPT the same as a state's 183-day rule?
No. The SPT is federal, runs on days anywhere in the US weighted over three years, and decides federal tax residency. A state's 183-day rule counts actual days in that one state over a single year and decides state tax residency. The two run independently.
Not tax advice. Exempt-day categories, treaties, and dual-status mechanics are fact-specific. Confirm your situation with a qualified adviser.
Source: IRS, Substantial Presence Test. Related: SPT calculator · Canadian snowbirds · Resident vs. nonresident alien
Three years of US days, counted for you
Beacon keeps the automatic, timestamped day record the weighted test runs on.
Get the app