What the Substantial Presence Test decides
The Substantial Presence Test is the mechanical day-count in
IRC §7701(b)(3) that decides whether a non-citizen is a
US tax resident for a calendar year. The stakes are high: a US tax
resident is taxed on worldwide income, must report foreign bank accounts on an
FBAR, and may face FATCA reporting on foreign assets. A non-resident is generally
taxed only on US-source income.
Crucially, this has nothing to do with immigration status. You can be perfectly lawful on a tourist visa and still become a US tax resident purely by spending too many days in the country.
The formula
You meet the test for a year if both conditions hold:
The 31-day condition is a gate. If you were in the US for fewer than 31 days this year, you cannot meet the test no matter how much time you spent in the two prior years.
The 183 figure is a weighted total, not a count of actual days. This is the most misunderstood part of the rule. You do not need to spend 183 days in the US this year — with enough history, 122 days can be sufficient.
A worked example
The IRS uses this example in Publication 519. Suppose you were present 120 days in each of three consecutive years:
180 is below 183, so you do not meet the test — despite spending a third of every year in the US for three years running. Add just three more days to the current year and the total reaches 183 exactly, and you do.
That razor-thin margin is why this calculator shows every line of the arithmetic. Near the boundary, the difference between the right answer and the wrong one is often a rounding decision: the fractions must be carried through and summed, not rounded off term by term. Truncating each line separately can report "not met" when the exact total is exactly 183.
Exempt individuals
Some people's days do not count at all. While the exemption applies, you can spend the entire year in the US without accruing a single day toward the test:
- Student on an F, J, M or Q visa. Generally exempt for five calendar years. Any part of a year counts as a full year. The five-year limit can be extended if you can show you do not intend to reside permanently in the US.
- Teacher or trainee on a J or Q visa. Generally exempt for two of the previous six calendar years. The lookback makes this harder to self-assess than the student rule.
- Foreign government-related individual (A or G visa). Exempt for as long as the status applies, with no year limit. A-3 and G-5 personal employees are not covered.
- Professional athlete at a charitable sports event. Only days of competition in a qualifying charitable event are excluded, not training or travel days.
- Unable to leave due to a medical condition that arose in the US. Days you intended to leave but could not because of a condition that arose while you were here. Requires Form 8843 and a physician statement.
Two warnings. First, the year limits are not as clean as they look — the student five-year limit counts any part of a calendar year as a whole year, and the teacher limit looks back over six years. Second, exempt individuals still have a filing obligation: Form 8843 must be filed even with no US income. Missing it can cost you the exemption.
The Closer Connection Exception
Meeting the test is not always the end of the story. Under the Closer Connection Exception you may still be treated as a non-resident if all three hold: you were present fewer than 183 actual days in the current year, you maintained a tax home in a foreign country for the whole year, and you had a closer connection to that country than to the US.
The actual-days condition is absolute. If you were physically in the US for 183 or more days this year, the exception is unavailable regardless of how strong your foreign ties are. That is why this calculator distinguishes your actual current-year days from your weighted total, and only offers the exception when it could genuinely apply. It is claimed on Form 8840, and the "closer connection" assessment weighs where your home, family, belongings, banks, licences and voting registration are.
Common mistakes
- Assuming 183 means 183 days this year. It is a three-year weighted figure. Many people meet the test on far fewer current-year days.
- Counting excluded days. Regular commuting days from Canada or Mexico, transits under 24 hours, days as a foreign vessel crew member, and days you could not leave for medical reasons that arose in the US all fall outside the count. Subtract them before entering your figures.
- Forgetting part-days count. Any part of a day present in the US is a full day, so arrival and departure days both count.
- Treating the test as decisive. A tax treaty tie-breaker can override it, and the first and last years of residency have their own rules producing dual-status returns.
- Ignoring the green card test. Lawful permanent residents are US tax residents regardless of days. This test only matters if you do not hold a green card.
What happens if you meet it
You are generally taxed as a US resident for the full calendar year, reporting worldwide income on Form 1040. You may need to file an FBAR if your foreign accounts exceeded $10,000 at any point, and Form 8938 under FATCA above higher thresholds. Penalties for non-filing are severe and are assessed per account and per year.
If you are also tracking days for immigration rather than tax purposes, the Schengen 90/180 calculator covers the European rolling window, and the tax residency day tracker checks a single trip log against thresholds in more than a dozen countries at once.