Home/USA/Guides/Tax Residency/Substantial Presence Test Spt Rules
IRS Tax ResidencyUpdated: September 2026

IRS Substantial Presence Test (SPT) Guide

Calculate U.S. tax residency using the three-year day-count formula, understand which days F-1 and J-1 students can exclude, and learn when Form 8843 or Form 8840 can preserve nonresident status.

Executive Summary & Core SPT Principles

Under Internal Revenue Code (IRC) § 7701(b), the Substantial Presence Test (SPT) is an objective physical-day-count formula used by the IRS to classify noncitizens as U.S. resident aliens for federal income-tax purposes. Unlike immigration status, federal tax residency is determined by presence duration rather than visa classification.

To satisfy the SPT, an individual must be physically present in the United States for at least 31 days during the current calendar year, and achieve a weighted sum of at least 183 days over a three-calendar-year lookback: 100% of current-year days, 1/3 of first-prior-year days, and 1/6 of second-prior-year days. Qualifying 'exempt individuals' (such as F-1 students in their first 5 calendar years and J-1 scholars in their first 2 calendar years) exclude their physical days by timely filing Form 8843.

Crucial tax distinctions: Meeting the SPT subjects an individual to U.S. federal taxation on worldwide income (reported on Form 1040) and may trigger foreign financial asset disclosures (FinCEN Form 114 / FBAR and Form 8938). However, taxpayers meeting the 183-day threshold can preserve nonresident status through the general Closer Connection Exception (Form 8840, if under 183 current-year days), the student closer-connection rule (Form 8843), or bilateral tax treaty tie-breaker positions (Form 8833).

Weighted 183-Day Formula: Current year days (1.0x) + immediately preceding year days (1/3x) + second preceding year days (1/6x) must equal or exceed 183, with a 31-day current-year floor.
Exempt Individuals Exclude Days: F-1 and J-1 students exclude qualifying days for up to 5 calendar years; J-1 scholars and researchers exclude days for up to 2 calendar years via Form 8843.
Form 8843 Filing Mechanics: Form 8843 is mandatory to document exempt days. It is attached to Form 1040-NR by April 15 (if wage income exists) or mailed standalone to the IRS Austin Center by June 15.
Closer Connection Exceptions: General exception filed via Form 8840 requires < 183 days in current year and a foreign tax home. Foreign students have a separate closer-connection exception claimed directly on Form 8843.
Tax Residency vs. FICA: Resident alien status eliminates the nonresident F-1/J-1 FICA tax exemption, though on-campus student FICA exemptions under IRC § 3121(b)(10) may still apply during active enrollment.

How the 183-Day SPT Formula Works

The IRS Substantial Presence Test uses a three-calendar-year calculation. The test looks at days of physical presence in the current year and weights days from the two preceding years.

To generally meet the test, an individual must have been present in the United States for at least 31 days during the current calendar year and have a weighted total of at least 183 days.

The formula is: all qualifying U.S. days in the current year + one-third of the qualifying U.S. days in the immediately preceding year + one-sixth of the qualifying U.S. days in the second preceding year.

Formula: SPT total = Current-year days + (1/3 × first-prior-year days) + (1/6 × second-prior-year days)
Calculation Walkthrough:
120 + (120 ÷ 3) + (120 ÷ 6) = 120 + 40 + 20 = 180
The weighted total is 180, so the individual does not meet the 183-day threshold, assuming all counted days are otherwise included.
Do not simply add three years of physical-presence days. The prior two years are weighted fractions.

What Counts as a Day of Presence?

For SPT purposes, a day of presence generally includes any day on which an individual is physically present in the United States at any time during the day.

The calculation can therefore produce very different results from an ordinary immigration-style count based only on complete 24-hour periods.

However, the tax code provides several exceptions and special rules under which particular days are not counted. These exclusions must be evaluated before performing the final SPT calculation.

Key Principle:

The correct workflow is not simply 'count every calendar day.' First identify qualifying U.S. presence, then remove days that the law allows you to exclude.

Days That May Be Excluded From the SPT Calculation

