Home Tax Guide U.S. Income Tax Guide Substantial Presence Test

U.S. Income Tax Guide · IRC § 7701(b)

Substantial Presence Test for U.S. Tax Residency

The Substantial Presence Test determines when a non-U.S. citizen who is physically present in the United States becomes a U.S. resident alien for federal income tax purposes. The test uses a 31-day minimum and a weighted 183-day formula covering the current year and the two preceding calendar years.

Federal Tax Residence

A Mechanical Residence Test Based Primarily on Physical Presence

IRC § 7701(b) classifies a non-U.S. citizen as a resident alien if the individual meets the Green Card Test, the Substantial Presence Test or, in certain circumstances, makes the First-Year Election.

The Substantial Presence Test is primarily a day-count test. It does not ask where an individual is domiciled, where the individual intends to live permanently or where the center of vital interests is located. Those concepts may become relevant later for the closer-connection exception or under an applicable income tax treaty.

If the test is met and no exception or treaty position applies, the individual is generally treated as a U.S. resident alien and becomes subject to U.S. federal income taxation on worldwide income.

IRC § 7701(b)(3)

The 31-Day and 183-Day Requirements

Both conditions must be satisfied: the individual must be physically present in the United States for at least 31 days during the current calendar year, and the weighted three-year day count must equal or exceed 183 days.

Current year × 1
+ prior year × 1/3
+ second prior year × 1/6
= 183 days or more

Example

An individual spends 130 days in the United States in 2026, 120 days in 2025 and 90 days in 2024.

  • 2026: 130 × 1 = 130
  • 2025: 120 × 1/3 = 40
  • 2024: 90 × 1/6 = 15
  • Total = 185 weighted days

Because the individual was also present for at least 31 days in 2026, the Substantial Presence Test is met unless an exception applies.

Physical Presence

Any Part of a Day Generally Counts as a Full Day

Treas. Reg. § 301.7701(b)-1 generally treats an individual as present in the United States on any day on which the individual is physically present in the country at any time during that day.

Arrival Day

A day generally counts even if the individual arrives late in the evening. The rule is based on physical presence at any time during the day, subject to statutory exclusions.

Departure Day

The day of departure generally also counts if the individual was physically present in the United States during any part of that day.

Calendar Years

The formula uses calendar-year presence. The current year is counted in full, the immediately preceding year at one-third and the second preceding year at one-sixth.

Treas. Reg. § 301.7701(b)-1

Days That Do Not Count

Physical Presence Does Not Always Mean a Countable SPT Day

IRC § 7701(b)(3), (5) and (7), together with Treas. Reg. § 301.7701(b)-3, exclude several categories of days from the Substantial Presence Test.

Regular Commuters

Qualifying individuals who regularly commute to employment or self-employment in the United States from a residence in Canada or Mexico do not count qualifying commuting days.

Transit Under 24 Hours

Presence in the United States for less than 24 hours while in transit between two points outside the United States is generally excluded.

Foreign Vessel Crew

Days of temporary presence as a regular crew member of a foreign vessel engaged in transportation between the United States and a foreign country may be excluded, subject to the statutory conditions.

Medical Condition

Days may be excluded when an individual is unable to leave the United States because of a medical condition that arose while the individual was present in the United States.

Exempt Individuals

Certain foreign-government-related individuals, teachers or trainees, students and qualifying professional athletes may exclude days under special rules.

Form 8843

Individuals excluding days because of exempt-individual status or certain medical conditions generally need to address Form 8843 and its filing requirements.

“Exempt individual” does not mean exempt from U.S. tax. The term is technical. It means that qualifying days are excluded when applying the Substantial Presence Test. The person may still have U.S.-source income and U.S. filing obligations.

Treas. Reg. § 301.7701(b)-3

Students, Teachers & Trainees

Visa Status Can Change Which Days Count

F, J, M and Q Status

Certain individuals temporarily present under qualifying student, teacher or trainee status may be treated as exempt individuals for limited periods. The detailed limitations depend on the individual’s category and prior years of exempt status.

