The substantial presence test is an IRS day-counting rule used to decide whether a foreign individual is treated as a U.S. resident alien for federal income tax purposes for a given calendar year. In general, the test looks at physical days in the United States during the current year and the two prior years, using a weighted 183-day formula. It does not decide immigration status, citizenship, visa status, or state tax residency.
For nonresident aliens, international students, visiting scholars, foreign workers, and other people who spend time in the United States, this test can affect which federal tax return form may apply, how U.S.-source income is reported, and whether special nonresident rules may still be relevant. The exact result depends on facts such as days of presence, exempt individual rules, income type, treaty position, filing year, and whether another exception applies.
What the Substantial Presence Test Means
The substantial presence test is one of the main federal tax residency tests used by the IRS. A person who is not a U.S. citizen or lawful permanent resident may still be treated as a U.S. resident alien for federal income tax purposes if they are physically present in the United States long enough under the IRS formula.
The IRS explains the test on its official Substantial Presence Test page. The test generally requires both of these conditions for the calendar year being reviewed:
- At least 31 days of physical presence in the United States during the current year.
- At least 183 counted days over a 3-year period that includes the current year and the two years immediately before it.
The 183-day total is not always a simple count of all days across three years. The IRS formula counts all days in the current year, one-third of the days from the first prior year, and one-sixth of the days from the second prior year.
| Year Used in the Test | How Days Are Counted | Simple Example |
|---|---|---|
| Current year | All U.S. days generally count. | 120 days count as 120 days. |
| First prior year | One-third of U.S. days generally count. | 120 days count as 40 days. |
| Second prior year | One-sixth of U.S. days generally count. | 120 days count as 20 days. |
| Total counted days | The weighted total is compared with the 183-day rule. | 120 + 40 + 20 = 180 counted days. |
Why the Test Matters for U.S. Tax Residency
Federal tax residency affects the way a person is treated under U.S. income tax rules. A nonresident alien is generally taxed under a different federal system than a resident alien. Nonresident aliens often deal with terms such as U.S.-source income, effectively connected income, FDAP income, withholding, Form 1040-NR, Form 1042-S, Form W-8BEN, and tax treaty claims.
A resident alien for federal income tax purposes is usually treated more like a U.S. person for federal income tax reporting. A nonresident alien is generally taxed only on certain U.S.-connected income, depending on the income type and the rules that apply. The IRS gives a broad overview of these categories in Publication 519, U.S. Tax Guide for Aliens.
The substantial presence test does not replace the green card test. A person can be a U.S. resident alien for federal tax purposes by meeting the green card test, the substantial presence test, or in some cases by making a permitted election. The correct tax residency result may also be affected by closer connection rules or an income tax treaty position.
What Counts as a Day of Presence
For the substantial presence test, a day of presence generally includes any day when a person is physically present in the United States at any time during the day. Even a partial day can count unless a specific exception applies.
Some days may be excluded from the count under IRS rules. These exclusions are narrow and fact-based. Common categories discussed by the IRS include certain commuting days from Canada or Mexico, certain transit days of less than 24 hours, certain crew member days, days a person could not leave because of a medical condition that developed while in the United States, and days as an exempt individual.
The phrase exempt individual can be confusing. It does not mean the person is exempt from all U.S. tax. In this setting, it generally means certain days are not counted for the substantial presence test because the person fits a specific IRS category, such as certain students, teachers, trainees, foreign government-related individuals, or professional athletes temporarily present for charitable sports events.
Substantial Presence Test Formula
The basic calculation can be written this way:
Current year U.S. days + 1/3 of first prior year U.S. days + 1/6 of second prior year U.S. days = counted days for the test.
If the counted total reaches 183 days and the person also has at least 31 days of presence in the current year, the person generally meets the substantial presence test unless an exception, exclusion, or treaty position changes the result.
Here is a neutral example. Suppose a person was physically present in the United States for 140 days in the current year, 120 days in the first prior year, and 90 days in the second prior year. The weighted count would generally be 140 + 40 + 15, for a total of 195 counted days. That total is above 183, but the person would still need to review whether any days are excluded and whether any exception may apply.
Who May Need To Understand the Test
The substantial presence test can matter for several groups of people who spend time in the United States. The test is not limited to one visa type, one country, or one kind of income.
- International students in F-1, J-1, or M-1 status may need to understand exempt individual rules and Form 8843.
- Visiting scholars, teachers, and trainees may need to review special day-counting rules for their category.
- Foreign workers may need to track days across the current year and prior years.
- Frequent visitors may need to understand how repeat travel can build toward the weighted day count.
- People with U.S.-source income may need to know whether nonresident or resident alien tax rules apply for the filing year.
Visa classification and federal tax residency are related in practice, but they are not the same thing. A person can hold a nonimmigrant visa and still become a resident alien for federal income tax purposes if the tax residency rules are met.
Exempt Individual Rules for Students and Scholars
Many international students first encounter the substantial presence test through the exempt individual rules. The IRS has a dedicated page on who is treated as a student exempt individual for this day-counting purpose.
In general, certain students can exclude days of presence from the substantial presence test for a limited number of calendar years if they meet the IRS conditions. This is why an F-1 student may still be treated as a nonresident alien for federal tax purposes during early years in the United States, even while physically present for many days.
After the exempt individual period no longer applies, days may begin counting under the substantial presence test unless another rule applies. This is a common reason long-term students, OPT participants, visiting scholars, and trainees review their tax residency status each filing year.
Form 8843 and the Substantial Presence Test
Form 8843, Statement for Exempt Individuals and Individuals With a Medical Condition, is used to explain the basis for excluding certain days of presence from the substantial presence test. It is often associated with international students and scholars, but it can also apply to other IRS categories.
Form 8843 is not the same as Form 1040-NR. Form 8843 explains an excluded-day position. Form 1040-NR is a federal income tax return for certain nonresident aliens. Depending on the facts, a person may encounter one form, both forms, or different reporting steps.
The IRS page for Form 1040-NR, U.S. Nonresident Alien Income Tax Return, explains that the form is used by nonresident alien individuals, estates, and trusts to file a U.S. income tax return when the form applies.
Closer Connection Exception
Some people who meet the substantial presence test may still be treated as nonresident aliens for federal income tax purposes if they meet the closer connection exception. This exception is narrow and depends on the current-year day count, tax home, closer connection facts, timing, and filing requirements.
The IRS explains the rule on its Closer Connection Exception to the Substantial Presence Test page. In general, this area should be checked carefully because it may involve Form 8840 and deadlines for claiming the exception.
Form 8840, Closer Connection Exception Statement for Aliens, is the IRS form used to claim the closer connection exception to the substantial presence test. A person who may be relying on this rule should review the official form instructions for the filing year.
Residency Starting Date
Meeting the substantial presence test can also raise a timing question: when does U.S. tax residency begin for that year? The answer may matter in dual-status situations, where a person is treated as a nonresident alien for part of the year and a resident alien for another part of the year.
The IRS explains on its Residency Starting and Ending Dates page that, if a person meets the substantial presence test for a calendar year, the residency starting date is generally the first day the person is present in the United States during that calendar year. Special rules may apply, including rules for prior-year residency, the green card test, and certain excluded days.
Federal Tax Residency Is Not the Same as State Residency
The substantial presence test is a federal tax rule. It does not automatically decide state residency, state-source income, part-year resident status, or whether a state return may be relevant.
States can use their own residency concepts. Some states look at domicile, permanent place of abode, statutory residency days, part-year residency, or state-source income. A person may be a nonresident alien for federal tax purposes and still need to review state tax rules if they lived, worked, studied, or earned income in a state.
Because state rules vary, federal substantial presence results should not be used as the only basis for a state tax conclusion. Official state tax agency instructions are usually the best starting point for state-specific questions.
Common Misunderstandings
| Misunderstanding | Safer Way To Understand It |
|---|---|
| “183 days means only the current year.” | The main test uses a weighted 3-year formula, although current-year days still matter. |
| “A visa status decides tax residency by itself.” | Visa category can affect the rules, but federal tax residency is decided under tax rules. |
| “Exempt individual means exempt from all tax.” | For this topic, it usually means certain days are excluded from the substantial presence test. |
| “Form 8843 is the same as a tax return.” | Form 8843 explains excluded days. Form 1040-NR is a nonresident alien income tax return when that return applies. |
| “Federal residency decides state residency.” | Federal and state tax residency rules are separate. State rules must be checked by state. |
Related Forms and Terms
Several forms and terms often appear near the substantial presence test. They do not all apply to every person, but they help explain the wider nonresident tax setting.
| Form or Term | General Meaning | How It Relates |
|---|---|---|
| Nonresident alien | A foreign individual who is not treated as a resident alien for federal income tax purposes. | The substantial presence test helps decide whether this status changes for a given year. |
| Resident alien | A foreign individual treated as a U.S. resident for federal income tax purposes. | A person may become a resident alien by meeting the substantial presence test or green card test. |
| Form 8843 | A statement used by certain exempt individuals or people with a qualifying medical condition. | It can support excluded days for the substantial presence test. |
| Form 8840 | A statement used to claim the closer connection exception. | It may be relevant when a person meets the day count but claims closer connection treatment. |
| Form 1040-NR | A U.S. income tax return used by certain nonresident aliens. | It may be relevant if nonresident alien filing rules apply. |
| Form 1042-S | An information form often used for certain payments to foreign persons. | It may report income and withholding that a nonresident alien may need to review. |
| W-8BEN | A certificate of foreign status for certain withholding purposes. | It may be used in some nonresident income and treaty withholding settings. |
| ITIN | An Individual Taxpayer Identification Number issued by the IRS for certain tax processing needs. | It may be relevant when a person has a U.S. tax filing need but is not eligible for an SSN. |
| Tax treaty | An agreement between the United States and another country that may affect certain tax treatment. | A treaty position may affect residency or income treatment in specific cases. |
Simple Review Checklist
A careful review of the substantial presence test usually starts with clear records, not guesses. The following checklist is general and should not be treated as personal filing advice.
- Identify the tax year being reviewed.
- Count physical days in the United States for the current year.
- Count physical days in the United States for each of the two prior years.
- Apply the 1, 1/3, and 1/6 weighting formula.
- Review whether any days may be excluded under IRS rules.
- Check whether Form 8843, Form 8840, or another statement may be relevant.
- Review whether Form 1040-NR or another federal return form may apply.
- Check whether state tax rules need separate review.
- Use official instructions for the filing year before making a filing decision.
Educational Note
This article is for general educational information only. It is not tax, legal, financial, or immigration advice. Nonresident tax rules can depend on visa status, days of presence, income type, treaty position, state law, and filing year. Readers should verify details with official sources or a qualified tax professional.
FAQ
Does the Substantial Presence Test Decide Immigration Status?
No. The substantial presence test is used for U.S. federal tax residency. It does not decide visa status, immigration status, citizenship, or lawful permanent resident status.
Does Every Day in the United States Count?
Not always. A day of physical presence generally counts, but IRS rules exclude certain days, such as some exempt individual days, qualifying transit days, and certain medical-condition days.
Does an F-1 Student Automatically Become a Resident Alien After Five Years?
Not automatically. After the student exempt individual period no longer applies, days may begin counting under the substantial presence test. The result depends on the facts for the filing year.
Is Form 8843 the Same as Form 1040-NR?
No. Form 8843 explains why certain days are excluded from the substantial presence test. Form 1040-NR is a federal income tax return used by certain nonresident aliens.
Can Someone Meet the Substantial Presence Test and Still Be Treated as a Nonresident Alien?
In some cases, yes. A closer connection exception or a tax treaty position may affect the result, but these rules have specific conditions and filing requirements.
Does the Substantial Presence Test Control State Tax Residency?
No. The substantial presence test is a federal tax rule. State residency and state-source income rules are separate and vary by state.
Resources Used
- IRS: Substantial Presence Test — Official IRS explanation of the 31-day rule, 183-day weighted formula, and general day-counting exceptions.
- IRS Publication 519, U.S. Tax Guide for Aliens — IRS publication covering resident alien and nonresident alien tax concepts, including substantial presence rules.
- IRS: About Form 8843 — IRS page explaining Form 8843 for exempt individuals and certain medical-condition day exclusions.
- IRS: Exempt Individual — Who Is a Student — IRS page explaining student exempt individual treatment for substantial presence test day counting.
- IRS: Closer Connection Exception to the Substantial Presence Test — IRS explanation of the closer connection exception and related filing points.
- IRS: About Form 8840 — IRS page for Form 8840, used to claim the closer connection exception.
- IRS: Residency Starting and Ending Dates — IRS page explaining when tax residency may begin or end under federal rules.
- IRS: About Form 1040-NR — IRS page describing the U.S. Nonresident Alien Income Tax Return.