CategoryGeneral TreatmentImportant Condition
Exempt individualQualifying days are excluded
Medical conditionCertain days may be excluded
Commuter from Canada or MexicoQualifying regular commuter days may be excluded
Crew memberCertain days may be excluded
Days in U.S. in transitLimited exclusion can apply
Certain charitable athletesQualifying days may be excluded

F-1 and J-1 Students: The 'Exempt Individual' Rule

The IRS uses the term 'exempt individual' for certain people whose U.S. days are not counted toward the Substantial Presence Test. The term does not mean that the person is exempt from U.S. income tax.

Students temporarily present in the United States under F, J, M, or Q classifications can qualify for student-day exclusion when they substantially comply with the requirements of their status and satisfy the applicable tax rules.

The student exclusion is subject to calendar-year limits. Generally, a student cannot exclude days as a student for more than five calendar years, although an additional exception can apply when the student establishes the required facts concerning intent and compliance.

A J-1 individual who entered as a student is subject to the student five-calendar-year framework. J-1 teachers and trainees are governed by a separate two-year rule, with a possible four-year exception under the applicable requirements.

F-1 student

Five calendar years — Must qualify as a student and substantially comply with the requirements of the nonimmigrant student status.

J-1 student

Five calendar years — J-1 student rules apply separately from J-1 teacher/trainee rules.

J-1 teacher/trainee

Two calendar years — A four-year exception may apply when the regulatory requirements are satisfied.

The 'five years' rule is a calendar-year rule, not simply five consecutive 12-month periods.

Form 8843: Claiming Excluded Days

A person who excludes U.S. days because they qualify as an exempt individual generally must file Form 8843 to explain the basis for the exclusion.

The IRS also uses Form 8843 for people who claim a qualifying medical-condition exclusion. It is therefore not exclusively an F-1 student form.

If the person is otherwise required to file Form 1040-NR, Form 8843 is generally attached to that return. If no federal income-tax return is required, the person generally sends Form 8843 separately to the IRS address specified in the current instructions.

The current 2026 Form 8843 instructions direct standalone 2026 Form 8843 filings to the IRS Center in Austin, Texas, with the exact address stated in the current form instructions.

You file Form 1040-NR

Attach Form 8843 to the return.

You are not required to file Form 1040-NR

Mail Form 8843 separately by the due date, including permitted extensions, to the address in the current Form 8843 instructions.

The original 'Form 8843 is always due June 15' rule is too broad. The deadline generally follows the Form 1040-NR due-date rules. A calendar-year taxpayer with wages subject to withholding can have an April 15 deadline, while a taxpayer not required to file because there are no such wages can generally have a June 15 deadline.

Form 8843 Filing Deadlines

Filing SituationTypical Calendar-Year DeadlineNotes
Form 8843 attached to Form 1040-NR with wages subject to withholdingApril 15
Standalone Form 8843 when no income-tax return is requiredJune 15
Valid tax-return extensionExtended deadline

The Student Five-Year Rule Is Not Completely Automatic

The IRS generally limits student exempt-individual treatment to five calendar years when the person has used the student exception.

A student who has been present in the United States in exempt status for more than five calendar years may still be able to exclude days in a particular year if the student establishes to the IRS's satisfaction that they do not intend to reside permanently in the United States and have substantially complied with the requirements of their nonimmigrant status.

The IRS considers facts such as the student's connection to a foreign country and whether affirmative steps have been taken toward permanent residence.

How many calendar years have you already claimed or used exempt-individual treatment?
Were you present under an F, J, M, or Q classification?
Did you substantially comply with the requirements of the immigration status?
Have you taken steps toward lawful permanent residence?
Where is your closer connection and long-term home?

Form 8840: The General Closer Connection Exception

Even when an individual otherwise meets the Substantial Presence Test, the general closer-connection exception can allow the person to remain a nonresident alien if all statutory conditions are satisfied.

The current IRS requirements generally include being present in the United States for fewer than 183 days during the current calendar year, having a tax home in a foreign country during the year, and maintaining a closer connection to one foreign country in which the person has that tax home than to the United States.

