FREE TOOL
Substantial Presence Test calculator
Enter the number of days you were physically present in the US in each of the last three years. The calculator applies the IRS weighting and tells you whether you meet the test. Everything runs in your browser.
How the Substantial Presence Test works
You are treated as a US resident alien for tax purposes if you meet both of these tests for the year:
- 31-day test: at least 31 days present in the current year, and
- 183-day weighted test: a weighted total of at least 183 days, counting all current-year days, plus one-third of last year's days, plus one-sixth of the days two years ago.
The weighting is why far fewer than 183 actual days can trigger it. The IRS's own example: 120 days in each of three years works out to 120 + 40 + 20 = 180 weighted days, which does not meet the test. Any part of a day present counts as a full day.
Important limits of this calculator
- It counts the raw day totals you enter. Some days do not count at all: regular commuter days from Canada or Mexico, days in transit under 24 hours, days as a crew member, and days you could not leave for a medical condition that arose in the US. Subtract those before entering your totals.
- Days as an “exempt individual” (certain F, J, M, Q, A, and G visa holders) are excluded entirely and have their own rules.
- Even if you meet the test, the closer-connection exception (Form 8840) may let you remain a nonresident if you had fewer than 183 actual current-year days and a tax home abroad.
Not tax advice. Residency is fact-specific and this tool cannot account for every exclusion. Confirm your situation with a qualified advisor.
Source: IRS, Substantial Presence Test.
Not sure how many days you actually spent here?
SpyglassBeacon counts your US days automatically, so next year's number is already done.
Get the app