US Substantial Presence Test: The Weighted 183-Day Formula Explained

8 min read

The US Substantial Presence Test (SPT) makes you a US tax resident if you were physically present in the United States for at least 31 days in the current year and 183 days over a 3-year weighted period. The formula counts all days in the current year, one-third of days from last year, and one-sixth of days from two years ago.

This test applies to foreign nationals only. US citizens and green card holders are already US tax residents regardless of how many days they spend in the country.

Quick summary: You meet the SPT if you pass both: (1) 31+ days in the US this year, and (2) 183+ days using the weighted formula across 3 years. Even if you meet it, the closer connection exception (Form 8840) may save you. Any part of a day in the US counts as a full day.

How does the Substantial Presence Test formula work?

The IRS SPT page explains a two-part test. You must satisfy both conditions to be treated as a US resident for tax purposes.

Part 1: The 31-day minimum. You were physically present in the United States for at least 31 days during the current calendar year.

Part 2: The 183-day weighted calculation. Add up your days using this formula:

  • Current year: count every day you were present
  • Year before (year -1): count 1/3 of the days you were present
  • Two years before (year -2): count 1/6 of the days you were present

If the total is 183 or more, you meet the SPT.

Example from the IRS: You spent 120 days in the US each year for 3 consecutive years.

  • Current year: 120 days
  • Year -1: 120 x 1/3 = 40 days
  • Year -2: 120 x 1/6 = 20 days
  • Total: 180 days. You do NOT meet the SPT.

But bump that to 122 days per year, and the math changes: 122 + 40.7 + 20.3 = 183. You're over the line.

The weighted formula means your US days have a tail. Time spent 2 years ago still counts toward this year's calculation, just at a lower weight.

What counts as a "day of presence" in the US?

Any part of a day physically in the United States counts as a full day of presence, according to IRS Publication 519 and the SPT guidance page.

Land at JFK at 11pm on a Tuesday. That's a full day. Fly out Wednesday at 6am. That's another full day. A 7-hour overnight visit burns 2 days.

The test uses the calendar year: January 1 to December 31.

Which days are excluded from the count?

Not every day in the US counts. The IRS excludes these, per Publication 519:

  • Transit days. You were in the US for less than 24 hours while traveling between two foreign places. A connecting flight from London to Mexico City through Miami, where you never leave the international transit area, does not count.
  • Commuter days. You live in Canada or Mexico and commute to work in the US regularly.
  • Crew member days. You were in the US as a crew member of a foreign vessel.
  • Medical days. You were unable to leave the US because of a medical condition that developed while you were already in the country. This does not apply to pre-existing conditions.
  • Exempt individual days. Certain visa holders can exclude their days entirely (see below).

Who is an "exempt individual" under the SPT?

The IRS defines four categories of exempt individuals whose days of presence do not count toward the SPT:

  1. Foreign government representatives on A or G visas (except A-3 and G-5 household employees)
  2. Teachers and trainees on J or Q visas, subject to time limits
  3. Students on F, J, M, or Q visas, subject to time limits
  4. Professional athletes competing in charitable sports events

One critical note from the IRS: "exempt individual" does not mean exempt from US tax. It means your days do not count toward the SPT. You may still have US tax obligations on US-source income.

What is the closer connection exception?

This is the escape hatch. Even if you meet the SPT, you can still be treated as a nonresident alien if you meet all five conditions, according to the IRS closer connection exception page:

  1. You were present in the US fewer than 183 days in the current calendar year
  2. You maintained a tax home in a foreign country for the entire year
  3. You had a closer connection to that foreign country than to the US
  4. You have not applied for, or had pending, lawful permanent resident status (green card)
  5. You file Form 8840 on time

All five must be true. Miss one and the exception fails.

What is Form 8840 and when do you file it?

Form 8840 is the "Closer Connection Exception Statement for Aliens." You attach it to your US tax return. If you are not required to file a US return, you file Form 8840 standalone by the date a return would have been due.

