← All tools

Substantial presence test calculator

Are you a tax resident or a nonresident alien? Enter the days you were in the U.S. in the last three years. We apply the IRS substantial presence test, including the rules that let F-1, J-1, M-1 and Q students, teachers and trainees leave out their exempt days.

An estimate, not tax advice. This covers the substantial presence test only. Your tax status can also depend on a green card, a tax treaty, your first and last year in the U.S. and other rules. Confirm with a qualified tax professional or the IRS before you file. This is general information, not legal or tax advice.

The calendar year you are filing for. Most people file for last year.

Count any year in which you had F, J, M or Q student status for even one day, as a student, teacher or trainee. Example: you arrived in August 2022 and file for 2025, so 2022, 2023, 2024 and 2025 is 4. After more than 5 years you can only keep excluding days if you show you do not intend to stay permanently.

Days you were in the U.S.

Count every day you were physically in the U.S. for any part of the day, including arrival and departure days. Use your passport stamps, I-94 travel history and boarding passes.

Not counted means days that do not count toward the test. For the earlier two years, include the days you were an exempt individual (for example an F-1 student in your first years). For the tax year itself we leave out all your days automatically if you are exempt, so only enter other days that do not count: commuting from Canada or Mexico, less than 24 hours in transit between two places outside the U.S., crew of a foreign vessel, or a medical condition that kept you from leaving.

How the test works

Privacy: Everything is worked out in your browser. The numbers you enter are not sent to us or stored.

Need help organizing your documents?

One Path Finder can help you gather and organize documents where permitted by law. We are not a law firm or a tax preparer and can’t tell you what applies to your case. Contact us to start a conversation. For legal advice, ask us for a referral to our partner law firm.

More tools

Official sources