The exception is not available to an individual who has an application pending for adjustment of status to lawful permanent resident or who has applied or taken steps to apply for lawful permanent residence.

Form 8840 must generally be timely filed to claim the exception. If the person files a U.S. income-tax return, the form is attached to that return. If no return is required, it is sent separately to the IRS address in the instructions.

Fewer than 183 days physically present in the United States during the current calendar year
A tax home in a foreign country during the year
A closer connection to one foreign country in which the tax home is located
No disqualifying application or steps toward lawful permanent resident status
Timely filing of Form 8840
The closer-connection exception does not apply merely because your home, family, or bank account is abroad. Every statutory requirement must be satisfied.

Students Have a Separate Closer-Connection Exception

The original entry overlooked an important distinction: students have a separate closer-connection exception in addition to the general Form 8840 exception.

The IRS explains that the general closer-connection exception is often unavailable to foreign students because of its fewer-than-183-days current-year requirement. Instead, a qualifying foreign student who otherwise meets the SPT can potentially use the student-specific exception.

The student-specific exception requires the student to establish that they do not intend to reside permanently in the United States, substantially complied with the student immigration requirements, did not take steps toward changing nonimmigrant status toward lawful permanent residence, and maintained a closer connection to a foreign country than to the United States.

The IRS instructs qualifying students to use Form 8843 to claim this student exception rather than treating the claim as the ordinary Form 8840 closer-connection exception.

No intent to reside permanently in the United States
Substantial compliance with student immigration requirements
No steps taken toward lawful permanent resident status through a qualifying status change process
Closer connection to a foreign country under the applicable factors
Appropriate Form 8843 filing
A foreign student should not automatically use Form 8840 simply because they have strong ties abroad. The student-specific exception has its own rules and is claimed through Form 8843.

What the IRS Considers a 'Closer Connection'

The IRS looks at objective facts and circumstances when evaluating closer connection. There is no single factor that automatically wins the test.

Permanent home

Where you maintain a permanent home and how that home compares with your U.S. living arrangements.

Family

Where immediate family and other close personal relationships reside.

Economic connections

Location of bank accounts, investments, employment, business activities, and other financial relationships.

Social and civic ties

Connections such as organizations, driver's license, voting registration where legally applicable, and other community ties.

Duration and regularity

The length, frequency, and nature of presence in the United States compared with the foreign country.

SPT Is a Tax Test, Not an Immigration Test

A person can have valid nonimmigrant immigration status and still be a U.S. resident alien for federal tax purposes. Conversely, a person can be physically present in the United States and remain a nonresident alien when a statutory exemption or applicable treaty rule applies.

The IRS therefore does not simply determine tax residency from the visa label in a passport.

This distinction is especially important for H-1B, L-1, O-1, TN, F-1, and J-1 holders, whose immigration status can remain unchanged while their federal tax residency changes from year to year.

F-1 student

May remain a nonresident alien while qualifying student days are excluded, subject to the applicable student rules.

H-1B worker

Generally does not receive an F-1/J-1 student exclusion and often must use the SPT normally unless another exception applies.

J-1 teacher/trainee

May be an exempt individual for a limited period under the J-1 teacher/trainee rules.

The Green Card Test Can Make You a Resident Even Without SPT

The Substantial Presence Test is not the only federal test for resident-alien status. The IRS also uses the Green Card Test.

A lawful permanent resident is generally treated as a resident alien under the Green Card Test for federal income-tax purposes unless another provision, such as a treaty tie-breaker, changes the result.

Therefore, someone holding a Green Card should not rely on a low day count alone to conclude that they are a nonresident.

SPT is only one part of the tax-residency analysis. Always check the Green Card Test and treaty residency rules when applicable.

Tax Treaties Can Change the Result

A taxpayer can sometimes be a resident of both the United States and another country under each country's domestic law. A bilateral income-tax treaty may then provide tie-breaker rules for determining treaty residency.

The IRS explains that when an individual is treated as a resident of the foreign country under the applicable treaty tie-breaker, the individual can generally be treated as a nonresident alien for U.S. income-tax purposes when the treaty requirements are met.

