Substantial Presence Test Calculator
Enter your days in the United States for the current year and the two prior years. The calculator applies the IRS substantial presence test locally in your browser — nothing is sent anywhere.
How it works
The IRS substantial presence test has two parts, and both must be true: you were in the US for at least 31 days this year, and your weighted three-year total is at least 183 days. The weighting is this year’s days + last year’s days ÷ 3 + the year before’s days ÷ 6. So a few extra days each year can tip you over the line even if you never stay long in any single year.
Example
Enter 123 days for each of the three years: 123 + 41 + 20.5 = 184.5 weighted days — over the 183-day line. Enter 120 days each year instead: 120 + 40 + 20 = 180 — under the line. Three days a year is the whole difference.
FAQ
Do arrival and departure days count?
Yes. IRS rules count the day you enter and the day you leave the US as a day of presence each. A transit layover under 24 hours does not count.
What if I was in the US as a student or teacher?
Days as an exempt individual — for example an F/J/Q student, teacher/trainee, or foreign-government employee — can be excluded from the count. Subtract your exempt days before entering values.
I pass 183 days but my real home is abroad. Am I safe?
Maybe, via the closer-connection exception — but it requires filing IRS Form 8840 on time. People applying for a green card generally cannot use it.
Is this tax advice?
No. This is a simplified day-count estimate based on the published formula. Confirm your residency status with a tax professional before filing.