Calculate your U.S. tax residency status using the IRS Substantial Presence Test. Determine if you meet the 183-day threshold for resident alien classification.
You do not meet the test
Your weighted total is 160 days, which is below the 183-day threshold. You need 23 more weighted days.
Planning tip
To stay under 183 weighted days in 2026, limit your presence to 143 days or fewer (you currently have 120).
Note: This calculator provides an estimate. Consult a tax professional for your specific situation, especially regarding the closer connection exception or tax treaty benefits.
The substantial presence test is a mathematical formula used by the Internal Revenue Service (IRS) to determine whether a foreign national is considered a U.S. resident for federal income tax purposes. Unlike U.S. citizens and permanent residents who are always taxed on worldwide income, non-citizens must meet specific criteria to be classified as "resident aliens" for tax purposes.
This test focuses on physical presence in the United States over a three-year period. If you meet the substantial presence test, you are treated as a resident alien, meaning you must report and pay taxes on your worldwide income—just like a U.S. citizen. If you don't meet the test, you're generally considered a nonresident alien and only taxed on U.S.-sourced income.
Understanding this test is critical for anyone who splits time between the U.S. and another country, including international students, business travelers, seasonal workers, and digital nomads.
The test uses a weighted counting formula across three calendar years. To meet the substantial presence test, you must satisfy both of the following requirements:
31-day minimum: You must be physically present in the United States for at least 31 days during the current calendar year.
183-day threshold: The sum of your weighted days over a three-year period must equal or exceed 183 days.
Where:
Suppose you were present in the U.S. for:
Since 160 is less than 183, you would not meet the substantial presence test for 2024 and would be classified as a nonresident alien for that tax year.
The IRS counts you as present in the United States on any day you are physically in the country at any point during that day. This includes:
The test is straightforward: if you were physically in the U.S. at any moment during a 24-hour calendar day, that day counts.
The IRS specifically excludes certain days from the substantial presence test calculation:
If you regularly commute to work in the U.S. from your home in Canada or Mexico, those commuting days don't count. To qualify, you must commute regularly (not occasionally) and maintain your residence in Canada or Mexico.
Days when you're in the U.S. for less than 24 hours while in transit between two places outside the United States are excluded. For example, a layover at a U.S. airport on your way from London to Tokyo wouldn't count.
If you're temporarily in the U.S. as a regular crew member of a foreign vessel, those days don't count toward the test.
If you intended to leave the U.S. but couldn't due to a medical condition that arose while you were here, those days may be excluded. This requires documentation and applies only to conditions that developed in the U.S., not pre-existing conditions.
Certain categories of individuals are considered "exempt" and their days don't count. These are covered in detail below.
Several categories of individuals can exclude their days from the substantial presence test:
Students in valid immigration status are generally exempt for their first five calendar years of presence in the U.S. After five years, student days begin counting toward the test. This exemption helps international students complete degree programs without triggering U.S. tax residency.
To maintain exempt status, students must:
Teachers, professors, and trainees on J or Q visas can be exempt for two years out of any six consecutive calendar years. Unlike students, this is not an automatic exemption—it depends on whether you've already claimed the exemption in recent years.
Individuals present in the U.S. as full-time employees of foreign governments or international organizations (typically on A or G visas, excluding A-3 and G-5 domestic workers) are exempt.
Foreign professional athletes temporarily in the U.S. to compete in charitable sports events are exempt for days spent competing.
Even if you meet the substantial presence test, you may still be treated as a nonresident alien if you:
A closer connection is determined by examining factors like:
To claim this exception, you must file Form 8840 (Closer Connection Exception Statement) with your tax return.
If you're considered a tax resident of both the U.S. (under the substantial presence test) and another country (under that country's laws), tax treaties may provide "tie-breaker" rules to determine your residence for treaty purposes. These rules typically consider factors similar to the closer connection test.
Common tie-breaker criteria include:
Tax treaties don't change U.S. domestic law, but they can affect how income is taxed and which country has primary taxing rights.
If you meet the substantial presence test, you are treated as a U.S. resident alien for the entire calendar year (unless you qualify for the first-year choice or dual-status rules). This means:
If you want to avoid meeting the substantial presence test, careful planning is essential:
Keep a detailed log of every day you enter and leave the U.S. Save boarding passes, passport stamps, and other documentation.
Use this calculator to determine how many days you can spend in the U.S. each year without triggering the 183-day threshold. Remember that current year days have the most weight.
Days earlier in the year count the same as days later. But if you're close to the threshold, reducing current-year days has three times the impact of reducing prior-year days.
If you qualify as a student, teacher, or other exempt individual, file Form 8843 to document your exempt status.
If you're a tax resident of a country with a U.S. tax treaty, consult a tax professional about tie-breaker provisions that might help your situation.
While this calculator provides a reliable estimate, several factors require professional guidance:
Exempt individuals must file Form 8843 (Statement for Exempt Individuals and Individuals with a Medical Condition) to document their exempt status. This form is due with your tax return (or by the filing deadline if you have no filing requirement).
The form requires information about:
Failure to file Form 8843 doesn't automatically make your days count, but it can create complications if the IRS questions your status.
Every day you're in the U.S. counts—including arrival day, departure day, and weekends. Don't assume partial days or short trips don't count.
The weighted formula means days from two years ago still matter. Always calculate the full three-year weighted total.
Even if your weighted total exceeds 183, you still need at least 31 days in the current year. Conversely, if you have fewer than 31 current-year days, you automatically fail the test (which may be the goal).
Exempt students and teachers should file this form every year to document their status, even if they have no U.S. tax filing requirement.
Tax treaties can help, but they don't automatically apply. You must properly claim treaty benefits and meet all requirements.
Consider professional tax advice if:
The substantial presence test is just one piece of the international tax puzzle. A qualified tax professional can help you understand the full picture and plan accordingly.