Taxpayers claiming treaty treatment may need to file Form 8833, Treaty-Based Return Position Disclosure, depending on the specific treaty position and disclosure requirements.

Determine domestic U.S. residency first under the internal revenue code.
Determine foreign-country residency under that country's tax rules.
Read the specific treaty's residence article and sequential tie-breaker hierarchy (permanent home, center of vital interests, habitual abode, nationality).
Check whether Form 8833 treaty-based position disclosure is required to be attached to Form 1040-NR.
Review treaty-specific articles for students, teachers, researchers, or government employees.

Resident Alien vs Nonresident Alien Tax Treatment

IssueResident AlienNonresident Alien
Primary federal returnGenerally Form 1040
Worldwide incomeGenerally subject to U.S. federal income tax
Foreign incomeGenerally included subject to applicable exclusions/credits/treaties
Foreign financial reportingFBAR/Form 8938 may apply depending on facts and thresholds
SPT exclusionsUsually no student exempt-individual exclusion once resident rules apply
Tax treatyMay still matter in dual-residency circumstances

FICA Taxes Are a Separate Analysis

The original content treated the F-1 student exemption from Social Security and Medicare taxes as an automatic five-year benefit. That is too broad.

The IRS explains that nonresident aliens in F-1, J-1, M-1, or Q-1 status can generally be exempt from Social Security and Medicare taxes on services performed in connection with the purpose of the visa and while the individual remains a nonresident alien.

Once the individual becomes a resident alien, the special NRA FICA exemption generally no longer applies. A separate student FICA exception can apply to qualifying services performed by students for the school at which they are enrolled, subject to the statutory requirements.

Tax residency and FICA treatment are related but not identical. Do not state that every F-1 student is FICA-exempt for five years.

Worldwide Income, FBAR and FATCA Are Separate Rules

A U.S. resident alien generally follows the same federal income-tax rules as a U.S. citizen and reports worldwide income, subject to applicable tax treaties, credits, exclusions, and other provisions.

However, becoming a resident alien does not by itself determine whether every foreign financial account or asset must be reported. FBAR and Form 8938 have separate definitions, thresholds, filing rules, and exceptions.

The original claim that passing SPT automatically creates both FBAR and FATCA obligations should therefore be replaced with a separate foreign-asset-reporting analysis.

FinCEN Form 114 (FBAR)

May be required for qualifying foreign financial accounts when the aggregate maximum value exceeds $10,000 at any time during the calendar year.

Form 8938 (FATCA)

May be required for specified foreign financial assets when applicable filing thresholds (e.g., $50,000 to $100,000 depending on filing status) are exceeded.

How to Calculate Your SPT Correctly

11. Start with the current calendar year

Count qualifying days of physical presence in the United States during the current year.

22. Check the 31-day minimum

If you were not present at least 31 days during the current year, the general SPT is not met.

33. Count qualifying days from the prior two years

Identify physical-presence days for each of the two preceding calendar years.

44. Remove legally excluded days

Apply exempt-individual, medical-condition, commuter, crew-member, transit, athlete, and other applicable statutory exclusions.

55. Apply the weighting

Multiply the current year by 1, the first preceding year by 1/3, and the second preceding year by 1/6.

66. Compare against 183

If the weighted total is at least 183 and the 31-day requirement is satisfied, you generally meet the SPT.

77. Check exemptions and exceptions

Review exempt-individual status, the general closer-connection exception, the student-specific closer-connection exception, and any other statutory exceptions.

88. Check the Green Card Test

A lawful permanent resident generally has a separate basis for resident-alien status.

99. Review tax treaties

If dual residency exists, examine the applicable treaty and whether Form 8833 disclosure is necessary.

Worked SPT Examples

Example 1 — Meets SPT

The person satisfies the 31-day condition and reaches 185 weighted days, so the general SPT is met unless an exception applies.

Example 2 — Does Not Meet SPT

The person is below 183 weighted days, so the general SPT is not met.

Example 3 — Student Exclusion Changes the Result

