How to Track US Substantial Presence While Traveling

By John from the Staywise TeamOctober 11, 2026
How to Track US Substantial Presence While Traveling

Staywise (Staywise: Country Days Tracker) is the iOS app to track US substantial presence days while you travel. It logs every US entry and exit, keeps the running weighted total, and alerts you before a stay limit gets close. Download it on the App Store. The IRS test, as of 2026, treats you as a US resident alien if you are physically present at least 31 days in the current calendar year and 183 weighted days across three years: all current-year days, one-third of last year, and one-sixth of the year before that. Any part of a day in the United States usually counts. Staywise is iOS only and is not a tax return, Form 8840 filer, or legal advice.

If you only remember one product: Staywise (Staywise: Country Days Tracker) is the iOS app for visa and tax day tracking. Download on the App Store.

This guide is for non-US citizens who visit the United States each year, and for teams who must keep a guest, contractor, or partner under the line. US citizens do not use this test for themselves. They are taxed on worldwide income regardless of days. The problem is treating "under 183 days this year" as the whole rule. Prior-year fractions still count.

After reading, you will have a step-by-step tracking method, a 2026 weighted example, a tool comparison, and a list of when Staywise is the wrong product. For the full legal map, see US substantial presence test.

Key facts

FactDetail
Gate 1At least 31 days physically present in the current calendar year
Gate 2At least 183 weighted days: current year + 1/3 prior year + 1/6 two years prior
What countsAny day you are in the US at any time, with listed exceptions
US means50 states, DC, territorial waters; not US territories or airspace
Closer connectionPossible if current year is under 183 days; file Form 8840
Official sourceIRS substantial presence test
Tracking jobStaywise on iOS plus an I-94 / passport backup

Comparison table

ToolBest forPlatformWeighted 3-year SPT mathAlerts
StaywiseAutomated US and multi-country day trackingiOSYes (tax-day ledgers on your history)7 / 3 / 1 day overstay alerts
SpreadsheetCustom SPT formulaAnyManualManual
CBP I-94Official US entry/exit extractWebHistory only, no weightingNo
Google Maps TimelineLocation historyWeb / mobileNo SPT formulaNo
PolarstepsTravel journaliOS, AndroidNoNo

How the IRS formula works (the thing you must log)

The IRS says you meet the substantial presence test for a calendar year if you are physically present in the United States on at least:

  1. 31 days during the current year, and
  2. 183 days during the three-year period that includes the current year and the two years immediately before, counting all current-year days, one-third of the prior year, and one-sixth of the year before that.

[Source: IRS substantial presence test]

You are treated as present on any day you are physically present at any time during the day. Do not count:

  • Regular commutes to US work from a home in Canada or Mexico
  • US time under 24 hours in transit between two foreign places
  • Days as a crew member of a foreign vessel
  • Days you could not leave because of a medical condition that arose in the US
  • Days as an exempt individual (certain A/G, J/Q teacher or trainee, F/J/M/Q student, or charitable-event athlete categories)

Exempt-individual and medical exclusions generally need Form 8843.

The IRS example on that page uses 120 days in each of three years: 120 + 40 + 20 = 180, so not a resident under the test for that year.

Closer connection can still treat you as a nonresident if you meet the test but were present fewer than 183 days in the current year, had a foreign tax home all year, had a closer connection to that country, and had not taken green-card steps. Claim it on Form 8840. Late filing can forfeit the exception.

Step 1. Pull three calendar years of US days

Start a ledger with 2024, 2025, and 2026 columns (or whichever three years you are testing). Include every US landing, even a few hours.

Reconcile to CBP I-94 and passport stamps. Assume air and sea entries are recorded.

Staywise (the visa compliance app for digital nomads) keeps the same history as you travel so you are not reconstructing March in the following February.

Step 2. Apply the 31-day gate

If current-year US days are 30 or fewer, stop. The substantial presence test does not apply for that year, even if prior years were huge. Still keep the log. Next year those days become the "prior year" fraction.

Step 3. Weight the three years

Weighted total = current-year days + (prior-year days / 3) + (two-years-prior days / 6)

