Free tool. No account.

Substantial presence test calculator.

Enter your US days for the last three years. The calculator applies the IRS weighting, one third for last year and one sixth for the year before, and shows the arithmetic line by line.

Your US days

The year you want the residency answer for.

Count only days that qualify: exclude exempt-individual days, medical-condition days, and transit under 24 hours. See the FAQ below for what does not count.

0 of 183
Waiting for input

Enter your day counts and press Calculate.


Days this year0 × 1 = 0
Days last year0 × 1/3 = 0
Days two years ago0 × 1/6 = 0
Weighted total0

Weighted total
0
Compared exactly against 183, without rounding.
More days needed
183
Current-year days still required to meet the test.

Last updated: 2026-07-13. This is not legal or tax advice. Exempt days, treaties, and elections can change the outcome, so confirm your position with a professional.

How does this calculator apply the formula?

The substantial presence test adds three numbers: all of your US days in the test year, one third of your days in the prior year, and one sixth of your days in the year before that. You meet the test when the test year has at least 31 days and the weighted total reaches 183. Meeting it generally makes you a US tax resident for that year.

Both conditions matter. With 30 days or fewer in the test year you cannot meet the test regardless of earlier years, and heavy earlier years alone cannot push you over without the 31-day minimum.

Why are the fractions not rounded?

Because rounding can flip the verdict. The IRS compares the exact sum, so 120 days this year, 120 last year, and 120 the year before gives 120 + 40 + 20 = 180, not met, while a naive counter that rounds thirds and sixths upward could show 183. This calculator keeps the fractions exact, does the comparison in whole sixths of a day, and only rounds for display.

A useful habit: the 120-day pattern. Averaging about 120 US days every year keeps the weighted total at 180, just under the threshold, which is why many frequent travelers plan around it. One extra trip breaks the pattern, so count, do not estimate.

Which days should you enter?

Enter only days that count. Any part of a day physically present in the United States normally counts as a full day, including arrival and departure days. Leave out days as an exempt individual (students, teachers, trainees, diplomats within their limits), days you could not leave because of a medical condition that arose in the US, days in transit of under 24 hours, and regular commuting days from Canada or Mexico.

If your entered days meet the test but you were in the US fewer than 183 days this year, check the closer connection exception in the FAQ below. The threshold interacts with the same 183-day idea used elsewhere; see the 183-day rule guide for the international picture.

FAQ

Substantial presence, answered.

For the wider 183-day picture across countries, read the 183-day rule guide.

How is the substantial presence test calculated?

Add all your US days in the current year, one third of your US days in the prior year, and one sixth of your US days in the year before that; you meet the test if you have at least 31 days in the current year and the weighted total reaches 183. The fractions are not rounded before the comparison. Meeting the test generally makes you a US tax resident for the year, subject to exceptions such as exempt days and the closer connection exception.

What days do not count for the substantial presence test?

Days as an exempt individual do not count, along with several narrow categories. Exempt individuals include students on F, J, M, or Q visas within the five-year limit, teachers and trainees on J or Q visas within their limits, foreign government-related individuals such as diplomats, and certain professional athletes. Days you could not leave because of a medical condition that arose in the US, days in transit of under 24 hours, and regular commuting days from Canada or Mexico are also excluded.

What is the closer connection exception?

It lets you be treated as a nonresident even when you meet the substantial presence test, provided you were present in the US fewer than 183 days in the current year, you maintain a tax home in a foreign country, and you have a closer connection to that country than to the US. You claim it by filing Form 8840 with the IRS for the year in question.

Does the substantial presence test apply to green card holders?

No. Green card holders are US tax residents under the separate green card test from the day they become lawful permanent residents, regardless of how many days they spend in the country. The substantial presence test matters for people without a green card, such as visitors, workers on nonimmigrant visas, and frequent business travelers.

Three numbers, always current.

Staydays counts your US days automatically, year by year, so the substantial presence test is a glance instead of a reconstruction.