If the 120 current-year days are legitimately excludable under the student rules, only 30 current-year days enter the SPT formula, reducing the weighted total to 110.

Common SPT Mistakes

“183 days means 183 physical days in the current year.”

No. The general SPT uses the three-year weighted formula.

“F-1 students are exempt from U.S. tax for five years.”

Incorrect. The student rule concerns exclusion of qualifying days from the SPT; it does not make the student immune from U.S. income tax.

“Every J-1 holder gets a two-year exemption.”

Incorrect. J-1 students generally use the student rules, while teachers and trainees are subject to a separate rule.

“Form 8843 is always due June 15.”

Too broad. The deadline generally follows the applicable Form 1040-NR filing deadline, which can be April 15 or June 15 for calendar-year taxpayers depending on the filing situation.

“Form 8840 is the form every F-1 student uses for closer connection.”

No. Students have a separate student-specific closer-connection exception that is claimed through Form 8843.

“If you pass SPT, no exception can save nonresident status.”

Incorrect. The general closer-connection exception, student-specific exception, and treaty rules can affect residency.

“Resident alien automatically means FBAR and FATCA.”

Too broad. FBAR and Form 8938 have separate thresholds and filing rules.

“All F-1 wages are FICA-exempt for five years.”

Incorrect. FICA treatment depends on nonresident status, the connection to the visa purpose, and separate student FICA exceptions.

“A visa category determines your tax residency.”

No. Immigration status can be relevant, but federal tax residency uses the Green Card Test, SPT, exemptions, exceptions, and treaties.

“Every day you spend in the U.S. is automatically counted.”

No. Several statutory exclusions and special counting rules exist.

F-1/J-1 Record-Keeping Checklist

Students and exchange visitors should maintain a year-by-year physical-presence and immigration-status history rather than relying on memory when preparing a tax return.

Passport entry and exit stamps
CBP I-94 travel history
Passport biographical pages
All relevant Forms I-20
All relevant Forms DS-2019
SEVIS records where available
Visa pages
School enrollment records
Form 8843 copies
Form 1040-NR copies
Form 8840 copies where applicable
Form 8833 copies where a treaty position was claimed
Travel itineraries and boarding passes where needed to reconstruct disputed dates

2026 SPT Filing Checklist

Count U.S. physical-presence days for 2026.
Count qualifying days for 2025 and 2024.
Identify and document all legally excludable days.
Determine whether you qualify as an exempt student, teacher, trainee, or other exempt individual.
Determine whether Form 8843 is required.
Calculate the weighted 183-day total.
Check the Green Card Test separately.
Check the general Form 8840 closer-connection exception.
If you are a qualifying foreign student, check the separate student closer-connection exception.
Review applicable income-tax treaties and Form 8833 requirements.
Determine whether Form 1040 or Form 1040-NR is required.
Analyze FBAR and Form 8938 independently.
Analyze FICA treatment independently from income-tax residency.
Review state tax residency separately.
Keep a complete copy of the residency calculation and supporting documents.

Frequently Asked Questions (6)

You generally need at least 31 days of physical presence in the current calendar year and a weighted total of at least 183 days. The current year counts at 100%, the immediately preceding year at one-third, and the second preceding year at one-sixth. Before doing the calculation, remove days that the tax code allows you to exclude, such as qualifying exempt-individual days.

A qualifying F-1 student can generally exclude days of U.S. presence as an exempt individual for up to five calendar years, subject to the detailed IRS student rules. The five-year period is a calendar-year limitation, not simply five consecutive 12-month periods. An additional exception can apply after five calendar years when the student establishes the required facts concerning intent and substantial compliance.

No. The deadline generally follows the applicable Form 1040-NR filing deadline. A calendar-year taxpayer with wages subject to U.S. income-tax withholding generally has an April 15 deadline, while a person who does not have to file a return and files Form 8843 separately can generally have a June 15 deadline. Valid extensions can affect the deadline.

Form 8840 is generally used to claim the general Closer Connection Exception to the SPT. Form 8843 is used to explain qualifying excluded days for exempt individuals and qualifying medical-condition exclusions, and it is also used by eligible foreign students claiming the separate student-specific closer-connection exception. The two forms should not be treated as interchangeable.

