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.
Frequently asked questions
How is the Substantial Presence Test calculated?
You generally meet the SPT if you were physically present in the US for at least 31 days in the current year and your weighted total is 183 days or more. The weighted total counts all of your current year days, plus one third of your prior year days, plus one sixth of your days from two years prior. Meeting the test generally makes you a US tax resident, taxable on worldwide income.
Is 120 days per year in the US enough to trigger the Substantial Presence Test?
Generally no, if the pattern holds at 120 days for three straight years. The weighted total works out to 120 plus 40 plus 20, or 180 days, which is just under the 183 threshold. Increasing the current year to 150 days pushes the total to 210 and would typically trigger the test.
What is the closer connection exception to the SPT?
Even if you meet the SPT, you can generally claim the closer connection exception by filing Form 8840, provided you were present in the US fewer than 183 days in the current year, maintain a tax home in a foreign country, and have a closer connection to that country than to the US. The IRS routinely asks for proof of physical presence outside the US, and the burden of proof is on you.
Who is exempt from the Substantial Presence Test?
Certain categories can exclude their US days entirely: foreign government related individuals on A or G visas, teachers or trainees on J or Q visas, students on F, J, M, or Q visas (generally limited to 5 calendar years), professional athletes at charitable sports events, and people who could not leave the US because of a medical condition that arose while there.
What happens if I'm a tax resident of both the US and another country?
Most US tax treaties contain a tie-breaker provision for dual residents. It generally looks at your permanent home, center of vital interests, habitual abode, and citizenship, in that order, and each step requires evidence. Day count records are foundational to that analysis.