The Substantial Presence Test, calculated step-by-step
The IRS Substantial Presence Test (SPT) is a 3-year weighted formula that determines whether non-citizens are US tax residents. Here's the formula, exemptions, and how to calculate it correctly.
If you're a non-citizen physically present in the United States, the IRS uses the Substantial Presence Test (SPT) to decide whether you're a tax resident. Pass the test, and the US taxes your worldwide income. The formula is a 3-year weighted average — and it catches more people than they realize.
The SPT formula
You meet the Substantial Presence Test for the current calendar year if both are true:
- You were physically present in the US at least 31 days during the current year, AND
- Your weighted total is 183 days or more:
(current-year days) + (1/3 × prior-year days) + (1/6 × two-years-prior days).
A worked example
Suppose you spent 120 days in the US in 2026, 120 days in 2025, and 120 days in 2024. Your weighted total:
- 2026: 120 days × 1 = 120
- 2025: 120 days × 1/3 = 40
- 2024: 120 days × 1/6 = 20
- Total: 180 days — under 183, so you do not meet the SPT.
Now suppose you stay 150 days in 2026 instead. Total: 150 + 40 + 20 = 210. You meet the SPT and the IRS treats you as a US tax resident — taxable on worldwide income.
Exempt individuals: who's outside the SPT
Some categories of people get to exclude their US days entirely. These include:
- Foreign government-related individuals (A or G visa).
- Teachers or trainees on a J or Q visa (limited).
- Students on F, J, M, or Q visas (limited to 5 calendar years).
- Professional athletes temporarily in the US for charitable sports events.
- Individuals who couldn't leave the US due to a medical condition that arose while in the US.
The closer-connection exception
Even if you meet the SPT, you can claim the closer connection exception by filing Form 8840 if you:
- Were present in the US for fewer than 183 days in the current year, AND
- Maintain a tax home in a foreign country, AND
- Have a closer connection to that foreign country than to the US.
Closer-connection requires day-count records. The IRS routinely asks for proof of physical presence outside the US, and the burden is on you. Tax Days exports an SPT-ready PDF for exactly this.
Treaty tie-breakers
If you're a tax resident of both the US (under the SPT) and another country, most US tax treaties contain a tie-breaker provision. They look at: permanent home, center of vital interests, habitual abode, citizenship — in that order. Each step requires evidence; day counts are foundational.
How to track for the SPT
Tax Days runs the full 3-year weighted SPT calculation in real time. Add a US trip and the app updates your current-year, prior-year, and two-years-prior weights instantly. Notifications fire 30, 14, 7, 3, and 1 days before you'd cross 183 weighted days.