May 2, 2026·9 min read

US Substantial Presence Test: The Complete Guide

Most people assume the US only taxes its citizens and permanent residents. That assumption is dangerously wrong. The Substantial Presence Test means any foreign national who spends enough time in the United States can be treated as a US tax resident — obligated to file and report worldwide income to the IRS.

What is the Substantial Presence Test?

The Substantial Presence Test (SPT) is the IRS mechanism for determining whether a non-US-citizen (alien) is a US tax resident for a given calendar year. It is defined under Internal Revenue Code Section 7701(b). If you meet the SPT, you are classified as a "resident alien" for that year and taxed on your worldwide income — the same as a US citizen.

The SPT applies regardless of your immigration status, visa type, or intent. A tourist on a B-2 visa can meet the SPT. A digital nomad on a remote worker visa can meet the SPT. The IRS does not care why you were in the United States — only how many days you were physically present.

The exact SPT formula

The SPT is met if you were present in the United States for at least 31 days during the current year, AND the following weighted sum equals or exceeds 183:

+All days present in the current year × 1
+All days present in the prior year × 1/3
+All days present two years ago × 1/6
183 → you meet the SPT

The minimum 31-day requirement in the current year is a floor. Even if your weighted total exceeds 183, you do not meet the SPT unless you were actually present for at least 31 days this year.

Worked example

Let's say you are a European digital nomad who has been spending time in the US for three years:

YearDays in USMultiplierWeighted days
2026 (current)120× 1120
2025 (prior year)90× 1/330
2024 (two years ago)90× 1/615
Total weighted days165

In this example, 165 is less than 183, so the SPT is not met for 2026. But if that person had spent 140 days in 2026 instead of 120, the total would be 185 — and they would be a US resident alien, required to file a US tax return and report all worldwide income.

Notice that the prior years create a "shadow" that follows you. Even if you plan to spend only 100 days in the US in 2027, your 2025 and 2026 days are still contributing to the weighted count.

Days that do NOT count toward the SPT

The IRS excludes certain categories of days from the SPT count. These are important to understand, but they are narrower than most people assume:

Days as an exempt individual

Foreign government employees on an A or G visa, teachers and trainees on a J or Q visa (typically for 2 years), students on an F, J, M, or Q visa (typically for 5 years), and professional athletes temporarily in the US for a charity sports event. Note: these exemptions have strict conditions and time limits.

Days commuting from Canada or Mexico

If you regularly commute to work in the US from a residence in Canada or Mexico and return home on the same day, those commuting days do not count. This applies to workers who cross the border daily or regularly for employment — not tourists.

Days present due to a medical condition

If you were unable to leave the US because of a medical condition or medical problem that arose while you were in the US, those days can be excluded. You must file a statement with your return explaining the condition.

Days in transit

Days spent in the US while in transit between two foreign points — where you were in the US for fewer than 24 hours and did not clear customs and immigration — generally do not count.

The Closer Connection Exception

Even if you technically meet the SPT formula, you may be able to avoid being treated as a US resident if you can establish a "closer connection" to a foreign country. To qualify, you must:

  • Have been present in the US for fewer than 183 days in the current year
  • Have a tax home in a foreign country during the current year
  • Have a closer connection to that foreign country than to the United States

The IRS evaluates "closer connection" using a range of factors: where your permanent home is, where your family lives, where your personal belongings are, where you conduct your business activities, where you vote, where you hold a driver's license, and where your bank accounts are held.

The closer connection exception is claimed by filing Form 8840. It does not apply if you were present in the US for 183 days or more in the current year.

Tax treaty tiebreaker rules

If you are a tax resident of both the US (under the SPT) and another country (under that country's rules), a tax treaty tiebreaker may resolve the conflict. The US has tax treaties with many countries that include a "tie-breaker" article, which uses a hierarchy of factors to assign exclusive residence to one country:

  1. 1Permanent home: you are resident where you have a permanent home available to you
  2. 2Centre of vital interests: if permanent home doesn't resolve it, look at personal and economic ties
  3. 3Habitual abode: if still unresolved, resident where you habitually live
  4. 4Nationality: if still tied, resident in the country of citizenship
  5. 5Mutual agreement: if all else fails, the tax authorities of both countries negotiate

Treaty benefits must be claimed — they are not automatic. You must file a US tax return (or, in some cases, Form 8833) and explicitly invoke the treaty. Failing to file because you assumed a treaty protected you is not a defence.

What if you meet the SPT?

If you meet the SPT and none of the exceptions apply, you are a US resident alien for the full calendar year. This means:

  • You must file Form 1040 (same as US citizens), not the non-resident Form 1040-NR
  • You are taxed on your worldwide income, including income from your home country
  • You may be subject to FBAR reporting requirements if you hold foreign bank accounts
  • You may need to file FATCA Form 8938 if foreign assets exceed certain thresholds
  • Foreign tax credits are available to offset taxes paid to other countries

The SPT has a dual-status year provision for the year you first meet or last meet the test — you file as a resident for part of the year and non-resident for the remainder. This is complex territory that genuinely requires a US-qualified tax advisor.

Key takeaways

  • The SPT uses a weighted 3-year formula, not a simple 183-day count
  • You must also have been present for at least 31 days in the current year
  • Prior years carry forward: 2025 days count at 1/3, 2024 days at 1/6
  • Exempt categories are narrow and have strict eligibility conditions
  • The Closer Connection Exception requires filing Form 8840 and only applies below 183 days
  • Treaty tiebreakers exist but must be actively claimed — they are not automatic

Track your US days automatically

DayTrace calculates your SPT weighted total in real time, shows you how many days you have left before you hit 183, and generates an exportable day log your tax advisor can use directly.

Start tracking free