1. What IRC 7701(b) Determines
For U.S. federal income tax purposes, the classification of an individual as a resident alien or a nonresident alien determines the scope of U.S. tax obligations. A resident alien is taxed on worldwide income under the same rules applicable to U.S. citizens. A nonresident alien is taxed only on income from U.S. sources and, for income effectively connected with a U.S. trade or business, on a net basis.
IRC 7701(b) establishes the two tests for determining who is a resident alien: the lawful permanent resident (green card) test and the substantial presence test. An individual who meets either test is classified as a resident alien for the year. An individual who meets neither test is a nonresident alien unless a first-year election applies or a treaty tie-breaker rule overrides the domestic classification.
The classification controls not only the form of the individual's income tax return but also the applicability of the FBAR and FATCA reporting obligations, the scope of estate and gift tax exposure, and the withholding category that applies to U.S.-source payments made to the individual.
2. The Two Tests for Resident Alien Status
Test 1: The Green Card (Lawful Permanent Resident) Test
An individual is a resident alien if, at any time during the calendar year, the individual is a lawful permanent resident of the United States (IRC 7701(b)(1)(A)(i)). A lawful permanent resident is a person who has been issued an immigrant visa (commonly called a green card) and whose status as a permanent resident has not been rescinded or determined by a government authority to have been abandoned.
The green card test applies for the entire year in which the individual first receives permanent resident status. Abandonment of permanent resident status or its administrative revocation terminates the test for future years. The year of abandonment or revocation is typically a dual-status year. Verify the mechanics of green card abandonment and the tax consequences with IRS Publication 519 and current IRS.gov guidance.
Test 2: The Substantial Presence Test
An individual who is not a lawful permanent resident may still be classified as a U.S. resident alien if the individual meets the substantial presence test for the calendar year. The test requires two conditions to be satisfied simultaneously:
- The individual must have been present in the United States for at least 31 days during the current calendar year; AND
- The sum of the weighted day count described in Section 3 must equal 183 or more.
Both conditions must be met. An individual present for 31 or more days in the current year who does not reach the 183-day weighted threshold remains a nonresident alien for that year (subject to any applicable elections). An individual who reaches the 183-day weighted threshold but was present for fewer than 31 days in the current year also remains a nonresident alien.
3. The 183-Day Weighted Formula
The Formula Is Weighted, Not a Simple Day Count
The substantial presence test is NOT a count of total U.S. days over three years. It uses a weighted formula: current year days count in full, prior year days are divided by three, and the year before that are divided by six. Only current-year days above the 31-day minimum are added to this weighted sum. The weighted total must reach 183 for the test to be met in the current year. Verify the formula in IRC 7701(b)(3)(A) and the current-year IRS Publication 519.
The weighted day-count formula under IRC 7701(b)(3)(A) is:
Days present in current year + (1/3 x days present in first preceding year) + (1/6 x days present in second preceding year) = 183 or more
For example (amounts are illustrative only and do not constitute tax advice; verify with the statutory formula for each client's specific facts):
- If an individual was present 120 days in the current year, 90 days in the prior year, and 60 days in the year before that, the calculation would be: 120 + (90/3) + (60/6) = 120 + 30 + 10 = 160 days -- below 183, so the substantial presence test is NOT met.
- If instead the current-year count is 150 days: 150 + 30 + 10 = 190 -- above 183, so the test IS met (assuming the 31-day minimum in the current year is also satisfied).
The formula resets each calendar year. A period of U.S. presence that crosses a year-end is split between the two calendar years at midnight on December 31.
4. Exempt Individuals: Days That Do Not Count
Certain categories of individuals are "exempt individuals" whose days of U.S. presence are excluded from the substantial presence count under IRC 7701(b)(5). An exempt individual's days in the United States do not count toward either the 31-day minimum or the 183-day weighted total during the period of exempt status. The exempt categories include:
- Foreign government employees and their families: Individuals present in the United States under an A or G visa (other than A-3 and G-5) who are employees of a foreign government or international organization.
- Teachers and trainees: Individuals on a J or Q visa who substantially comply with the requirements of the visa and who are not U.S. citizens or lawful permanent residents. The exemption is limited to the first two calendar years following the year of first arrival in the J or Q status.
- Students: Individuals on an F, J, M, or Q visa who substantially comply with the visa requirements. The exemption is generally limited to the first five calendar years following the year of first arrival in the relevant student status. J students are limited to two years.
- Professional athletes: Athletes temporarily present in the United States to compete in charitable sporting events.
- Medical condition exception: Days during which an individual intended to leave the United States but was unable to because of a medical condition that arose while the individual was present in the United States. The medical condition exception requires documentation and the inability to leave -- not merely the choice to stay for medical treatment.
An individual can be an exempt individual for some portion of a year and a non-exempt presence individual for the rest. Days that fall within each category are tracked separately. Verify the current limits on exempt individual status, including the applicable visa categories and time limitations, in IRC 7701(b)(5) and IRS Publication 519.
5. The Closer Connection Exception (Form 8840)
Missing the Form 8840 Deadline Permanently Forfeits the Exception
The closer connection exception is claimed by filing Form 8840 by the due date of the individual's Form 1040-NR for the year (generally June 15 for individuals not subject to withholding at source; April 15 for others, with extension to October 15 available). A taxpayer who fails to timely file Form 8840 generally cannot claim the closer connection exception for that year, and the individual will be treated as a resident alien for the full year the substantial presence test was met. Verify current filing deadlines at IRS.gov.
An individual who meets the substantial presence test (days in the U.S. reach 183 under the weighted formula) but was present in the United States for fewer than 183 days during the current calendar year may still be classified as a nonresident alien if the individual qualifies for the closer connection exception under IRC 7701(b)(3)(B).
Three conditions must all be satisfied for the exception to apply:
- The individual was present in the United States for fewer than 183 days during the current calendar year (not the weighted count -- actual days in the current year);
- During the current year, the individual maintained a tax home (within the meaning of IRC 911(d)(3)) in a foreign country; AND
- During the current year, the individual had a closer connection to that foreign country than to the United States.
The closer connection analysis is facts-and-circumstances based. The IRS considers factors including: the location of the individual's permanent home, family members, personal belongings, professional and social associations, and the country where the individual conducts their primary business. The exception is not available to individuals who have applied for a green card or for whom a petition has been filed to change status to lawful permanent resident.
6. The First-Year Resident Election (IRC 7701(b)(4))
First-Year Election Has Strict Mechanical Requirements
The first-year election requires: (1) the individual was not a U.S. resident in the prior year, (2) the individual was present in the U.S. for at least 31 consecutive days during the election year, (3) the individual was present for at least 75% of the days from the first day of that consecutive-day period through December 31, and (4) the individual was a resident alien in the following year. All four requirements must be met; failure on any one makes the election unavailable. The election is made by attaching a statement to Form 1040 for the following year. Verify the statement requirements in IRC 7701(b)(4) and IRS Publication 519.
The first-year election permits an individual who does not meet the substantial presence test in a given year to elect to be treated as a U.S. resident from the first day of the qualifying 31-day consecutive-presence period. The election results in a dual-status year if the individual was a nonresident before the residency starting date under the election.
The election is intended to assist individuals who arrive in the United States late in the year with the intention of establishing permanent residence in the following year. Without the election, such an individual would be a nonresident alien for the arrival year and a resident alien for the following year, producing a dual-status arrival year. The election converts the dual-status year to a full-year or partial-year resident return.
Because the election is made on the prior year's return filed in the following year, practitioners must coordinate the individual's first-year return with the election statement attached to the following year's return. The election year's return is filed as a resident return only for the period from the residency starting date through December 31; the period before the starting date (if any) is the nonresident period.
7. Treaty Tie-Breaker Provisions
Treaty Tie-Breaker Requires Form 8833 Disclosure
An individual who relies on a treaty tie-breaker to be classified as a resident of the treaty country rather than the United States must file Form 8833 to disclose the treaty-based return position. Failure to file Form 8833 when required may result in a $1,000 penalty (or $10,000 for corporations) per return. The treaty position must be disclosed even if the taxpayer has no U.S. tax liability as a result. Verify current Form 8833 requirements at IRS.gov.
Most U.S. income tax treaties contain a tie-breaker article that resolves dual-residency situations -- those in which an individual is a resident under both U.S. domestic law (IRC 7701(b)) and the treaty country's domestic tax law. Treaty tie-breaker provisions typically apply a hierarchical test:
- Permanent home: the individual is a resident of the country where they have a permanent home available to them.
- Center of vital interests: if a permanent home is available in both countries, the individual is a resident of the country where personal and economic relations are closer.
- Habitual abode: if center of vital interests cannot be determined, the individual is a resident of the country where they habitually abide.
- Nationality: if the individual habitually abides in both countries (or neither), they are a resident of the country of which they are a national.
- Competent authority: if the individual is a national of both countries (or neither), the competent authorities resolve the matter by mutual agreement.
The treaty tie-breaker classification applies only for treaty purposes. The individual's U.S. domestic law residency status under IRC 7701(b) is not changed. As a result, the individual may still have U.S. information reporting obligations (FBAR, Form 8938, Form 3520) that are unaffected by the treaty classification. Verify the specific tie-breaker article in the applicable treaty and whether the treaty has been updated by a protocol or overriding legislation.
8. Dual-Status Tax Years
A dual-status year is a calendar year in which an individual is a U.S. resident alien for part of the year and a nonresident alien for the remainder. Dual-status years commonly arise in:
- The year an individual first satisfies the substantial presence test or becomes a lawful permanent resident (arrival year)
- The year an individual ceases to be a U.S. resident alien and becomes a nonresident alien (departure year)
- The year an individual is classified as a U.S. resident under a first-year election
During the resident period, worldwide income is subject to U.S. income tax on the same basis as a U.S. citizen. During the nonresident period, only U.S.-source income (FDAP, ECI) is subject to U.S. tax. Deductions, credits, and filing thresholds are prorated or modified depending on the period to which they relate.
A dual-status return consists of a Form 1040 or Form 1040-SR covering the resident period as the primary return, plus a Form 1040-NR statement covering the nonresident period attached to it. Certain elections (such as the standard deduction) are unavailable in a dual-status year; itemized deductions may be limited to those relating to U.S.-source income during the nonresident period. Verify current dual-status filing rules in IRS Publication 519.
9. Key Compliance Forms
Residency Starting Date Triggers Withholding Obligations Immediately
The residency starting date is not just a tax-return planning date. Beginning on the residency starting date, the individual is subject to U.S. income tax on worldwide income and U.S.-source payment withholding rules shift from the nonresident alien Chapter 3 regime (30% or treaty rate on FDAP) to the resident alien rules (employer wage withholding plus estimated taxes). Payors who continue to withhold at Chapter 3 rates after the residency starting date may underwithhold, leaving the individual with an unexpected balance due. Coordinate residency starting date with any U.S. employers and payors as soon as it is determined.
The IRC 7701(b) residency framework generates a cluster of interrelated form requirements:
- Form 1040 / Form 1040-SR: Filed by individuals classified as resident aliens for any portion of the year (full-year or dual-status resident period). Due April 15 with automatic 6-month extension to October 15 available on Form 4868.
- Form 1040-NR: Filed by nonresident aliens with U.S.-source income, or for the nonresident period in a dual-status year. Due April 15 (if subject to wage withholding) or June 15 (if not subject to wage withholding at source). Verify current due dates at IRS.gov.
- Form 8840: Closer connection exception statement. Due by the due date of Form 1040-NR (including extensions). Must be filed each year the exception is claimed.
- Form 8833: Treaty-based return position disclosure. Due with the return on which the treaty position is taken. Required when treaty provisions override domestic rules.
- Form 8843: Statement for exempt individuals and individuals with a medical condition. Filed by individuals present in the United States who are exempt from the substantial presence test (students, teachers, diplomats). Due June 15 of the following year (even if no income tax return is required). Verify current requirements at IRS.gov.
- First-year election statement: Attached to the Form 1040 for the year following the election year. Must contain specific information including the election year, the first day of the 31-day consecutive presence period, and certification of the 75% presence requirement. Verify required content in IRC 7701(b)(4) and IRS Publication 519.
10. OBBBA: No Direct Amendments to IRC 7701(b)
The One Big Beautiful Bill Act (OBBBA, Pub. L. 119-21, enacted July 4, 2026) did not amend IRC 7701(b) or the substantial presence test framework. The residency determination rules -- the green card test, the substantial presence formula, the closer connection exception, the first-year election, and the treaty tie-breaker -- remain unchanged from their pre-OBBBA form.
Some OBBBA provisions affect the tax consequences that follow from a residency determination without changing the determination itself. For example, changes to standard deduction amounts, marginal tax rates, and withholding thresholds affect both resident and nonresident taxpayers in ways that flow through from the IRC 7701(b) classification, but do not alter how that classification is made. Practitioners should verify the tax-consequence provisions applicable to their client's classification in the OBBBA text and any implementing IRS guidance issued after July 4, 2026 at IRS.gov.
11. Common Pitfalls in Substantial Presence Analysis
Practitioners frequently encounter the following errors in IRC 7701(b) planning and compliance:
Pitfall 1: Treating the 183-Day Test as a Calendar Count
The most common error is treating the substantial presence test as requiring 183 days in the United States in a single calendar year. The weighted formula means that an individual present for only 122 days in the current year can meet the test if prior-year presence is sufficient. Always apply the three-year weighted formula, not a single-year count.
Pitfall 2: Failing to Track Partial Days
Any day on which an individual is physically present in the United States at any time during the day -- including arrival and departure days, unless they are transit days on an unbroken international itinerary -- generally counts as a full day of presence. Practitioners should use a day-by-day calendar with travel documentation for each client at risk of meeting the substantial presence test.
Pitfall 3: Overlooking the Closer Connection Exception Deadline
The closer connection exception (Form 8840) must be filed by the due date of Form 1040-NR. Because Form 1040-NR is due June 15 for individuals not subject to withholding, practitioners who are accustomed to the April 15 deadline may miss the June 15 Form 8840 filing window if the individual's return is not on extension. An un-extended June 15 Form 1040-NR due date that passes without a Form 8840 permanently forfeits the exception for that year in most circumstances.
Pitfall 4: Misapplying the Exempt Individual Rules
The F and J visa exemptions have time limits: five years for F visa students and two years for J visa students and trainees. An individual who has exceeded the exempt period is no longer exempt from the day count. Practitioners should verify the individual's exempt period start date and remaining exemption time at the beginning of each compliance engagement.
Pitfall 5: Assuming Treaty Protection Without Filing Form 8833
Applying a treaty tie-breaker without disclosing it on Form 8833 exposes the taxpayer to a per-return penalty. The Form 8833 requirement cannot be avoided by simply filing as a nonresident or by omitting U.S.-source income from a Form 1040-NR; the disclosure is required whenever a treaty provision overrides or modifies the domestic rules that would otherwise apply.
12. Claims and Positions Taken in This Guide
Practitioner Claims Notice
This guide makes the following representations or relies on the following legal and factual positions. Each should be verified against current law, IRS guidance, and the specific facts of any client matter before being cited in a tax return, advice letter, or litigation submission.
| # | Claim or Position | Authority / Status |
|---|---|---|
| 1 | Resident alien status is determined by the green card test or the substantial presence test under IRC 7701(b) | IRC 7701(b)(1); settled law; verify at IRS.gov |
| 2 | Substantial presence formula: current-year days + (1/3 x prior-year days) + (1/6 x two-years-prior days) >= 183, with a 31-day current-year minimum | IRC 7701(b)(3)(A); verify current statutory text at IRS.gov |
| 3 | Closer connection exception requires fewer than 183 actual current-year days, a foreign tax home, and a closer connection to a foreign country | IRC 7701(b)(3)(B); verify at IRS.gov |
| 4 | Failure to timely file Form 8840 generally forfeits the closer connection exception for that year | IRC 7701(b)(3)(C); Treas. Reg. 301.7701(b)-2; verify at IRS.gov |
| 5 | First-year election requires 31 consecutive days, 75% presence from first day through December 31, and resident alien status in the following year | IRC 7701(b)(4); verify current requirements in IRS Publication 519 |
| 6 | Treaty tie-breaker classification requires Form 8833 disclosure; failure to file Form 8833 may result in a $1,000 per-return penalty | IRC 6114; Treas. Reg. 301.6114-1; verify at IRS.gov |
| 7 | Illustrative day-count examples in Section 3 are for educational purposes only and do not constitute advice for any specific taxpayer's facts | Labeled "illustrative only" in the text; apply formula to actual client day-count records |
| 8 | OBBBA (Pub. L. 119-21, enacted July 4, 2026) did not amend IRC 7701(b) or the substantial presence test rules | Review of OBBBA enacted text; verify at IRS.gov for any implementing guidance affecting residency determinations |
| 9 | Treaty tie-breaker classification does not eliminate U.S. information reporting obligations (FBAR, Form 8938, Form 3520) | General principle under each reporting statute; verify scope with applicable treaty and IRS.gov guidance |
| 10 | F visa student exemption is generally limited to the first five calendar years; J visa student exemption is generally limited to two calendar years | IRC 7701(b)(5)(D); Treas. Reg. 301.7701(b)-3; verify current limits in IRS Publication 519 and at IRS.gov |
Frequently Asked Questions
How does the IRC 7701(b) substantial presence test work?
An individual meets the substantial presence test if the sum of (a) current-year days present in the U.S., plus (b) one-third of prior-year days present, plus (c) one-sixth of days present two years prior equals 183 or more, AND the individual was present for at least 31 days during the current year. Both conditions must be met. Verify the current statutory formula at IRS.gov.
What is a "day of presence" for substantial presence purposes?
Any day a person is physically present in the United States at any time during that day. Days are excluded for exempt individuals: students on F, J, M, or Q visas (within their exempt period), teachers or trainees on J or Q visas (within their exempt period), foreign government employees on A or G visas, professional athletes at charitable events, and individuals unable to leave due to a medical condition that arose in the U.S. Verify the current excluded-day categories in IRC 7701(b)(3) and (5) and at IRS.gov.
What is the closer connection exception?
Even if the substantial presence test is met, an individual present fewer than 183 actual days in the current year who maintains a foreign tax home and has a closer connection to a foreign country than to the U.S. may claim nonresident status. The exception is claimed on Form 8840, filed by the Form 1040-NR due date. Missing that deadline generally forfeits the exception for the year.
Can a treaty override the IRC 7701(b) residency rules?
Yes, through a treaty tie-breaker provision. An individual who is a resident under both U.S. domestic law and the treaty country's law can be classified as a resident of only one country for treaty purposes, using hierarchical factors (permanent home, center of vital interests, habitual abode, nationality). A treaty position requires Form 8833 disclosure, and information reporting obligations (FBAR, Form 8938, Form 3520) survive the treaty classification. Verify applicable treaty provisions and any superseding protocols at IRS.gov.
What is the first-year election under IRC 7701(b)(4)?
An individual who does not meet the substantial presence test but was present for at least 31 consecutive days and satisfies the 75% presence requirement (days present from the first day of the 31-day period through December 31) may elect to be treated as a resident from the first day of the consecutive-day period, provided the individual is a resident alien in the following year. The election is made by attaching a statement to the following year's Form 1040. All conditions must be satisfied; verify requirements in IRC 7701(b)(4) and IRS Publication 519.
What is a dual-status tax year?
A year in which an individual is a U.S. resident alien for part of the year and a nonresident alien for the rest. Typically occurs in the year of first U.S. residency (arrival year) or the year residency ends (departure year). A dual-status return consists of a Form 1040 (resident period) plus a Form 1040-NR statement (nonresident period). Some deductions and elections are unavailable in a dual-status year. Verify current dual-status rules in IRS Publication 519.
Does the OBBBA change the IRC 7701(b) substantial presence rules?
No. The OBBBA (Pub. L. 119-21, enacted July 4, 2026) did not amend IRC 7701(b). The substantial presence test, green card test, closer connection exception, first-year election, and treaty tie-breaker rules remain unchanged. Some OBBBA provisions affect the tax consequences that flow from a residency classification, but the classification analysis itself is unchanged. Verify at IRS.gov for implementing guidance.
What is the residency starting date under IRC 7701(b)?
Generally the first day of U.S. presence during the calendar year in which the substantial presence test is met. Special rules apply for green card holders (date the card is issued), first-year election filers (first day of the qualifying 31-day period), and individuals relying on treaty tie-breakers (which may classify them as nonresidents despite domestic residency). The residency starting date determines when worldwide income becomes subject to U.S. tax and when withholding obligations shift from Chapter 3 nonresident rates to resident withholding. Verify in IRC 7701(b)(2) and at IRS.gov.