Substantial Presence Test calculator

Enter your US stays for this year and your day counts for the two years before — the calculator applies the IRS weighting (1, 1/3, 1/6), checks the 31-day prong, and gives you the verdict.

Stays dated in 2026 count toward the current-year total (through 2026-09-12); stays dated 2025 or 2024 automatically fill the prior-year counts below when present.

0US days, 2026 to date
0weighted 3-year total
Nomeets the test

Under the 31-day minimum. The test cannot be met with 0 US days this year, no matter what prior years look like. You would need 31 more days for the test to even apply.

The formula (IRC § 7701(b)(3))
0 (× 1) + 0 (× 1/3) + 0 (× 1/6) = 0 weighted days, unrounded (26 CFR § 301.7701(b)-1(c)). Both prongs must hold: 31+ US days this year AND 183+ weighted days.
Days this test does not count
Regular commuters from Canada or Mexico, certain F/J/M/Q visa holders, crew members, and days stuck in the US for medical conditions can be excluded under § 301.7701(b)-3 — this calculator counts raw physical presence, so subtract those days from your inputs if they apply. The closer-connection exception can also override a passing result.
US means the states + DC
Puerto Rico, Guam, the US Virgin Islands and other territories do not count as US days for this test (nor do they count for their own tests — different rules).

Inputs are saved in this browser only (localStorage) — nothing is sent anywhere. Clearing site data removes them.

How the substantial presence test works

The test lives in IRC § 7701(b)(3), with the counting mechanics spelled out in 26 CFR § 301.7701(b)-1(c). Two conditions, both required:

  1. You were present in the US on at least 31 days during the current calendar year.
  2. The weighted sum current-year days × 1 + prior-year days × 1/3 + year-2 days × 1/6 is at least 183. Fractions are never rounded.

A "day of presence" is any day you were physically in the US at any time — the 50 states plus DC, excluding territories. There is no minimum number of hours: if you were in the US at all that day, you were present.

Official sources

Rule and calculator semantics reviewed for 2026. This tool computes the day-count test only — it is not tax advice.

Frequently asked questions

What is the US substantial presence test?

The IRS test that decides whether a non-US citizen counts as a US resident for tax purposes. You meet it in a calendar year when you were physically present in the US at least 31 days that year AND your weighted three-year total — all days this year, plus one-third of last year, plus one-sixth of the year before — reaches 183. Meeting it generally makes you a resident alien who files Form 1040 and reports worldwide income.

How do I count days of presence for the test?

Any day you are physically present in the United States at any time counts as a full day — even a same-day layover. "United States" means the 50 states and DC only: Puerto Rico, Guam, the US Virgin Islands, and the other territories do not count. Fractions from the one-third and one-sixth weighting are never rounded.

What are the 31-day and 183-day prongs?

Both must hold. Under 31 days of US presence in the current year, the test cannot be met at all, no matter how many days you accumulated in prior years. Over 30 days, the weighted 183-day total decides. This calculator applies both prongs exactly as the IRS describes them.

Which days can be excluded from the count?

Regular commuters from Canada or Mexico, teachers and trainees on F, J, M, or Q visas (with limits), crew members of foreign vessels, and people unable to leave for medical reasons can exclude certain days under 26 CFR 301.7701(b)-3. The IRS also excludes days you commute to work from a foreign country. This calculator counts raw presence — subtract excluded days from your inputs if they apply.

Can I meet the test and still not be a resident?

Yes — two ways. The closer-connection exception (Form 8840) can override a passing result if you are present under 183 days in the current year and can show stronger ties to another country. And a tax treaty tie-breaker can assign residence elsewhere even after you pass. Both require filing, not just intending.

Does the substantial presence test apply to US states too?

No — it is the federal test. States run their own residency rules, usually a 183-day statutory-residency test plus domicile, and they count presence differently (often the whole year, any part of a day). See our state-by-state tax tracking guides for the rules where you spend time.

Never reconstruct three years of days again

Day31 builds your US day count automatically — current year, prior years, weighted total — and warns you as you approach the threshold. Offline and private, on your device.

Download for iOS