Other

Substantial Presence Test Calculator

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.

Exempt status

Visa status

Certain visa holders may be exempt from the substantial presence test

Tax residency status
Nonresident Alien

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.

Weighted days calculation

2026 (×1)
120 × 1 = 120
2025 (×⅓)
90 × ⅓ = 30
2024 (×⅙)
60 × ⅙ = 10
Total weighted days
160

Requirements checklist

At least 31 days in 2026
120 days ✓
At least 183 weighted days
160 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.

What is the substantial presence test?

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.

How the substantial presence test is calculated

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:

  1. 31-day minimum: You must be physically present in the United States for at least 31 days during the current calendar year.

  2. 183-day threshold: The sum of your weighted days over a three-year period must equal or exceed 183 days.

The weighted days formula

Weighted Days=(Days in Current Year×1)+(Days in Year 1×13)+(Days in Year 2×16)\begin{aligned} \text{Weighted Days} &= (\text{Days in Current Year} \times 1) \\ &+ (\text{Days in Year 1} \times \tfrac{1}{3}) \\ &+ (\text{Days in Year 2} \times \tfrac{1}{6}) \end{aligned}

Where:

  • Current Year: All days count at full value (100%)
  • Year 1: Days from the first prior year count at one-third value (33.3%)
  • Year 2: Days from the second prior year count at one-sixth value (16.7%)

Example calculation

Suppose you were present in the U.S. for:

  • 120 days in 2024 (current year)
  • 90 days in 2023 (prior year)
  • 60 days in 2022 (second prior year)
Weighted Days=(120×1)+(90×13)+(60×16)=120+30+10=160 days\begin{aligned} \text{Weighted Days} &= (120 \times 1) + (90 \times \tfrac{1}{3}) + (60 \times \tfrac{1}{6}) \\ &= 120 + 30 + 10 \\ &= 160 \text{ days} \end{aligned}

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.

What counts as a day of presence

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:

  • Days spent working in the U.S.
  • Days spent on vacation or personal travel
  • Days of arrival and departure (both count as full days)
  • Days spent in U.S. territorial waters
  • Days spent in the U.S. due to flight delays or other transit issues

The test is straightforward: if you were physically in the U.S. at any moment during a 24-hour calendar day, that day counts.

Days that do NOT count

The IRS specifically excludes certain days from the substantial presence test calculation:

Commuter days

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.

Transit days

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.

Crew member days

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.

Medical condition days

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.

Exempt individual days

Certain categories of individuals are considered "exempt" and their days don't count. These are covered in detail below.

Exempt individuals

Several categories of individuals can exclude their days from the substantial presence test:

Students (F, J, M, Q visas)

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:

  • Be in valid F, J, M, or Q immigration status
  • Substantially comply with visa requirements
  • Not intend to permanently reside in the U.S.
  • File Form 8843 with their tax return

Teachers and trainees (J, Q visas)

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.

Foreign government officials

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.

Professional athletes

Foreign professional athletes temporarily in the U.S. to compete in charitable sports events are exempt for days spent competing.

The closer connection exception

Even if you meet the substantial presence test, you may still be treated as a nonresident alien if you:

  1. Were present in the U.S. for fewer than 183 days during the current year
  2. Maintained a "tax home" in a foreign country during the year
  3. Had a "closer connection" to that foreign country than to the U.S.

A closer connection is determined by examining factors like:

  • Where your permanent home is located
  • Where your family lives
  • Where your personal belongings are kept
  • Where you hold bank accounts and investments
  • Where your driver's license is issued
  • Where you're registered to vote
  • Where you conduct personal business and social activities

To claim this exception, you must file Form 8840 (Closer Connection Exception Statement) with your tax return.

Tax treaty tie-breaker rules

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:

  • Permanent home availability
  • Center of vital interests
  • Habitual abode
  • Nationality

Tax treaties don't change U.S. domestic law, but they can affect how income is taxed and which country has primary taxing rights.

Consequences of meeting the test

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:

Tax obligations

  • You must report worldwide income to the IRS
  • You file Form 1040 (the same form U.S. citizens use)
  • You may be eligible for standard deductions and credits
  • You may owe self-employment tax on foreign self-employment income

Reporting requirements

  • FBAR (FinCEN Form 114) if you have foreign accounts exceeding $10,000
  • Form 8938 (FATCA) for specified foreign financial assets above threshold amounts
  • Form 3520 for transactions with foreign trusts
  • Form 5471 for ownership of controlled foreign corporations

Benefits

  • Access to standard deductions and itemized deductions
  • Ability to claim dependents and tax credits
  • Potentially lower tax rates than nonresident filing

Planning strategies

If you want to avoid meeting the substantial presence test, careful planning is essential:

Track your days precisely

Keep a detailed log of every day you enter and leave the U.S. Save boarding passes, passport stamps, and other documentation.

Calculate your threshold

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.

Consider timing

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.

Claim exemptions if eligible

If you qualify as a student, teacher, or other exempt individual, file Form 8843 to document your exempt status.

Explore treaty benefits

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.

Limitations of this calculator

While this calculator provides a reliable estimate, several factors require professional guidance:

  1. Part-year residency: The rules for when your residency begins and ends are complex
  2. Treaty positions: Claiming treaty benefits requires proper disclosure and may invite IRS scrutiny
  3. State taxes: Some U.S. states have their own residency tests that differ from federal rules
  4. Visa violations: Days spent in violation of immigration status may or may not count differently
  5. Green card holders: Once you have a green card, you're automatically a resident regardless of the substantial presence test

Form 8843 requirements

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:

  • Your visa type and status
  • The educational institution or sponsoring organization
  • Dates of presence in the U.S.
  • Prior years you've been present in the U.S.

Failure to file Form 8843 doesn't automatically make your days count, but it can create complications if the IRS questions your status.

Common mistakes to avoid

Miscounting days

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.

Ignoring prior years

The weighted formula means days from two years ago still matter. Always calculate the full three-year weighted total.

Forgetting about the 31-day minimum

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).

Not filing Form 8843

Exempt students and teachers should file this form every year to document their status, even if they have no U.S. tax filing requirement.

Assuming treaty protection

Tax treaties can help, but they don't automatically apply. You must properly claim treaty benefits and meet all requirements.

When to consult a professional

Consider professional tax advice if:

  • You're close to the 183-day threshold
  • You have significant worldwide income or assets
  • You're claiming treaty benefits
  • You have prior years where you may have met the test
  • You're transitioning between visa types
  • You're considering applying for a green card

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.