The Exclusion Is Not Permanent

Once the statutory time limitations are exceeded, later U.S. presence can begin counting toward the Substantial Presence Test even though the immigration status itself has not changed.

IRC § 7701(b)(3)(B)

Closer Connection Exception

An individual can satisfy the weighted 183-day formula and still avoid resident-alien status under the SPT if the statutory closer-connection exception applies.

A central requirement is that the individual must have been physically present in the United States for fewer than 183 actual days during the current year.

  • fewer than 183 actual U.S. days in the current year
  • foreign tax home maintained during the required period
  • closer connection to the foreign country than to the United States
  • no disqualifying steps toward lawful permanent resident status
  • Form 8840 generally required

Facts and Circumstances

What the IRS Considers for a Closer Connection

Permanent Home

Where the individual maintains a permanent home or homes available for personal use.

Family

Where the spouse, children and other immediate family relationships are centered.

Personal Belongings

Where automobiles, furniture, clothing and other personal possessions are maintained.

Business & Banking

Location of business activities, banking relationships and other economic connections.

Licenses & Registrations

Driver’s license, voting registration and addresses used on official documents can be relevant.

Country of Residence

The residence reported on official forms and documents is part of the overall factual analysis.

IRS Closer Connection guidance

Residency Starting Date

Meeting the Test Can Create a Part-Year U.S. Resident Period

If an individual meets the SPT for the current year and was not a U.S. resident in the preceding year, the residency starting date is generally the first day of presence in the United States during the current year.

First Day of Presence

The residence period generally begins on the first U.S. day in the year, not on the day the weighted calculation finally reaches 183.

Up to 10 Nominal Days

Under the special de minimis rule, up to 10 days of presence may be disregarded when determining the residency starting or termination date if the foreign-tax-home and closer-connection requirements are established. Those days still count for determining whether the SPT itself is met.

Treas. Reg. § 301.7701(b)-4

Administrative Guidance

Primary IRS and Treasury Guidance

IRC § 7701(b)

The statute contains the resident-alien definition, 31-day rule, weighted 183-day calculation, closer-connection exception, exempt-individual rules and first/last-year residence provisions.

U.S. Code

Treas. Reg. § 301.7701(b)-1

Provides the core regulatory rules for resident aliens, physical presence, the SPT calculation and examples.

Regulation

Treas. Reg. § 301.7701(b)-2

Provides the detailed rules for the foreign tax home and closer-connection exception.

Regulation

Treas. Reg. § 301.7701(b)-3

Addresses exempt individuals and days excluded because of qualifying medical conditions and other special rules.

Regulation

IRS Publication 519

The IRS U.S. Tax Guide for Aliens explains resident/nonresident status, the SPT, excluded days, closer connection and dual-status years.

Publication 519

Forms 8840 and 8843

Form 8840 is generally used to claim the closer-connection exception; Form 8843 is relevant to certain excluded-day claims by exempt individuals and individuals with qualifying medical conditions.

IRS Forms

Treaty Override

A Tax Treaty Can Produce Nonresident Treatment Even After the SPT Is Met

An individual may be a U.S. resident under § 7701(b) and simultaneously a resident of another country under that country’s domestic law. If an applicable income tax treaty assigns treaty residence to the foreign country, the individual may be treated as a nonresident for U.S. income tax purposes under the treaty coordination rules.

Treas. Reg. § 301.7701(b)-7

The regulations coordinate domestic resident-alien status with treaty residence. A dual-resident alien claiming treaty nonresident treatment generally has special return and disclosure requirements.

Treaty coordination rule

Form 8833

A treaty-based return position commonly requires Form 8833. Treaty treatment should not be confused with the closer-connection exception under Form 8840; they are separate legal routes.

Form 8833

Relevant Case Law

Decisions Illustrating the Substantial Presence Rules

Because the SPT is largely statutory and mechanical, there is less interpretive case law than for fact-intensive residence concepts. The following decisions are useful for specific aspects of the regime.

