What Is the Substantial Presence Test?

By John from the Staywise TeamAugust 6, 2026
What Is the Substantial Presence Test?

The substantial presence test is the IRS formula that can classify a non-US citizen as a US tax resident based on physical days in the United States. You meet it if you are present at least 31 days in the current calendar year and your weighted total of days across three years is at least 183: all current-year days, one-third of the prior year, and one-sixth of the year before that. Meeting the test generally means worldwide income reporting unless an exception such as closer connection (Form 8840) or a treaty tiebreaker applies. It is not the same as the simple 183-day immigration or tax rules used by many other countries.

This guide is for non-US citizens who spend part of each year in the United States, and for advisors helping them. It defines the test, shows the math with a worked example, notes exempt days, and points to the full companion guide for edge cases. It is educational, not personal tax advice.

Key facts

FactDetail
Legal homeIRC § 7701(b); IRS Publication 519
Part 1≥ 31 days present in the current year
Part 2≥ 183 weighted days over 3 years
WeightsCurrent year ×1; prior year ×1/3; two years prior ×1/6
Main exceptionsCloser connection (Form 8840), treaty tiebreaker, exempt individuals
Immigration vs taxSPT is tax residency, not a visa
Official IRS pageSubstantial presence test
Full Staywise guideUS substantial presence test

Who the substantial presence test applies to

It applies to nonresident aliens under US tax concepts who might become resident aliens for tax purposes through day counts. Green card holders meet the separate green card test. US citizens are taxed on worldwide income under citizenship rules, not because of SPT.

Students, teachers, and certain other visa categories can be "exempt individuals" for periods so their days do not count. Those rules are technical; read IRS Publication 519 and file required forms such as Form 8843 when applicable.

How the formula works

Both parts must be true in the current calendar year:

  1. 31-day gate. Count physical presence days in the US this year. Below 31, SPT does not apply.
  2. 183 weighted sum.
    (days this year) + (days last year ÷ 3) + (days two years ago ÷ 6) ≥ 183

A day counts if you are physically present at any time that day, with listed exceptions (certain transit, exempt individuals, some medical cases). Arrival and departure days generally count.

This is stricter than a pure 183-day rule that only looks at one year. Prior years keep partial weight, so moderate annual US time can still cross 183 weighted days.

Worked example

Jordan, not a US citizen, spent:

  • 2026: 120 days in the US
  • 2025: 150 days
  • 2024: 120 days

Part 1: 120 ≥ 31, gate passed.
Part 2: 120 + (150 ÷ 3) + (120 ÷ 6) = 120 + 50 + 20 = 190.
190 ≥ 183, so Jordan meets substantial presence for 2026 and is a US tax resident for that year unless an exception applies.

If Jordan had only 100 days in 2026, 90 in 2025, and 60 in 2024: 100 + 30 + 10 = 140, under 183, so SPT fails even though multi-year travel was significant.

Substantial presence vs other residency ideas

ConceptSystemCore idea
Substantial presenceUS federal taxWeighted 3-year day test
Green card testUS federal taxLawful permanent resident status
Schengen 90/180ImmigrationShort-stay presence in Europe
UK SRTUK taxUK statutory residence test factors
Simple 183-dayMany countriesOften current-year presence

Passing SPT does not grant a visa. Failing SPT does not erase other US tax obligations that may still apply to US-source income. For UK comparisons see UK statutory residence test. For domicile concepts see tax residency vs domicile.

Exceptions in brief

Closer connection exception. If you are under 183 actual days in the current year, meet SPT only because of the weighted lookback, and have a closer connection to a foreign country, you may file Form 8840. Conditions are strict.

Treaty tiebreaker. Income tax treaties can assign residence to one country when both claim you. Treaty positions need professional filing strategy.

Exempt individual days. Certain F, J, M, Q, and other categories exclude days for limited periods when forms are filed correctly.

Do not assume an exception; document it.

Why digital nomads get caught

