The day count that decides your tax residence
An alien who spends enough days in the United States becomes a resident alien for income tax purposes, and a resident alien pays United States tax on worldwide income. The substantial presence test counts your days on a weighted formula, and if the formula reaches 183, you are a resident unless an exception saves you. The closer connection exception in 26 U.S.C. 7701(b)(3)(B) is that exception, and Form 8840 is the statement that claims it.
The substantial presence test, in numbers
Section 7701(b)(3)(A) sets two conditions. First, you must be present in the United States on at least 31 days during the current calendar year. Second, the weighted sum of your days of presence over three years must equal or exceed 183 days. Days in the current year count at full value, days in the first preceding year at one third, and days in the second preceding year at one sixth.
Maya is a Canadian citizen whose tax home is Toronto. She visited the United States for client work: 60 days in 2024, 120 days in 2025, and 150 days in 2026. Her weighted count for 2026 is 150 plus 40 plus 10, which equals 200 days, so she meets the substantial presence test for 2026 and, without an exception, is a resident alien taxed on worldwide income.
The money at stake is concrete. Maya earned 90,000 dollars of Canadian-source consulting income in 2026. As a resident alien, that income enters her United States return. At a 22 percent marginal rate, the illustrative United States tax on that foreign-source income is 19,800 dollars, before any foreign tax credit. As a nonresident alien, the same 90,000 dollars is foreign-source income not effectively connected with a United States trade or business, and the United States tax on it is zero. The difference is 19,800 dollars on this fact pattern alone.
The closer connection exception: three conditions, two bars
Section 7701(b)(3)(B) states the exception in one sentence with three conditions: the individual is present in the United States on fewer than 183 days during the current year, and it is established that for the current year she has a tax home in a foreign country and a closer connection to that foreign country than to the United States. All three must hold. Maya passes the first because 150 is fewer than 183.
The tax home requirement borrows its definition from section 911(d)(3): a tax home is the general area of an individual's principal place of business or employment, or, for one with no regular place of business, the place of abode. Regulation section 301.7701(b)-2(c) confirms the same meaning for section 7701(b). Maya's practice, clients, and business bank are all in Toronto.
Section 7701(b)(3)(C) removes the exception entirely for two situations: the individual had an application for adjustment of status pending at any time during the year, or took other steps to apply for status as a lawful permanent resident. The Form 8840 instructions repeat the bars: 183 days or more present, lawful permanent residence, or an application for a green card. A pending green card application is the most common way this exception dies quietly.
The ten-factor test: where the closer connection is proved
The statute says "closer connection" without defining it. Treasury Regulation section 301.7701(b)-2(d) fills the gap: an individual has a closer connection to a foreign country than to the United States if she has maintained more significant contacts with the foreign country, and the regulation lists ten facts and circumstances to be considered. Publication 519 reproduces the same list. The examiner weighs the whole picture.
| Factor | Evidence that supports the foreign country | Authority |
|---|---|---|
| Permanent home | Home available at all times | Reg. 301.7701(b)-2(d)(1); Pub. 519 |
| Family | Spouse and children living there | Reg. 301.7701(b)-2(d)(2); Pub. 519 |
| Personal belongings | Cars, furniture, clothing kept abroad | Reg. 301.7701(b)-2(d)(3); Pub. 519 |
| Affiliations | Current memberships abroad | Reg. 301.7701(b)-2(d)(4); Pub. 519 |
| Routine banking | Everyday personal banking location | Reg. 301.7701(b)-2(d)(5); Pub. 519 |
| Business activities | Business outside the tax home | Reg. 301.7701(b)-2(d)(6); Pub. 519 |
| Driver's license | License issued abroad | Reg. 301.7701(b)-2(d)(7); Pub. 519 |
| Voting | Registered to vote abroad | Reg. 301.7701(b)-2(d)(8); Pub. 519 |
| Residence on forms | Residence declared on official forms | Reg. 301.7701(b)-2(d)(9); Pub. 519 |
| Official forms filed | W-9, W-8BEN, or W-8ECI filed | Reg. 301.7701(b)-2(d)(10); Pub. 519 |
Maya's factors all point to Canada: home, family, car, license, bank, and vote are there, and she lists Canada as her residence on every official form. Only the 150 days of presence and the client work point toward the United States.
Form 8840 line by line: the 2026 form
Form 8840 for 2026, OMB Number 1545-0074, Attachment Sequence Number 101, carries the instruction "Attach to Form 1040-NR" at the top, and has four parts and thirty lines. Part I, lines 1 through 6, asks for visa type and entry date, citizenship and passport countries and numbers, and days present in 2026, 2025, and 2024. Line 6 is the trap line: it asks whether, during 2026, you applied for or took other affirmative steps to apply for lawful permanent resident status, or had an application pending to change status. A "Yes" on line 6 ends the claim before it starts.
Part II, Closer Connection to One Foreign Country, is lines 7 and 8: your tax home during 2026 and the foreign country to which you had a closer connection. Most filers stop here and move to Part IV. Part III, Closer Connection to Two Foreign Countries, is lines 9 through 13, for the filer who changed tax home mid-year: tax home on January 1, 2026, tax home for the remainder of the year, closer connection to each country, and returns filed there. A "Yes" on line 12 or 13 needs attached verification; a "No" needs an explanation.
Part IV, Significant Contacts With Foreign Country or Countries in 2026, is lines 14 through 30: the regulation's ten-factor test as a questionnaire, covering home, family, automobiles, belongings, banking, business, licenses, voting, residence on documents, W-8BEN and W-9 forms, income sources, investments, and foreign health plan eligibility. The form closes by inviting an attached statement substantiating the closer connection or explaining any answer in lines 14 through 30: a one-page statement tying each answer to a document turns a filled form into a defensible claim.
Filing mechanics: where, when, and what late means
Form 8840 must be attached to the income tax return and filed by the due date for Form 1040-NR. For the 2026 tax year, that is April 15, 2027 with wages withheld, and June 15, 2027 without, following 26 U.S.C. 6072(c) and Publication 519, chapter 7. If no return is required, send Form 8840 by itself to the Department of the Treasury, Internal Revenue Service Center, Austin, TX 73301-0215. The signature block is signed only when the form is filed by itself.
The late-filing rule is the sharpest edge in the whole procedure. Publication 519 states it plainly: if you do not timely file Form 8840, you cannot claim a closer connection. The only escape is to show by clear and convincing evidence that you took reasonable actions to become aware of the filing requirements and significant steps to comply. That standard is judged on evidence, not intentions: a diary entry saying you meant to file fails it, while a dated email to a CPA asking about residency is closer to it.
The treaty tie-breaker is a different door
A filer who is a resident of both the United States and another country is a dual-resident taxpayer. The closer connection exception and the treaty tie-breaker are two different doors to the same room. The exception is statutory: section 7701(b)(3)(B) plus Form 8840. The tie-breaker is contractual: the residence article of the applicable income tax treaty resolves the dual residence, claimed with Form 8833 attached to Form 1040-NR, tax computed as a nonresident alien. Publication 519 notes treaty nonresident treatment can in certain instances trigger section 877A expatriation tax. The exception needs no treaty and no Form 8833, but it is unavailable if a green card application is pending; the tie-breaker needs a treaty with a residence article and a Form 8833 disclosure. File the wrong one and the claim fails. The treaty door is covered in our IRS Form 8833 treaty position disclosure playbook, the exempt-individual days in our IRS Form 8843 substantial presence playbook, and the return itself in our IRS Form 1040-NR nonresident return playbook.
Two further provisions interact with the exception. Section 7701(b)(2)(B) ends resident treatment for the portion of a year after the last day of presence, where the closer connection holds and the individual is not a resident in the next calendar year. Section 7701(b)(2)(C) disregards up to 10 days of presence for the residency starting date only, where a closer connection is established; the 10 days still count toward the substantial presence test itself.
The exception decides residence only; it does not decide how the income is taxed. A nonresident alien still separates ECI, effectively connected income taxed at graduated rates, from FDAP, fixed determinable annual periodic income subject to 30 percent withholding. Form 8840 asks for the identifying number: an SSN, an ITIN, or the EIN of a payer that withheld. Wages that are ECI are also subject to FICA withholding, and self-employment income to SECA tax.
Two scenarios: one pass, one failure
Scenario one is Maya, above: 200 weighted days, 150 days in the current year, Toronto tax home, every factor pointing to Canada. She files Form 1040-NR with Form 8840 attached by June 15, 2027, because she received no wages subject to withholding, and she is treated as a nonresident alien for 2026. The 19,800 dollars of illustrative tax on her Canadian-source income never arises.
Scenario two is the day-count failure. Daniel, a British consultant, spent 190 days in the United States in 2026, with 100 days in 2025 and 40 days in 2024. His weighted count is 190 plus 33 plus 7, which equals 230 days, and his current-year presence of 190 days exceeds the 183-day ceiling. The exception is unavailable by its own terms. His London flat, family, and bank do not matter, because the exception's first condition fails. He is a resident alien for 2026; his only remaining route is the treaty tie-breaker.
Founder & CEO Insight — Enow A. Jovial
Who should not claim the closer connection
Do not claim it if you were present 183 days or more in the current year, if you hold a green card, or if you applied for or took steps to apply for permanent residence. Do not claim it if your tax home is in the United States, because the statute requires a foreign tax home. Do not claim it if your significant contacts are split between the United States and abroad. Do not claim it on a late return, and do not file Form 1040 instead of Form 1040-NR. If any of these apply, accept resident treatment.
Execution checklist
- [x] Count the weighted days: current year at full value, prior year at one third, second prior year at one sixth.
- [x] Confirm the current-year ceiling: fewer than 183 days of presence in the current year.
- [x] Locate the tax home: principal place of business under section 911(d)(3); document it with contracts and bank records.
- [x] Score the ten factors honestly: home, family, belongings, affiliations, banking, business, license, vote, forms, documents.
- [x] Check the immigration file: no pending adjustment application and no steps toward permanent residence, or stop here.
- [x] Complete all four parts of Form 8840: Part I lines 1 through 6, Part II or Part III, and Part IV lines 14 through 30, with a statement tying answers to documents.
- [x] Attach to Form 1040-NR and file by the due date: April 15, 2027 with wages withheld, June 15, 2027 without; if no return is required, mail it alone to Austin, TX 73301-0215.
- [x] Keep the evidence file: lease, bank statements, voter registration, driver's license, and the attached statement, retained three years.
The closer connection exception is the narrowest door in the residency rules. It asks for three things: fewer than 183 days, a foreign tax home, and a life demonstrably centred abroad. Prove those three with documents, file by the due date, and the weighted day count stops deciding your residence. The form is two pages; the evidence file is the real filing. Before you file, model the difference in our break-even calculator: the same income under both treatments shows the dollar gap the exception is worth.
The departure form is our Form 1040-C playbook.