The IRS is clear on timing: if you do not file Form 8840 on time, you cannot claim the closer connection exception. The only way around a late filing is "clear and convincing evidence" that you took reasonable steps to comply. That is a high bar.

How does the IRS determine "closer connection"?

The IRS looks at where your life is centered. According to the closer connection exception guidance, the factors include:

  • Where your permanent home is located
  • Where your family lives
  • Where your personal belongings are kept
  • Where you hold a driver's license and vote
  • Where you have social, cultural, and religious affiliations
  • Where you conduct business
  • What country you designate on official forms like the W-8BEN

No single factor is decisive. The IRS looks at the full picture. If you spend 120 days in the US but your home, family, belongings, and business are all in another country, you likely have a closer connection. If you have a US apartment, a US bank account, a US driver's license, and a US gym membership, the argument gets harder.

Does the SPT apply to US citizens?

No. US citizens are US tax residents regardless of where they live or how many days they spend in the country. The US uses citizenship-based taxation, which means Americans owe taxes on worldwide income even if they live abroad full-time.

Green card holders are also US tax residents under the separate Green Card Test. The SPT is only relevant for foreign nationals without a green card, per IRS Topic No. 851.

How do I track my US days for the SPT?

The SPT requires you to know your exact day count for 3 calendar years. Any part of a day counts. And the weighted formula means you need historical records, not just the current year.

I built Jetseen to handle exactly this kind of multi-year, weighted calculation. The US SPT is one of 12 rule engines in the app. It applies the 1/3 and 1/6 weights automatically and shows you where you stand against the 183-day threshold.

If you track manually, keep a log of every US entry and exit date. Passport stamps work, but flight records and boarding passes are more reliable since not every US entry gets a physical stamp.

FAQ

How many days can I spend in the US without becoming a tax resident? There is no single number. The weighted formula means it depends on your days in the prior 2 years as well. If you had zero US days in the prior 2 years, you can spend up to 182 days this year. If you spent 120 days each of the prior 2 years, your limit this year drops to about 122 days.

Do airport layovers in the US count toward the SPT? Only if you are in the US for 24 hours or more. If you transit through a US airport for less than 24 hours while traveling between two foreign countries, that day does not count.

I meet the SPT but I live abroad. Am I really a US tax resident? Possibly, unless you qualify for the closer connection exception. File Form 8840 to claim it. Consult a US tax professional to determine whether you qualify.

Does the SPT apply to the current year only? The 31-day minimum applies to the current year. The 183-day weighted calculation looks at 3 years: the current year plus the 2 prior years. Your past US visits directly affect your current status.

Can a tax treaty override the SPT? Yes. If a tax treaty between the US and your home country has a residency tie-breaker provision, you may be able to claim treaty benefits. This requires filing Form 8833. Consult a tax professional who understands US tax treaties.


Sources

  1. IRS — Substantial Presence Test

https://www.irs.gov/individuals/international-taxpayers/substantial-presence-test Official IRS page explaining the SPT formula, excluded days, and exempt individuals.

  1. IRS — Closer Connection Exception

https://www.irs.gov/individuals/international-taxpayers/closer-connection-exception-to-the-substantial-presence-test Requirements for claiming the closer connection exception and the factors the IRS considers.

  1. IRS Publication 519 (2025) — U.S. Tax Guide for Aliens

https://www.irs.gov/publications/p519 Comprehensive IRS guide covering residency status, the SPT, excluded days, and tax obligations for aliens.

  1. IRS Topic No. 851 — Resident and Nonresident Aliens

https://www.irs.gov/taxtopics/tc851 Overview of how the IRS determines resident vs nonresident alien status.

  1. IRS — About Form 8840

https://www.irs.gov/forms-pubs/about-form-8840 Information about the Closer Connection Exception Statement form.

  1. IRS — Tax Residency Status Examples

https://www.irs.gov/individuals/international-taxpayers/tax-residency-status-examples Worked examples showing how the SPT applies in different scenarios.