Form 8840 and the closer connection exception
If you spend winters in the United States and the day count says you are a US resident, the closer connection exception is how you stay a nonresident. You claim it on Form 8840, filed by the due date of the return, and it turns on four conditions: fewer than 183 days in the US this year, a tax home in one foreign country for the whole year, closer ties to that country than to the US, and no green card, no application for one, and no affirmative step toward one.
It is US domestic law, not a treaty. A Canadian who qualifies does not need the treaty at all, and the two are claimed on different forms with different consequences.
Do you pass the day count first?
The exception only matters if the substantial presence test says you are a resident: 31 days this year and 183 weighted days over three years. Run your own count, then read the conditions below.
The conditions, and the factors behind them
File on time or lose it. A late Form 8840 does not just attract a penalty: it can forfeit the exception outright, and the relief from that is discretionary.
The three conditions
- The closer connection exception lets an alien individual who meets the substantial presence test be treated as a nonresident alien for the year anyway. It is US domestic law, written into IRC 7701(b)(3)(B) and the section 7701(b) regulations, and it is claimed by filing Form 8840. IRC 7701(b)(3)(B); Treas. Reg. 301.7701(b)-2(a)
- First condition: you were present in the United States for fewer than 183 days in the current year. This is a count for that one year alone, not the weighted three year total the substantial presence test uses. Fewer than 183 means 183 days ends the exception, and Form 8840 says outright that you are not eligible if you were present 183 days or more in the calendar year. IRC 7701(b)(3)(B)(i); Treas. Reg. 301.7701(b)-2(a)(1)
- The days counted for that 183 day condition are days of presence as section 7701(b) defines them, which means the days excluded for the substantial presence test are excluded here too. IRC 7701(b)(7) says that for purposes of the whole of subsection (b), a regular commuter from Canada or Mexico, a person in transit between two foreign points for under 24 hours, and a crew member of a foreign vessel are not treated as present. IRC 7701(b)(3)(D) says the same for an exempt individual and for a person unable to leave because of a medical condition that arose in the United States. The regulation is explicit that its exclusions apply for purposes of section 7701(b) and the regulations under that section, which is where the closer connection exception lives. IRC 7701(b)(3)(D) and 7701(b)(7); Treas. Reg. 301.7701(b)-3(a)
- Second condition: you maintained a tax home in a foreign country during the current year. The tax home has to be in existence for the entire current year and has to sit in the same foreign country you claim the closer connection to. The Form 8840 instructions tell you not to file the form at all if you had a tax home in the United States at any time during the year. Treas. Reg. 301.7701(b)-2(a)(2) and (c)(2)
- Third condition: during the year you had a closer connection to a single foreign country in which you maintained that tax home than to the United States. The only exception to the single country requirement is the two country special rule. Treas. Reg. 301.7701(b)-2(a)(3)
The green card bar, which sits outside the conditions
- A separate bar sits outside those three conditions. You are shut out of the exception if during the year you personally applied or took other affirmative steps toward lawful permanent resident status, or had an application for adjustment of status pending. A lawful permanent resident is shut out as well, because the green card test makes you a US resident on its own and the exception only relieves against the substantial presence test. IRC 7701(b)(3)(C); Treas. Reg. 301.7701(b)-2(f)
- The regulation names six filings as affirmative steps toward permanent residence, and says the list is not exhaustive: Form I-508 and Form I-485 filed by you, Form I-130 and Form I-140 filed on your behalf, Department of Labor Form ETA-750 filed on your behalf, and Department of State Form OF-230 filed by you. Treas. Reg. 301.7701(b)-2(f)(1) through (6)
What tax home means here
- Your tax home is the general area of your main place of business, employment, or post of duty, regardless of where your family home is. If the nature of your work gives you no regular or main place of business, your tax home is the place where you regularly live. If you have neither, you are an itinerant and your tax home is wherever you work. The regulation gives the term the same meaning it has for travel expenses under section 162(a)(2). Treas. Reg. 301.7701(b)-2(c)(1)
- The statute defines tax home here by reference to section 911(d)(3) without regard to its second sentence. That second sentence is the rule that says you do not have a foreign tax home for any period your abode is in the United States, and it is the rule that sinks many foreign earned income exclusion claims. It does not apply to the closer connection exception. IRC 7701(b)(3)(B)(ii), cross-referencing IRC 911(d)(3)
The factors the IRS weighs
- Closer connection is decided on facts and circumstances: you have it if you or the IRS establishes that you maintained more significant contacts with the foreign country than with the United States. The regulation lists ten factors and says expressly that the facts considered are not limited to them: the location of your permanent home; the location of your family; the location of personal belongings such as automobiles, furniture, clothing and jewelry owned by you and your family; the location of social, political, cultural or religious organizations you have a current relationship with; where you conduct your routine personal banking; where you conduct business activities other than those that make up your tax home; the jurisdiction that issued your driver licence; the jurisdiction where you vote; the country of residence you designate on forms and documents; and the types of official forms and documents you file, such as Form 1078, Form W-8 or Form W-9. Treas. Reg. 301.7701(b)-2(d)(1)(i) through (x)
- For the permanent home factor it does not matter whether the home is a house, an apartment or a furnished room, or whether you own it or rent it. What matters is that the dwelling was available to you at all times, continuously, and not solely for stays of short duration. Treas. Reg. 301.7701(b)-2(d)(2)
If you moved between two foreign countries
- A special rule lets you show a closer connection to two foreign countries, but never more than two, if all five of these hold: you maintained a tax home beginning on the first day of the year in one foreign country; you changed your tax home during the year to a second foreign country; you kept your tax home in that second country for the rest of the year; you had a closer connection to each country than to the United States for the period you maintained a tax home there; and you were taxed as a resident under the internal laws of either country for the entire year, or as a resident of both countries for the periods you maintained a tax home in each. Treas. Reg. 301.7701(b)-2(e)(1) through (5)
Filing Form 8840, and the deadline
- The exception is claimed on Form 8840, Closer Connection Exception Statement for Aliens. If you are filing Form 1040-NR, attach Form 8840 to it. If you do not have to file a return, mail Form 8840 by itself, signed, to Department of the Treasury, Internal Revenue Service Center, Austin, TX 73301-0215. Each alien individual files a separate Form 8840, so spouses file one each. Treas. Reg. 301.7701(b)-8(a)(1) and (b)(1)(i); Form 8840 instructions, When and Where To File
- Form 8840 is due by the due date for filing Form 1040-NR, including extensions. Publication 519 gives that due date as the 15th day of the 4th month after the tax year ends if you are an employee receiving wages subject to US income tax withholding, and the 15th day of the 6th month after the tax year ends if you are not. For returns covering calendar year 2025 the IRS published those dates as April 15, 2026 and June 15, 2026. Form 8840 instructions, When and Where To File; Pub. 519 (2025) chapter 7, When To File
- If you do not timely file Form 8840 you cannot claim the closer connection exception and may be treated as a US resident for the year. Two things can save a late filer. The regulation waives the penalty if you show by clear and convincing evidence that you took reasonable actions to become aware of the filing requirements and significant affirmative steps to comply with them. Separately, the regulation lets the IRS disregard a late statement at its own discretion when it decides that is in the government interest on all the facts. Treas. Reg. 301.7701(b)-8(d)(1), (d)(2) and (e); Form 8840 instructions, Penalty for Not Filing Form 8840
How it relates to the day count and to a treaty
- The test the exception overrides: you are a US resident for a calendar year if you were physically present in the United States on at least 31 days during that year and on at least 183 days over the three year period made up of that year and the two before it, counting all days in the current year, one third of the days in the first prior year, and one sixth of the days in the second prior year. IRC 7701(b)(3)(A); Form 8840 instructions, Substantial Presence Test
- The closer connection exception and a treaty tie breaker are different instruments. The closer connection exception is US domestic law: if it applies you are simply not a US resident for the year, you claim it on Form 8840, and it is closed to you if you were present 183 days or more, hold a green card, or have taken steps toward one. A treaty tie breaker starts from the opposite place, where you are a resident of both countries under each country internal law, and the residence article of the treaty assigns you to one. You claim it by filing Form 1040-NR with Form 8833 attached and figuring your tax as a nonresident alien, and Publication 519 points anyone who answered Yes to the green card question on Form 8840 toward it. The consequences also differ: under a treaty tie breaker you are treated as a US resident for every purpose other than figuring your tax, so residency periods and information reporting are unaffected, and Publication 519 warns that in certain instances being treated as a nonresident under a tie breaker can trigger the section 877A expatriation tax. Pub. 519 (2025), Effect of Tax Treaties, Dual residents; Form 8840 instructions, line 6
What people get wrong about Form 8840
- The two 183 day figures are different tests. The substantial presence test uses a weighted three year total that counts one third of last year and one sixth of the year before. The closer connection exception uses days in the current year alone. A snowbird can fail the weighted test on 120 days a year yet still be comfortably under the current year 183 and qualify. IRS source
- The current year threshold is fewer than 183 days, not 183 or fewer. Form 8840 says outright that you are not eligible if you were present in the United States 183 days or more in the calendar year, so day 183 itself is the day the exception disappears. IRS source
- Excluded days are excluded from that count, but only if you do the paperwork. If you exclude days because you were an exempt individual or because a medical condition kept you here, you must file Form 8843, and Publication 519 says that if you do not file it on time you cannot exclude those days at all. Form 8840 line 5 just asks for the number of days you were present and does not repeat the exclusions, so anyone whose count only clears 183 because of excluded days should keep the records that prove it. IRS source
- The rule that abode in the United States destroys a foreign tax home does not apply here. That rule is the second sentence of section 911(d)(3), and it is a common reason a foreign earned income exclusion claim fails, but the statute defines tax home for the closer connection exception by reference to section 911(d)(3) without regard to that sentence. IRS source
- The foreign tax home has to last the whole year and has to be in the country you claim. If you had a tax home in the United States at any time during the year, the Form 8840 instructions tell you not to file the form at all, because you are not eligible. IRS source
- Green card steps taken by somebody else still count against you. The regulation lists a Form I-130 petition for an alien relative and a Form I-140 petition for a prospective immigrant employee, both filed on your behalf rather than by you, among the affirmative steps that close the exception, alongside your own Form I-485 or Form I-508. IRS source
- Missing the deadline forfeits the exception rather than just costing a penalty. File Form 8840 late and you cannot claim the closer connection at all, unless you can show by clear and convincing evidence that you took reasonable actions to learn the filing requirements and significant steps to comply, or the IRS uses its separate discretion to disregard the late filing. IRS source
- Filing Form 8840 is required even when no tax is owed and no return is due. It is a standalone signed statement mailed to the Austin service center by the Form 1040-NR due date, and each spouse files their own. The address printed in the 1990s regulation, Philadelphia, PA 19255, is obsolete; use the address in the current Form 8840 instructions. IRS source
- Answering Yes to Form 8840 line 6, about applying for or taking steps toward lawful permanent resident status, means you should not file the form. The instructions redirect you to a treaty position on Form 8833 with Form 1040-NR instead, which is a different claim with different consequences. IRS source
- Where an investment is held is not where the paperwork sits. The Form 8840 instructions say that for stocks and bonds you use the country of origin of the company or debtor, so shares of a US public company count as a US located investment even if the certificates sit in a safe deposit box abroad. IRS source
- Closer connection is a weighing of contacts, not a checklist you can pass on points. The regulation says the listed factors are considered but are not limited to those, and either you or the IRS can be the one to establish where the more significant contacts lie. IRS source
- The exception is unavailable to a lawful permanent resident on its own terms. A green card holder is a US resident under the green card test, which is a separate test that day counting does not touch, so no amount of foreign connection helps. IRS source
- There is a second, narrower closer connection exception for foreign students, and it is not this one. The IRS says most foreign students cannot use the Form 8840 exception because of the 183 day limit and the foreign tax home requirement, and directs a student who has exhausted the five year exempt individual period to the student only exception, which is claimed on Form 8843 rather than Form 8840. IRS source
Which forms does this involve?
| Form | What it does |
|---|---|
| Form 8840 | Closer Connection Exception Statement for Aliens, the form that claims the exception; filed with Form 1040-NR or mailed on its own to Austin, TX 73301-0215 if no return is due. |
| Form 8843 | Statement for Exempt Individuals and Individuals With a Medical Condition, required separately if you are excluding days of presence as an exempt individual or because of a medical condition that arose in the United States, and the form a foreign student uses for the separate student only closer connection exception. |
| Form 1040-NR | The nonresident alien return that Form 8840 attaches to when a return is required, and whose due date sets the Form 8840 deadline. |
| Form 8833 | Treaty-Based Return Position Disclosure, the form used for a treaty tie breaker rather than the closer connection exception; filed with Form 1040-NR by a dual resident taxpayer. |
How is this different from a tax treaty claim?
Both can reach the same answer by different routes, and the treaty route carries consequences the exception does not. The country pages set out each treaty's own ordered tests: see the US-Canada treaty, the US-Mexico treaty, or the full list.
Counting after the fact is the hard part, because the answer depends on days you have to remember months later. Spyglass Beacon is a paid app that keeps the running count and warns you before you cross a line. We link it because it is a sister site, not because we are paid for the click.
Sources
Every rule and figure on this page was read on an IRS page or in an IRS document, and checked a second time by a separate review, on September 16, 2026.
- irs.gov/individuals/international-taxpayers/closer-connection-exception-to-the-substantial-presence-test
- irs.gov/pub/irs-pdf/f8840.pdf
- ecfr.gov/current/title-26/section-301.7701(b)-3
- irs.gov/pub/irs-pdf/p519.pdf
- uscode.house.gov/view.xhtml?req=granuleid:USC-prelim-title26-section7701&num=0&edition=prelim
- ecfr.gov/current/title-26/section-301.7701(b)-2
- ecfr.gov/current/title-26/section-301.7701(b)-8
- irs.gov/individuals/international-taxpayers/substantial-presence-test
- irs.gov/individuals/international-taxpayers/the-closer-connection-exception-to-the-substantial-presence-test-for-foreign-students
- irs.gov/pub/irs-pdf/f8843.pdf
- irs.gov/forms-pubs/about-form-1040-nr
- irs.gov/forms-pubs/about-form-8833