Permitely
IRS · 26 U.S. Code §7701(b) · Updated July 2026

Are you a US tax resident?

The IRS Substantial Presence Test weighs your days across three years. Run the exact 31-day and 183-day formula below — then read what the result actually means for your worldwide income, FBAR and treaty options.

Language
IRS Pub 519 sourced 4 languages Reviewed Jul 2026 Free · nothing leaves your browser

What the Substantial Presence Test decides

The Substantial Presence Test (SPT) is the day-counting rule the IRS uses to decide whether a non-citizen is a US tax resident for the year. It is a tax test, not an immigration one — you can be a tax resident on a tourist or work visa, and residency changes what you file, not your visa status.

Being a resident matters because residents report worldwide income and can pick up FBAR and FATCA duties. The test turns on two gates that must both be true, and it weights days across three years, so it is easy to miscount. Run your numbers first, then read the rules underneath.

Substantial Presence Test calculator

1
Days present in the US — current year (2026)

Count only days that count (exclude exempt-individual days, transit, etc.). Counted at full weight.


2
Days present — prior year (2025)

Counted at 1/3 weight.


3
Days present — second prior year (2024)

Counted at 1/6 weight.

Tax residency result

The test at a glance

Substantial Presence Test decision flow Gate 1 · 31 days ≥ 31 days this year AND Gate 2 · 183 weighted D₀ + D₋₁ ÷ 3 + D₋₂ ÷ 6 ≥ 183 This year count × 1 Prior year count × 1/3 2 years prior count × 1/6 Both false → Nonresident File 1040-NR Both true → Resident Worldwide income · Form 1040

Both gates must be true to be a resident. Current-year days carry full weight, so they move the result most.

Legal basis

26 U.S. Code §7701(b)(3) defines the Substantial Presence Test; the day-weighting and exceptions are detailed in IRS Publication 519 (U.S. Tax Guide for Aliens). This page applies those rules exactly as published; it does not modify or interpret them beyond the official text.

How the weighted formula works

Two conditions must both hold in the current year: at least 31 days of presence, and a weighted three-year total of 183. The weighting is what trips people up: only the current year counts in full. The prior year counts at one-third, and the year before that at one-sixth.

The classic IRS example: 120 days in each of three years is 120 + (120÷3) + (120÷6) = 120 + 40 + 20 = 180 — just under 183, so not a resident. Because the current year dominates, a single long stay this year can flip the result even if the prior years were light.

Exempt individuals (F, J, M, Q) and Form 8843

Some days simply do not count. Students on F, J, M or Q visas are exempt individuals for their first five calendar years; teachers and trainees on J or Q visas are exempt for two. During the exempt period those days are excluded from the test entirely — so many students who are physically in the US for years are still nonresidents for tax.

Exempt status is not automatic paperwork-wise: you generally file Form 8843 each year to document it, even with no income. Enter only your countable days in the calculator above.

Over the line? The closer-connection exception and treaties

Passing the day count is not always the end. The closer-connection exception (Form 8840) can keep you a nonresident if you were present fewer than 183 days in the current year, kept a tax home in another country, and had a closer connection there (home, family, banking, licenses). Separately, an income-tax treaty tie-breaker can reassign residency to your home country even when both tests are met.

Both routes require real documentation and correct forms. If your result is close or you have treaty facts, this is the point to get professional advice.

What becoming a US tax resident triggers

Residency changes what you file, not just whether you owe. As a resident you generally:

  • Report worldwide income on Form 1040 (not 1040-NR).
  • File an FBAR (FinCEN Form 114) if foreign accounts exceed $10,000 combined at any point in the year.
  • Possibly file Form 8938 (FATCA) once higher account thresholds are crossed.

None of these necessarily means a big tax bill — treaties and foreign tax credits often offset it — but the filing obligations are real and penalised if missed. See our FBAR / Form 8938 guide and FBAR & immigration risk next.

Common mistakes

  • Counting exempt days. F/J students often count years that don't count — inflating the total.
  • Forgetting the arrival/departure day. Any part-day of physical presence usually counts.
  • Ignoring the current-year weight. This year's days count fully; last year's are only a third.
  • Assuming a visa decides it. Tax residency is about days and status, not the visa label.

Frequently asked questions

Sorting out a visa or green-card step too?

Tax residency often rides alongside an immigration decision. If you're weighing a status change, a guided immigration service can prepare and check the USCIS forms.

Explore immigration help PLACEHOLDER · Boundless / CitizenPath

Partner link — we may earn a commission at no cost to you. Not an endorsement or tax advice.

REVIEWED Jul 2026

Editorial standards & sources

This page is built directly from primary IRS sources and is kept in sync with them. It is an independent educational resource, not a law or accounting firm, and does not create a client relationship.

  • Primary sources: IRC §7701(b) and IRS Publication 519, cited in full below.
  • Last reviewed: 20 July 2026 against the current IRS guidance.
  • Scope: informational self-assessment only — it is not tax advice and is not an IRS determination.
  • Professional review: a named licensed reviewer (CPA/EA/attorney) will be added here; until then, confirm your result with a qualified cross-border tax professional.

Sources and official references: IRS — Substantial Presence Test; IRS Publication 519; 26 U.S. Code §7701(b). Resident if 31+ current-year days AND weighted total (current + 1/3 prior + 1/6 second-prior) reaches 183. Exempt individuals (F/J/M/Q) and the closer-connection exception (Form 8840) can change the result. Independent self-assessment, not tax advice; consult a licensed cross-border tax professional.

Related US tools

Report an issue

Report an issue

Spotted an error? Every report is reviewed.

✓ Sent. Thank you.