Substantial Presence Test Explained: Are You a US Tax Resident?
Updated April 12, 2026
Also available in Portugues, Espanol
Quick answer
You pass the Substantial Presence Test if you were in the US at least 31 days in the current year and the weighted total of the current year (1x), prior year (1/3x), and two years back (1/6x) equals 183 or more days. Passing makes you a US tax resident required to file Form 1040.
What Is the Substantial Presence Test?
The Substantial Presence Test (SPT) is the IRS formula for determining whether a foreign national is a resident alien for US federal tax purposes. If you pass the test, you are taxed like a US citizen on your worldwide income and must file Form 1040. If you do not pass, you are a nonresident alien and file Form 1040-NR, generally paying tax only on US-sourced income.
The test does not care about your immigration status. An H-1B holder, an L-1 holder, and even an overstay can pass the SPT. Green card holders are automatically resident aliens regardless of days present.
How to Calculate the Substantial Presence Test
Step 1: Check the 31-Day Requirement
You must have been physically present in the United States for at least 31 days during the current calendar year. If you were not in the US at all this year, or for fewer than 31 days, you cannot pass the SPT for this year.
Step 2: Apply the Weighted Three-Year Formula
Count your US days using this formula:
- Current year days: count at full value (multiply by 1)
- Prior year days: multiply by 1/3
- Two years ago days: multiply by 1/6
Add all three results. If the total is 183 or more, you pass the Substantial Presence Test.
Example Calculation
Suppose you were in the US for 120 days in 2024, 150 days in 2023, and 180 days in 2022:
| Year | Days | Multiplier | Count |
|---|---|---|---|
| 2024 (current) | 120 | x 1 | 120 |
| 2023 (prior year) | 150 | x 1/3 | 50 |
| 2022 (two years ago) | 180 | x 1/6 | 30 |
| Total | 200 |
200 is greater than 183, so you pass the SPT for 2024 and are a resident alien.
Exempt Individuals: Days That Do Not Count
Certain people are "exempt individuals" whose days in the US do not count toward the SPT:
- Foreign government employees (A or G visa holders) and their immediate families
- Teachers and trainees on J or Q visas (exempt for 2 of the past 6 years)
- Students on F, J, M, or Q visas (exempt for 5 calendar years total)
- Professional athletes temporarily in the US for charity events
Being an exempt individual is not automatic - you must file Form 8843 each year to claim exempt status.
The Closer Connection Exception
Even if you pass the SPT formula, you can still be treated as a nonresident alien if you qualify for the closer connection exception. To qualify, you must:
- Have been present in the US for fewer than 183 days in the current year
- Maintain a tax home in a foreign country for the entire year
- Have closer connections to that foreign country than to the US
Connections the IRS considers include: where you maintain your home, where your family lives, where you keep your personal belongings, where you conduct business, where you hold a driver's license, where you vote, and where you have bank accounts.
To claim this exception, file Form 8840 (Closer Connection Exception Statement for Aliens) by the due date of your return. If you do not file it, you cannot claim the exception for that year.
The First-Year Election
If you do not pass the SPT in a given year but you do pass it the following year, you may elect to be treated as a resident alien for part of the prior year. This "first-year election" can be beneficial if you want to file jointly with a US citizen or resident spouse for the earlier year.
Requirements:
- You were not a US resident in the prior year
- You are a resident in the current year (under the SPT)
- You were present in the US for at least 31 consecutive days in the prior year and for at least 75% of the days from that starting date to December 31
The election is made by attaching a statement to Form 1040 for the election year.
Dual-Status Years
In the year you first pass the SPT, you may be a nonresident for part of the year and a resident for the rest. This is a "dual-status year." You file Form 1040 with a Form 1040-NR attached for the nonresident portion. Dual-status filers cannot claim the standard deduction and cannot file jointly.
What Passing Means for Your Tax Obligations
Once you are a US resident alien, your obligations expand significantly:
- File Form 1040 reporting all worldwide income
- Pay FICA taxes (Social Security and Medicare) on wages
- Report foreign bank accounts if total balances exceed $10,000 at any point (FinCEN 114, due April 15)
- File FBAR/Form 8938 if you have significant foreign financial assets
- Report ownership or control of foreign corporations, partnerships, or trusts
Missing these obligations can result in substantial penalties. Form 3520 penalties for missed foreign trust/gift reporting, for example, start at 35% of the unreported amount.
Key Forms Related to the SPT
- Form 8843 - Filed by exempt individuals (F, J, M, Q visa holders) to exclude days from the SPT count; due April 15
- Form 8840 - Closer connection exception claim; due June 15 for nonresidents who earned no US wages
- Form 1040 - Filed if you pass the SPT
- Form 1040-NR - Filed if you do not pass the SPT
- FinCEN 114 - Foreign bank account report; due April 15 (automatic extension to October 15)
Get Your Personalized Form List
The Substantial Presence Test is just the first step. Your exact filing obligations depend on your visa, your days in the US, and your income sources. Answer a few questions and get a personalized checklist in minutes.
Not sure which forms apply to you?
Get a personalized list of forms and deadlines in 5 minutes - free, no signup required.
Start Free DiagnosticCommon Questions
It is the IRS formula used to determine if a foreign national is a US tax resident. You pass if you were present in the US for at least 31 days this year and the three-year weighted day count totals 183 or more.
Yes. All days you were physically present in the US count - including weekends, holidays, and vacation days. Partial days also count as full days, with narrow exceptions for transit and commuters.
You become a US resident alien for tax purposes and must file Form 1040, reporting all worldwide income. You may also owe FICA taxes and have foreign account reporting obligations.
This article is educational information only. It is not tax, legal, or financial advice. For decisions specific to your situation, consult a licensed CPA or Enrolled Agent.