Most people who know about the Substantial Presence Test think they understand it. They've heard "183 days," and they've built their travel plans around that number.
They're working with incomplete information. The IRS knows it.
The Substantial Presence Test (SPT) is not a 183-day rule. It's a weighted, three-year formula that counts a fraction of your previous years' US presence toward your current-year total. The result is that you can spend fewer than 183 days in the US this year and still be considered a US tax resident if you were here enough in the years before.
Who the Substantial Presence Test Applies To
The SPT applies to non-US citizens and non-green-card holders who spend time in the United States. If you're a foreign national, a visa holder, or a US expat who has formally abandoned US residency, the SPT determines whether the IRS will treat you as a US resident for tax purposes in a given calendar year.
US citizens and green-card holders are taxed on worldwide income regardless of where they live. The SPT doesn't apply to them.
If the SPT applies to you and you meet its threshold, you're treated as a US resident for that tax year. That means filing as a resident (Form 1040), reporting worldwide income, and losing access to certain treaty benefits that apply only to non-residents.
The Actual Formula
To meet the Substantial Presence Test, you must be present in the United States for at least 31 days during the current year, and the sum of the following must equal or exceed 183 days:
- All days present in the current year (counted at full value: 1 day = 1 day)
- Days present in Year 1 (the prior year), counted at 1/3 value (1 day = 0.333 days)
- Days present in Year 2 (two years prior), counted at 1/6 value (1 day = 0.167 days)
So if you spent 120 days in the US this year, 90 days last year, and 60 days two years ago, the calculation looks like this:
- Current year: 120 x 1 = 120.0
- Prior year: 90 x 1/3 = 30.0
- Two years ago: 60 x 1/6 = 10.0
- Total: 160.0 days
You do not meet the SPT. But spend 130 days this year instead of 120, and your total hits 170. Add 20 more days two years ago and you're at 173.3. Still clear.
Now add a trip you forgot to count. Or a day you miscategorized. You've crossed the threshold and the IRS considers you a US tax resident for the year.
This is what makes the SPT dangerous for people who track their days loosely. The formula amplifies small errors. A few forgotten days from two years ago can change your tax status.
What Counts as a "Day" for SPT Purposes
The IRS defines a day of presence as any day you are physically present in the United States at any point. Arrival and departure days each count, with one exception: if you are in the US for fewer than 24 hours while traveling between two foreign countries, that transit day does not count.
Several categories of days are excluded from the SPT count. Days present under diplomatic or government visa categories (A and G visas in most cases) don't count, nor do days present as a teacher or trainee on a J or Q visa (subject to a 2-year exemption limit). Days present as a student on an F, J, M, or Q visa are excluded for up to five calendar years. Days you are physically unable to leave the US due to a medical condition that arose while you were in the country can be excluded, but this requires documentation and a formal filing on Form 8843.
The medical exclusion is one most people never discover until it's too late to document it. If you become ill while in the US and a doctor advises you not to travel, those days can potentially be excluded from your count.
The Closer Connection Exception
Meeting the Substantial Presence Test does not automatically make you a US tax resident if you qualify for the Closer Connection Exception.
To claim non-resident status despite meeting the SPT, all three of the following must be true: you were present in the US for fewer than 183 days in the current year; you maintained a tax home in another country throughout the year; and you have a closer connection to that foreign country than to the United States.
"Closer connection" is determined by factors including where your permanent home is located, where your family lives, where your personal and professional belongings are kept, where you participate in social and cultural activities, and where your driver's license and bank accounts are held.
To claim the exception, file Form 8840 with your US tax return. Fail to file it, and you lose the exception even if you would have qualified. The Closer Connection Exception is also unavailable if you are applying for a green card or immigrant visa, or if you spent 183 or more days in the US during the current year.
If your country has a tax treaty with the United States, there may be an additional path: treaty tiebreaker provisions can allow you to be treated as a non-resident even if you meet the SPT. This is done by filing Form 1040-NR with an attached disclosure statement referencing the applicable treaty's tiebreaker article. It comes with trade-offs. You lose certain deductions and credits available only to residents, and treaty elections must be reported carefully to avoid compliance issues.
Three Ways People Get This Wrong
They only count current-year days. The SPT requires tracking three years simultaneously. A year spent heavily in the US two years ago can come back to affect your status today. Most people don't know this until an accountant or auditor tells them.
They forget the fractional weightings. The 1/3 and 1/6 multipliers mean you're working with decimals, not whole numbers. A spreadsheet that rounds produces errors. When you're near the threshold, precise fractions matter.
They can't reconstruct their history accurately. Memory is unreliable for day counts. Airline records, hotel receipts, and entry and exit stamps are what auditors rely on. A count you can't document is a count that won't hold up. ResidencyProof is a tracking tool, not legal or tax advice, but precise contemporaneous records are the first thing a tax professional or an auditor will ask for. They're far easier to build in real time than to reconstruct later.
What Happens If You Fail the SPT, and How to Avoid It
If you meet the SPT and don't qualify for an exception, you are a US tax resident for that year. You file Form 1040, report worldwide income, and may owe US taxes on income earned entirely abroad. Foreign financial accounts exceeding $10,000 trigger FBAR reporting requirements. If prior years were missed, the IRS can assess taxes, penalties, and interest going back three to six years, longer if substantial omissions are found. Late discovery is expensive.
The SPT is manageable, but only if you're tracking it correctly across all three relevant years throughout the year, not at filing time. Know your running weighted total as you make travel decisions. Know how prior-year presence affects your current headroom before you book, not after. Keep documentation of every entry and exit: boarding passes, hotel records, entry stamps. If your SPT status is ever questioned, you need something concrete to hand over.
ResidencyProof runs the actual weighted three-year formula against your location data, tells you exactly where you stand, and alerts you before you approach the threshold. Start your free 7-day trial today.
Sarah Hartwell
US Tax Compliance Writer
Grew up in Ohio, survived eight years at the IRS in DC, then quit to work from wherever she wanted. She's lived in Lisbon, done a stint in Bangkok, and is currently based in Puerto Rico — partly for the weather, partly for Act 60. She writes about US tax rules because she knows exactly how the other side thinks.
Track your days with ResidencyProof
Turn your location history into a verified day-by-day timeline. Run the real compliance math, set threshold alerts, and build an evidence trail that holds up to scrutiny.
Start free 7-day trial