Potentially. Depending on the facts, you may qualify for the general Closer Connection Exception, the separate student exception, or a tax-treaty residency tie-breaker. Each has its own requirements. For example, the general closer-connection exception generally requires fewer than 183 current-year U.S. days, a foreign tax home, and a closer connection to one foreign country, while the student-specific exception has different requirements.

No. Becoming a resident alien generally changes your federal income-tax treatment and can subject worldwide income to U.S. taxation, but FBAR and Form 8938 are separate information-reporting regimes with their own definitions, thresholds, exceptions, and filing requirements. Analyze foreign-account and foreign-asset reporting separately.
Official U.S. Government References & Legal Authorities
IRS — Substantial Presence TestInternal Revenue Service

Primary IRS source for the 31-day requirement, 183-day weighted formula, exempt-individual categories, Form 8843 requirement, closer-connection exceptions, and excluded days.

Comprehensive IRS guide covering resident/nonresident alien status, SPT, Green Card Test, exempt individuals, students and scholars, closer connection, tax treaties, and filing requirements.

Current IRS student-specific rules, including the five-calendar-year limitation, substantial-compliance requirements, and Form 8843.

IRS — Taxation of J-1 IndividualsInternal Revenue Service

Current IRS explanation of J-1 student versus teacher/trainee day-exclusion rules and the five-year and two-year frameworks.

Primary IRS source for the general Form 8840 closer-connection exception and its filing requirements.

Primary IRS source for the separate student-specific closer-connection exception and the four requirements students must establish.

IRS — 2026 Form 8843Internal Revenue Service

Current 2026 Form 8843 showing filing instructions, due-date framework, student and teacher/trainee sections, and the I-94/status information used in the form.

IRS — 2025 Publication 519Internal Revenue Service

Current published tax-year guidance used for the resident/nonresident alien framework while the relevant 2026 tax-year publications continue to be issued.

IRS summary of resident versus nonresident treatment, Form 1040 versus 1040-NR, worldwide income for resident aliens, and treaty considerations.

Current IRS guidance distinguishing FICA treatment for qualifying nonresident foreign students from the separate student FICA exemption.

IRS source confirming worldwide-income treatment for resident aliens and separately discussing FBAR obligations.

Official source for treaty-based positions and disclosure requirements.

Legal & Compliance Disclaimer

This guide provides general federal tax information based on current IRS guidance and is not individualized tax advice. U.S. tax residency can depend on the Substantial Presence Test, Green Card Test, exempt-individual rules, closer-connection exceptions, medical-condition exceptions, tax treaties, dual-status rules, and the exact facts of the taxpayer's immigration and physical-presence history. State tax residency is a separate analysis.

Live Expat FX Tool 0% Hidden Spread
International Money Transfer & FX Rates

Sending funds for tuition, rent, or immigration fees? Retail banks sneak 2.5%–4% into exchange rates. Check today's real mid-market rate first.

High-Street Banks:~3.5% Hidden Markup
Wise Mid-Market:Zero Markup (Google Rate)
Compare Live Exchange Rate
⚡ Free live comparison • 50+ currencies supported
Expat Remote Work Security 256-Bit Encrypted
U.S. Expat Privacy & Remote Work Security

Secure your remote connection and confidential employment filings with high-speed U.S. encrypted servers.

Expat Special:Up to 71% Off + 3 Mos Free
Starting At:$3.19 / month
Protect Your Connection
🛡️ Risk-free • 30-day money-back guarantee
SPT Essentials

The Substantial Presence Test generally looks at U.S. physical presence during the current calendar year and the two preceding calendar years. You generally need at least 31 days in the current year and a weighted total of at least 183 days. Certain days are excluded, including qualifying days of an exempt individual. F-1 and certain J-1 students can exclude qualifying days subject to the applicable student rules and Form 8843.

Current-Year Minimum:31 Days
Weighted Threshold:183 Days
Current-Year Weight:100%
Prior-Year Weights:1/3 and 1/6