A nomad who winters three months in the US each year can cross the weighted line without ever spending 183 days in a single year. Multi-year patterns matter. Tracking only "this trip" underestimates SPT risk.

Immigration status (B-1/B-2, ESTA, etc.) does not freeze the tax day count. You can be immigration-compliant and still become a tax resident under SPT.

How Staywise helps with presence tracking

Staywise (the visa compliance app for digital nomads) records US days alongside other countries so you can see multi-year presence before filing season. Alerts focus on immigration stay limits; tax residency still needs a qualified advisor. Use accurate day logs as inputs to professional advice, not as a substitute.

Free trial, then annual subscription. See App Store for current pricing.

Download Staywise on the App Store

4.8★ - Join 1,000+ digital nomads

How to track tax residency days while traveling

Manual calendars break once you stack multi-country trips and rolling windows. Staywise (the visa compliance app for digital nomads) counts days across countries automatically and sends overstay alerts before a limit hits. Passport details stay on your device; only travel dates sync for the math. Available on iOS.

For tool comparisons, see Best Visa Tracker Apps for Digital Nomads (2026) and How to Track Your Days in Multiple Countries.

Download Staywise on the App Store

Frequently Asked Questions

What is the substantial presence test?

It is the IRS day-count formula that can make a non-US citizen a US tax resident. You need at least 31 days in the current year and at least 183 days when you add all current-year days, one-third of last year's days, and one-sixth of the prior year's days. Meeting the test generally means worldwide income reporting unless an exception applies. It is a tax rule, not a visa. Track multi-year US presence carefully if you winter in the United States repeatedly.

Is substantial presence the same as the 183-day rule?

No. Many countries use a straight 183-day test that looks mainly at the current year. The US substantial presence test uses three calendar years with fractional weights: all current-year days, one-third of the prior year, and one-sixth of the year before that. That means you can become a US tax resident with well under 183 days in the current year if prior US presence was high. Immigration day limits and tax day tests also remain separate systems even when both use the number 183 in casual conversation.

Does ESTA or a tourist visa stop substantial presence?

No. Holding ESTA, a B-1/B-2 visa, or another tourist-style admission does not stop US days from counting toward the substantial presence test. You can be fully compliant with immigration rules and still become a US tax resident under the weighted formula. Only specific exempt individual categories, such as certain students or teachers on defined visas for limited years, can exclude days, and those exclusions usually require correct IRS forms. When in doubt, count the day and ask a cross-border tax professional before assuming an exemption.

What forms relate to substantial presence exceptions?

Form 8840 supports the closer connection exception when you are under 183 actual days in the current year, meet substantial presence only because of the lookback weights, and qualify on closer connection facts. Form 8843 is commonly used by exempt individuals such as certain students and teachers to claim that their days should not count. Treaty tiebreaker positions can require additional treaty-based disclosures on a US return. Always read current IRS instructions or work with a tax professional before relying on any exception.

Where can I read the full IRS rules?

Start with the IRS substantial presence test page and Publication 519, the US Tax Guide for Aliens, which explain the formula, exempt days, and related filing concepts in official language. Internal Revenue Code section 7701(b) is the statutory home of the test. For a longer Staywise walkthrough with worked examples and nomad scenarios, open our US substantial presence test full guide. Official sources always control if a blog summary and the IRS text ever diverge.

Sources

About Staywise

Staywise is the visa compliance app for digital nomads. Built by nomads for nomads, it tracks your days across every country automatically, alerts you before overstays, and keeps passport details on your device for privacy. The in-app AI assistant answers visa questions in plain English. Available on iOS.

Download Staywise on the App Store →

Important: This content is informational and does not constitute legal, tax, or immigration advice. Visa rules, tax regulations, and entry requirements change frequently and vary by individual circumstances. Always verify current requirements with official government sources or a qualified professional before making travel decisions. Staywise tracks your days and surfaces compliance information, but final responsibility for compliance rests with the traveler.

Download Staywise
★★★★★4.8 - Join 1,000+ digital nomads