How the calculation works
You meet the substantial presence test for a calendar year if you were physically present in the United States on at least 31 days during that year and the weighted total of days over the 3-year period that includes that year and the 2 years before it is at least 183. If you meet both, you are a resident alien for tax purposes for that year, unless an exception applies.
| Year | Days counted | Example with 120 days each year |
|---|---|---|
| Current year | All days | 120 |
| First year before | One-third of the days | 40 |
| Second year before | One-sixth of the days | 20 |
| Total | 180 (below 183) |
What counts as a day
Any day you are physically present in the United States counts, even part of a day. Exempt individual days and a few other days are not counted. Enter them in the optional fields above and the calculator subtracts them; see the guide on days that do not count. Trips entered as dates count both the arrival day and the departure day.
If you exclude days as an exempt individual or because of a medical condition, you file Form 8843 for them. The IRS describes the full rules in Publication 519.
Updated: November 4, 2026