D.N.D. 199984 F. Supp. 2d 1043

North Dakota State University v. United States

The court addressed foreign teachers and trainees in J-1 status and the statutory limitation on excluding days as an “exempt individual.” Once the permitted exempt period was exhausted, physical-presence days began counting toward the SPT.

Practical significance: A visa category does not necessarily exclude U.S. days indefinitely. Prior years of exempt-individual status must be reviewed.

Decision
Fed. Cl. 2019Walby v. United States

Meeting the SPT Creates Resident-Alien Status

The Court of Federal Claims applied § 7701(b) to an individual physically present in the United States throughout the relevant years and noted that a person meeting the SPT is treated as resident beginning with the applicable residency starting date.

Practical significance: Once the statutory day-count rules apply and no exception is available, resident-alien status follows by operation of law.

Decision
S.D. Cal. 2023Aroeste

Aroeste v. United States – Treaty Coordination

Aroeste did not turn on the arithmetic of the SPT itself, but it illustrates the separate treaty route by which an individual who is a domestic-law U.S. resident can claim residence in another treaty country for U.S. income tax purposes.

Practical significance: Passing the SPT does not necessarily end the analysis when another country also treats the individual as a tax resident. Treaty disclosure requirements are critical.

Decision
Planning PointDay Count

Most SPT Disputes Are Documentation Problems

The formula itself is usually straightforward. The difficult issues are often whether particular days count, whether exempt-individual status remains available, whether a medical or transit exclusion applies, and whether the closer-connection or treaty route was properly documented.

Practical significance: Reliable travel records and timely Forms 8840, 8843 or 8833 can be as important as the mathematical calculation.

Practical Checklist

How to Analyze the Test

1. Confirm Status

Is the individual a U.S. citizen or Green Card holder? If so, the SPT may not be the primary residence test.

2. Build the Travel Calendar

Compile every U.S. arrival and departure for the current year and the two preceding calendar years.

3. Identify Excluded Days

Separate transit, commuter, crew, medical-condition and exempt-individual days before applying the formula.

4. Apply the Formula

Confirm the 31-day current-year minimum and calculate the weighted three-year total.

5. Test Exceptions

If the SPT is met, evaluate closer connection and, where relevant, treaty residence.

6. Determine Filing Status

Identify the residency starting date and whether Form 1040, Form 1040-NR, a dual-status return and disclosure forms are required.

Cross-Border Context

Germany–U.S. Residency

For individuals with ties to Germany, the SPT is only the U.S. domestic-law starting point. German tax residence must be determined separately, followed by treaty coordination if both countries treat the individual as resident.

Frequently Asked Questions

Substantial Presence Test

Is the Substantial Presence Test simply a 183-day rule?
No. The standard test requires at least 31 days of physical presence in the current year and a weighted total of at least 183 days over the current year and two preceding calendar years.
Does every day in the United States count?
Generally any part of a day counts, but specific statutory exclusions apply, including certain transit days, qualifying commuter days, crew-member days, medical-condition days and days of qualifying exempt individuals.
If I spend fewer than 183 actual days in the United States, can I still become a resident?
Yes. The weighted three-year formula can reach 183 even when actual current-year presence is below 183 days. The closer-connection exception should then be considered if its separate requirements are met.
What is Form 8840?
Form 8840 is generally used to claim the closer-connection exception to the Substantial Presence Test. It addresses the foreign tax home and the individual’s personal and economic connections.
What is Form 8843?
Form 8843 is used in connection with certain claims that days of U.S. presence should be excluded because the individual is an exempt individual or because of a qualifying medical condition.
Can a tax treaty override the SPT?
A person can be a U.S. resident under domestic law but claim residence in another treaty country under an applicable treaty tie-breaker. This is separate from the closer-connection exception and commonly involves Form 8833 and special return rules.

U.S. Tax Advice

Are You Close to the U.S. Residency Threshold?

We review travel days, excluded-day rules, closer connection, residency starting dates, treaty positions and the resulting U.S. filing obligations.

Schedule an Initial Consultation