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).
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.
120 + (120 ÷ 3) + (120 ÷ 6) = 120 + 40 + 20 = 180What 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.
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
| Category | General Treatment | Important Condition |
|---|---|---|
| Exempt individual | Qualifying days are excluded | |
| Medical condition | Certain days may be excluded | |
| Commuter from Canada or Mexico | Qualifying regular commuter days may be excluded | |
| Crew member | Certain days may be excluded | |
| Days in U.S. in transit | Limited exclusion can apply | |
| Certain charitable athletes | Qualifying 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.
Five calendar years — Must qualify as a student and substantially comply with the requirements of the nonimmigrant student status.
Five calendar years — J-1 student rules apply separately from J-1 teacher/trainee rules.
Two calendar years — A four-year exception may apply when the regulatory requirements are satisfied.
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.
Attach Form 8843 to the return.
Mail Form 8843 separately by the due date, including permitted extensions, to the address in the current Form 8843 instructions.
Form 8843 Filing Deadlines
| Filing Situation | Typical Calendar-Year Deadline | Notes |
|---|---|---|
| Form 8843 attached to Form 1040-NR with wages subject to withholding | April 15 | |
| Standalone Form 8843 when no income-tax return is required | June 15 | |
| Valid tax-return extension | Extended 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.
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.
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.
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.
Where you maintain a permanent home and how that home compares with your U.S. living arrangements.
Where immediate family and other close personal relationships reside.
Location of bank accounts, investments, employment, business activities, and other financial relationships.
Connections such as organizations, driver's license, voting registration where legally applicable, and other community ties.
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.
May remain a nonresident alien while qualifying student days are excluded, subject to the applicable student rules.
Generally does not receive an F-1/J-1 student exclusion and often must use the SPT normally unless another exception applies.
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.
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.
Resident Alien vs Nonresident Alien Tax Treatment
| Issue | Resident Alien | Nonresident Alien |
|---|---|---|
| Primary federal return | Generally Form 1040 | |
| Worldwide income | Generally subject to U.S. federal income tax | |
| Foreign income | Generally included subject to applicable exclusions/credits/treaties | |
| Foreign financial reporting | FBAR/Form 8938 may apply depending on facts and thresholds | |
| SPT exclusions | Usually no student exempt-individual exclusion once resident rules apply | |
| Tax treaty | May 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.
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.
May be required for qualifying foreign financial accounts when the aggregate maximum value exceeds $10,000 at any time during the calendar year.
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
The person satisfies the 31-day condition and reaches 185 weighted days, so the general SPT is met unless an exception applies.
The person is below 183 weighted days, so the general SPT is not met.
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
No. The general SPT uses the three-year weighted formula.
Incorrect. The student rule concerns exclusion of qualifying days from the SPT; it does not make the student immune from U.S. income tax.
Incorrect. J-1 students generally use the student rules, while teachers and trainees are subject to a separate rule.
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.
No. Students have a separate student-specific closer-connection exception that is claimed through Form 8843.
Incorrect. The general closer-connection exception, student-specific exception, and treaty rules can affect residency.
Too broad. FBAR and Form 8938 have separate thresholds and filing rules.
Incorrect. FICA treatment depends on nonresident status, the connection to the visa purpose, and separate student FICA exceptions.
No. Immigration status can be relevant, but federal tax residency uses the Green Card Test, SPT, exemptions, exceptions, and treaties.
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.
2026 SPT Filing Checklist
Frequently Asked Questions (6)
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.
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.
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.
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.