Substantial Presence Test Calculator
If you are not a US citizen and don't hold a green card, your days in the US decide whether the IRS treats you as a resident. Enter your days for three years to see where you land.
Rules from IRC Section 7701(b) and IRS Publication 519.
Days you were in the US
Any part of a day in the US counts as a full day, including the day you land and the day you leave.
Days to leave out
- Days as a student on an F, J, M or Q visa, or as a teacher or trainee on a J or Q visa, if you kept to your visa. Students usually get this for 5 calendar years, and teachers and trainees for 2 of every 6. You file Form 8843 to leave these days out.
- Days as a diplomat or international organization employee on an A or G visa, other than A-3 and G-5.
- Days as a professional athlete playing in a charity sports event. You file Form 8843 to leave these days out.
- Days you were in the US for less than 24 hours while traveling between two other countries.
- Days you commuted to work in the US from Canada or Mexico.
- Days you could not leave because of a medical condition that started while you were in the US. You file Form 8843 to leave these days out.
- Days as a crew member on a foreign ship.
Substantial presence test, 2026
You meet the test
- 2026: 120 days, all count
- 120
- 2025: 150 days, one third counts
- 50
- 2024: 90 days, one sixth counts
- 15
- Total, 183 needed
- 185
- At least 31 days in 2026
- Yes
You count as a US tax resident for 2026, taxed on income from everywhere. Because you spent fewer than 183 days in the US in 2026, you may stay a nonresident by filing Form 8840. That works if your tax home was outside the US all year, your ties abroad are closer, you have taken no steps toward a green card, and you file Form 8840 on time.
Close to 183, or new to the US?
Clark Shi, CPA checks your days, your visa and any treaty, and files the right return for your status.
Get Your Free QuoteFree. No obligation. We respond within the same day.
How the Substantial Presence Test Works
You meet the test for a year if you were in the US on at least 31 days that year, and on 183 days over three years counted this way: every day of this year, one third of the days last year, and one sixth of the days the year before.
Meeting the test makes you a US tax resident, so the US taxes your income from everywhere. Some days are left out, such as days as an exempt student or teacher, which you claim on Form 8843.
If you meet the test but spent fewer than 183 days in the US this year, the closer connection exception on Form 8840 can keep you a nonresident. A tax treaty can also settle residency when two countries both claim you.
Read next
- Substantial Presence Test: Are You a US Tax Resident?. The full rules, the exempt days and what residency means for your return.
- The Closer Connection Exception. How Form 8840 keeps some visitors nonresidents.