The Substantial Presence Test is not a simple rule that asks whether a person spent 183 days in the United States during one year. For federal income tax purposes, the test uses two separate thresholds: at least 31 countable days in the calendar year being tested and at least 183 weighted days across that year and the two immediately preceding calendar years.
Current-year days count in full. Days from the previous calendar year count at one-third, and days from the second previous calendar year count at one-sixth. Before applying those fractions, however, the day count has to reflect any IRS rules that exclude particular days from the test.
The result determines federal tax residency under the Substantial Presence Test. It does not determine immigration status, grant lawful permanent residence, or automatically determine residency under state tax law. The Green Card Test is a separate federal tax residency test.
The 183-Day Test Uses Three Calendar Years
The calculation has two conditions, and both have to be satisfied for the numerical Substantial Presence Test to be met:
- There must be at least 31 countable days of U.S. presence in the current calendar year.
- The three-year weighted total must be at least 183 days.
The three-year calculation is:
Current-year countable days + (previous-year countable days ÷ 3) + (second-previous-year countable days ÷ 6)
| Calendar Year | Weight | If Present for 120 Countable Days |
|---|---|---|
| Current year | 100% | 120 days |
| Previous year | 1/3 | 40 days |
| Second previous year | 1/6 | 20 days |
| Weighted total | — | 180 days |
A person with 120 countable days in each of the three years therefore has a weighted total of 180, not 360. The 183-day requirement is not met in that example.
The calculation can also work in the opposite direction. With 130 countable days in the current year, 120 in the previous year, and 120 in the second previous year, the calculation is 130 + 40 + 20 = 190 weighted days. The person does not need 183 current-year days to reach the 183-day weighted threshold.
The 31-Day Minimum Is a Separate Requirement
A high three-year total cannot replace the current-year 31-day requirement. Consider a person with 30 countable days in the current year and 365 countable days in each of the two preceding years:
30 + (365 ÷ 3) + (365 ÷ 6) = 212.5 weighted days
The weighted amount exceeds 183, but the person has only 30 current-year countable days. The numerical Substantial Presence Test is therefore not met because the separate 31-day condition fails.
A Partial Day in the United States Usually Counts
The general IRS rule treats a person as present in the United States on a day when the person is physically present in the country at any time during that day. An arrival late in the evening or a departure early in the morning can therefore produce a day of presence even though only part of the day was spent in the country.
For this test, the IRS definition of the United States includes all 50 states, the District of Columbia, U.S. territorial waters, and certain adjacent seabed and subsoil areas over which the United States has resource rights. U.S. territories and U.S. airspace are not included in this definition for the Substantial Presence Test.
Physical presence is only the starting point. Several categories of days are specifically left out of the SPT count when their conditions are satisfied.
Some Days of Physical Presence Are Not Counted
| Type of Day | SPT Treatment | Condition That Matters |
|---|---|---|
| Ordinary physical presence | Generally counted | Being in the United States for any part of the day generally creates a day of presence. |
| Regular commute from Canada or Mexico | May be excluded | The person must satisfy the IRS regular-commuter rules. |
| Transit of less than 24 hours | May be excluded | The trip must be between two places outside the United States and the U.S. activity must relate to completing that travel. |
| Foreign vessel crew member | May be excluded | The special rule applies to qualifying regular crew members and can be lost if other U.S. trade or business activity is conducted on the day. |
| Medical condition arising while in the United States | May be excluded | The condition must prevent a planned departure and satisfy the medical-condition rules. |
| Qualifying NATO presence | May be excluded | The rule applies to specified members of a force or civilian component of NATO; dependent-family rules differ. |
| Day as an exempt individual | Not counted while the status applies | The person must fall within one of the statutory exempt-individual categories and remain within the applicable limits. |
Regular Commuters From Canada or Mexico
The commuter rule is narrower than simply living in Canada or Mexico while working occasionally in the United States. IRS Publication 519 treats a person as regularly commuting when the person commutes to work in the United States on more than 75% of the workdays during the relevant working period. For this purpose, commuting generally means traveling to work and returning to the foreign residence within a 24-hour period.
Transit Through the United States
A stay of less than 24 hours can be excluded when a person is in transit between two places outside the United States. The activity in the United States must relate to completing the foreign-to-foreign trip. Changing planes at a U.S. airport can fit the rule. Attending a business meeting during the stop generally does not fit the transit treatment merely because the total stay remains under 24 hours.
Crew Members of Foreign Vessels
Days temporarily spent in the United States as a regular crew member of a foreign vessel engaged in transportation between the United States and a foreign country or U.S. territory can be excluded. The exception does not apply to a day on which the crew member otherwise engages in a U.S. trade or business.
Medical Conditions That Prevent Departure
The medical rule does not exclude every day on which a visitor is sick or receives treatment. It applies to days on which a person intended to leave the United States but could not leave because of a medical condition or problem that arose while the person was in the country.
IRS Publication 519 also identifies circumstances in which this exclusion does not apply. These include remaining in the United States beyond a reasonable period for departure arrangements after becoming able to leave, returning to the United States for treatment of a condition that arose during an earlier stay, and a condition that existed before arrival when the person was aware of it.
A qualifying medical-condition exclusion is connected with Form 8843 and depends on the facts surrounding the intended departure. It is not created simply by subtracting medical days from a travel calendar.
“Exempt Individual” Does Not Mean Exempt From U.S. Tax
The phrase exempt individual has a narrow meaning within the Substantial Presence Test. It refers to a person whose qualifying days are not counted for this particular residency test. It does not mean that the person or the person’s income is automatically exempt from U.S. tax.
The IRS identifies four main exempt-individual categories for SPT purposes:
- Certain foreign government-related individuals, generally including qualifying persons temporarily present under an A or G visa other than A-3 or G-5.
- Qualifying teachers or trainees temporarily present under J or Q status.
- Qualifying students temporarily present under F, J, M, or Q status.
- Professional athletes temporarily present to compete in qualifying charitable sports events, with the exclusion limited to qualifying competition days.
A visa label alone does not establish that every day can be excluded. The applicable category, activity, prior years of exempt status, compliance with the immigration classification, and other category-specific conditions can affect the count.
Student Exempt Years Are Measured by Calendar Year
For an F, J, M, or Q student, the five-year concept is based on calendar years, not five sets of 365 days. Even a partial calendar year can matter when counting prior exempt years.
Under Publication 519, a student generally is no longer treated as an exempt individual under the ordinary student rule after having been exempt as a teacher, trainee, or student for any part of more than five calendar years. The publication also describes a facts-and-circumstances route after that period when the person can establish no intent to reside permanently in the United States and has substantially complied with the visa requirements. This makes a simple “F-1 days never count” assumption unreliable.
Teachers and Trainees Have a Different Prior-Year Rule
The time limit for a J or Q teacher or trainee is not the same as the student rule. Publication 519 generally prevents teacher-or-trainee exempt treatment in a current year when the person was exempt as a teacher, trainee, or student for any part of two of the six preceding calendar years. A narrower exception involving foreign-employer compensation and other conditions can apply in some cases.
Because the student and teacher-or-trainee rules look backward to prior calendar years, changing from one qualifying classification to another does not necessarily reset the history used to determine exempt-individual treatment.
Form 8843 and the Day-Exclusion Rules
Form 8843, Statement for Exempt Individuals and Individuals With a Medical Condition, is used to explain the basis for excluding certain days from the Substantial Presence Test. It is associated with qualifying teachers or trainees, students, professional athletes at charitable sports events, and individuals claiming the medical-condition exclusion.
The form does not create an exclusion merely because a number of days is entered on it. The underlying category and its conditions still have to apply. Conversely, IRS rules can restrict the ability to exclude days when a required Form 8843 is not filed on time, subject to the relief standards described by the IRS for qualifying circumstances.
This is also why an SPT calculator cannot safely decide that a day is excluded based only on a visa type or a short description of a medical event. The legal classification of the day comes before the arithmetic.
Calculate the Weighted Day Total
The calculator below performs only the numerical portion of the Substantial Presence Test. The inputs are countable days after any valid exclusions have already been determined. It does not decide whether a student, teacher, commuter, crew member, medical condition, treaty position, or other exception satisfies IRS requirements.
Physical Days and Countable Days Can Be Very Different
Suppose a person is physically in the United States for 250 days during the current year, but 220 of those days fall within an IRS exclusion that validly applies to that person. The current-year SPT count would be 30 days, not 250.
That difference can change the result before the prior two years are even considered. With only 30 countable current-year days, the separate 31-day condition is not met.
The same distinction applies to the two preceding years. The amounts multiplied by one-third and one-sixth are the days recognized for the SPT calculation after applying the relevant day-count rules, not automatically every date shown on an arrival-and-departure history.
Reaching 183 Weighted Days May Not End the Residency Analysis
Meeting both numerical conditions generally makes a noncitizen a U.S. resident alien for federal income tax purposes under the Substantial Presence Test. There are, however, rules that can change how a person who meets the test is treated.
One is the closer connection exception. Under the general IRS rule, a person who otherwise meets the SPT can still be treated as a nonresident for federal tax purposes when the closer-connection requirements are satisfied. Those requirements include being present in the United States for fewer than 183 days during the current year, maintaining a tax home in a foreign country during the year, and having a closer connection to that foreign country than to the United States.
The exception also has limitations involving steps toward lawful permanent resident status. A person who personally applies for, takes specified affirmative steps toward, or has a pending application for adjustment to lawful permanent resident status can be prevented from using the closer-connection exception. The IRS also provides a separate set of conditions for certain cases involving closer connections to two foreign countries.
The Two 183-Day Rules Measure Different Things
| Rule | What 183 Refers To |
|---|---|
| Substantial Presence Test | A weighted total covering the current calendar year and the two preceding calendar years. |
| Closer connection exception | A limit based on presence during the current calendar year under the applicable day-count rules. |
A person can therefore have fewer than 183 current-year days while still exceeding 183 weighted days under the three-year SPT formula. For example, 170 current-year countable days plus weighted contributions from the previous two years can produce an SPT total above 183. That is the type of situation in which the closer-connection rules may become relevant if their other conditions are also satisfied.
Form 8840 Is Different From Form 8843
The two forms address different parts of the residency analysis.
| Form | Role in the SPT Analysis |
|---|---|
| Form 8843 | Explains the basis for excluding qualifying days because of exempt-individual status or a qualifying medical condition. |
| Form 8840 | Is used to claim the closer connection to a foreign country or countries exception after the relevant requirements are met. |
Form 8843 is therefore associated with determining which days enter the SPT calculation. Form 8840 addresses a different question: whether a person who would otherwise meet the SPT can be treated as a nonresident under the closer-connection exception.
The IRS imposes timing and eligibility rules on these statements. The current form and instructions for the calendar year involved matter because a missing or late statement can affect the treatment being claimed, with only limited relief available in specified circumstances.
A Tax Treaty Can Produce a Separate Residency Analysis
The closer-connection exception is not the same as an income tax treaty residency rule. A person can be treated as a resident under U.S. domestic tax law while also being treated as a resident by another country under that country’s law. If an applicable U.S. income tax treaty contains residency tie-breaker rules, those treaty provisions can resolve the competing residence claims for treaty purposes.
Publication 519 explains that a dual-resident taxpayer who is treated as a resident of the foreign country under an applicable treaty can be treated as a nonresident alien when figuring U.S. income tax under the treaty position. Treaty treatment can also carry separate reporting rules. It should not be treated as another way of changing the weighted SPT arithmetic itself.
Passing the Test and Determining the Residency Starting Date Are Different Calculations
Meeting the Substantial Presence Test answers whether the test is satisfied for a calendar year. A separate rule determines when residency begins within that year.
When the SPT is met, the residency starting date is generally the first day of presence in the United States during that calendar year. A limited rule can allow up to 10 days of early U.S. presence to be disregarded when determining the residency starting date if the applicable foreign tax-home and closer-connection conditions are established for those days.
Those early days are not removed from the Substantial Presence Test itself. Publication 519 specifically requires them to remain in the day count used to determine whether the SPT is met. The rule changes the potential residency starting date, not the three-year weighted calculation.
For example, a short qualifying visit early in the year followed by a later move to the United States can create two separate questions. The early visit may still count toward the SPT while, under the up-to-10-day rule and its conditions, not becoming the first day of residency. A statement to the IRS is required when this residency-starting-date treatment is claimed.
The First-Year Choice Is Another Separate Rule
A person who does not meet the Green Card Test or SPT for one year but meets the SPT in the following year can, in some circumstances, use the first-year choice to be treated as a resident for part of the earlier year. The IRS rule includes its own 31-consecutive-day presence condition and a 75% presence requirement for the relevant period, with limited treatment of certain absences.
Those rules do not alter the ordinary SPT formula. They address a separate choice concerning the beginning of residency in a year before the person first meets the SPT.
Why a Travel Calendar Alone Can Produce the Wrong Result
An entry-and-exit calendar can establish the starting pool of physical-presence days, but it does not necessarily establish the SPT count. The calculation may also require knowing why a person was in the United States, the immigration classification during the period, whether prior exempt calendar years exist, whether a transit or commuter rule applies, and whether an exclusion requires a supporting statement.
Records commonly relevant to the day-count analysis include passport entry and departure information, U.S. Customs and Border Protection arrival/departure records, travel itineraries, immigration-status records, prior-year presence calculations, and records supporting any day exclusion being used. A person relying on exempt-individual treatment may also need to distinguish years in which days were physically spent in the United States from years in which those days were excluded from the SPT.
Three errors can otherwise produce very different numbers: treating all physical days as countable days, treating all days under a particular visa as automatically excluded, or applying the one-third and one-sixth fractions before determining the correct countable days for the earlier years.
Federal SPT status also should not be carried directly into a state residency analysis. States can use domicile, statutory residency, part-year residency, day counts, permanent-place-of-abode rules, or other state-specific standards. Federal resident-alien status and state tax residency are separate classifications.
Resources Used
- IRS — Substantial Presence Test — Official rules for the 31-day requirement, three-year weighted calculation, days of presence, and excluded-day categories.
- IRS Publication 519, U.S. Tax Guide for Aliens — Detailed rules for exempt individuals, medical exclusions, closer connection, treaty residency, and residency starting dates.
- IRS — Form 8843 — Official information for the statement used in connection with exempt-individual and medical-condition day exclusions.
- IRS — Form 8840 — Official information for the closer connection exception statement.
- IRS — Residency Starting and Ending Dates — Rules governing when federal tax residency begins after a residency test is met.
- IRS — Tax Residency Status: First-Year Choice — Official explanation of the separate first-year choice and its presence requirements.