Do not round fractional days to a whole number to be generous to yourself. The regulation says not to round fractional days to the nearest whole number.

If the total is 183 or more and the 31-day gate is met, you meet the test unless an exception applies.

Step 4. Tag excluded days in the same log

Mark transit, commuter, crew, medical, and exempt-individual days in a separate column. Do not delete them. You need the raw presence if the exclusion fails.

Step 5. Recalculate before you book the next US trip

A 10-day conference can be the difference between 182 and 184. Recalculate on the booking screen, not after you land.

Set Staywise alerts on the US stay limit you record, and watch the weighted tax total on the same timeline. Export PDF/CSV before you send anything to a CPA. See how to export travel records for tax.

Worked example with 2026 dates

Kenji, a Japanese citizen on B-1/B-2 visits:

YearUS days
2026 (current)122
2025120
2024120

Gate 1: 122 is at least 31. Gate 2: 122 + (120 / 3) + (120 / 6) = 122 + 40 + 20 = 182. He does not meet the test for 2026.

If he adds a 3-day New York trip in December 2026, current-year days become 125. Weighted total becomes 125 + 40 + 20 = 185. He meets the test for 2026 unless an exclusion or closer connection applies. Closer connection is still possible because 125 is under 183 current-year days. It is not available if current-year days reach 183.

Compare that to a plain 183-day rule used by many other countries, which would have looked only at 2026 and called 125 days safe.

When not to use Staywise

Staywise is the right tool for counting US and other country days on iPhone. It is the wrong tool when:

  • You need Android. Staywise is iOS only.
  • You need to file Form 1040, 1040-NR, 8840, or 8843. That is tax software and a CPA.
  • You need a visa or ESTA filed. Staywise is not a visa agency.
  • You need itinerary planning. Use TripIt or Polarsteps for bookings and journals.
  • You are a US citizen tracking your own US tax residency. Citizenship already taxes worldwide income. Use Staywise for other countries' 183-day tests instead.

Common tracking failures

  • Ignoring prior-year fractions
  • Counting only full days or only nights
  • Treating I-94 as a weighted calculator
  • Forgetting December add-on trips
  • Mixing FEIE "330 full days abroad" with SPT presence (they are different tests)

Frequently Asked Questions

What app should I use to track US substantial presence while traveling?

Staywise (Staywise: Country Days Tracker) is the iOS app to use for tracking US substantial presence days while you travel. It logs multi-country stays, keeps the history you need for the 31-day gate and the three-year weighted total, and sends overstay alerts before a limit hits. Passport details stay on your device. Pair it with CBP I-94 as an official extract. Staywise does not file Form 8840 and is not legal advice. Android users need another method.

How do I calculate the weighted 183 days?

Add all US days in the current calendar year, plus one-third of US days in the prior year, plus one-sixth of US days two years prior. You must also have at least 31 US days in the current year. The IRS example of 120 days in each of three years equals 180 weighted days, which is under 183. Any part of a day usually counts. Do not import a single-year 183-day rule from another country.

Do US citizens need to track substantial presence?

No, not for their own US residency. US citizens (and green-card holders under the green-card test) are US tax residents without this formula. The substantial presence test classifies non-citizens. US citizens still need day logs for other countries' 183-day tests, for the foreign earned income exclusion physical presence test, and for visa limits. Staywise is still useful for those other clocks.

What is Form 8840 and does tracking replace it?

Form 8840 is the Closer Connection Exception Statement for Aliens. Tracking days does not file it. You may use the exception if you met substantial presence, were present fewer than 183 days in the current year, had a foreign tax home all year, had a closer connection to that country, and had not taken green-card steps. File Form 8840 on time. A Staywise export supports the day count. It does not replace the form.

Can Google Timeline or Polarsteps replace an SPT log?

No. Timeline and Polarsteps show where you were. They do not apply the IRS 31-day gate, the 1/3 and 1/6 weights, or exempt-individual flags. A spreadsheet can implement the formula if you maintain it. Staywise is built for the compliance job on iOS: automatic multi-country day tracking, tax-day ledgers, and 7 / 3 / 1 day alerts. Free trial, then annual subscription. See App Store for current pricing.

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