U.S. · Aliens · Residency
Closer connection exception: who can use Form 8840
Three conditions, two disqualifiers, one deadline.
You can be treated as a nonresident alien even if you meet the substantial presence test if you were present in the United States fewer than 183 days during the year, maintained a tax home in a foreign country, and had a closer connection to that country than to the United States. You cannot claim it if you took steps to become a permanent resident or had an adjustment-of-status application pending during the year. Publication 519 (2025) requires a completed Form 8840 with your return by the Form 1040-NR due date.
Test the exception
Result
Where the exception fits
The closer connection exception only matters after the substantial presence test has already put you over the line. Someone who is in the United States 150 days a year for three straight years, say, meets the weighted test: 150 plus 50 plus 25 is 225, well above 183. On that fact alone the person is a resident for tax purposes. The exception is the way out for a person whose real life is elsewhere, a long-stay visitor, a retiree who winters here, or a worker on a recurring assignment.
The publication states it as three conditions. You must be present in the United States for less than 183 days during the year, you must maintain a tax home in a foreign country during the year, and you must have a closer connection during the year to one foreign country in which you have a tax home than to the United States. There is a narrow variation for people who changed tax homes between two foreign countries during the year, which requires a closer connection to each country for the time the tax home was there.
What counts as a tax home
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 you have no regular main place of business, it is the place where you regularly live; if neither fits, you are an itinerant and your tax home is wherever you work. For this exception the tax home must exist for the whole current year and be in the same foreign country to which you claim a closer connection.
That whole-year requirement is more restrictive than many people expect. A person who moved abroad in March and had no tax home abroad in the first two months does not satisfy it, and the exception will not rescue the year. The checker above asks about a tax home in one foreign country for the entire year for that reason.
What counts as a closer connection
The publication frames it as more significant contacts with the foreign country than with the United States, judged on all the facts and circumstances. The factors it lists include the country of residence you designate on forms and documents; the types of official forms you file, such as Form W-9, Form W-8BEN or Form W-8ECI; and the location of your permanent home, family, personal belongings, social, political, cultural, professional or religious affiliations, business activities other than those that constitute the tax home, the jurisdiction that issued your driver’s license and where you vote, and the charities you support.
The home does not need to be a house. The publication says a house, an apartment or a furnished room all work, and that owning or renting does not matter, but the home must be available at all times and continuously, not solely for short stays. A relative’s spare room you use only when visiting does not meet that standard.
The two disqualifiers
Even a person who meets all three conditions cannot claim the exception if either of two things is true. First, you personally applied, or took other steps during the year, to change your status to permanent resident. Second, you had an application pending for adjustment of status during the current year. The publication refers readers to USCIS and the Department of Labor for the specific forms and steps.
These disqualifiers are why the exception is so hard for people in the middle of a green card process. The checker asks both questions separately because the publication does. Note that the first disqualifier covers steps you took, which can include steps toward permanent residence that are not yet an adjustment application.
Filing Form 8840
You must attach a fully completed Form 8840 to your income tax return to claim the exception. If you do not have to file a return, mail it to the Department of the Treasury, Internal Revenue Service Center, Austin, TX 73301-0215. Either way, the deadline is the Form 1040-NR due date. If you do not file on time, you cannot claim the exception, unless you show by clear and convincing evidence that you took reasonable actions to become aware of the filing requirements and significant steps to comply.
A related rule appears in the dual-status discussion. Up to 10 days of presence can be ignored when fixing your residency starting date if you had a closer connection and a foreign tax home for that time, and this requires a signed statement under penalties of perjury rather than Form 8840. The days still count for the substantial presence test itself.
Treaties and the other direction
The closer connection exception is domestic law. The publication separately notes that the residency rules do not override tax treaty definitions: a dual-resident taxpayer who claims treaty benefits files Form 1040-NR with Form 8833 attached. Which route fits depends on the treaty’s tiebreaker rule, so the two routes are not interchangeable. Students and teachers who exclude days under the exempt individual rules file Form 8843 instead; see the Form 8843 page and the substantial presence test calculator for the first step.
Sources
- IRS Publication 519, U.S. Tax Guide for Aliens (2025): Closer Connection to a Foreign Country; Tax home; Establishing a closer connection; Form 8840; Effect of Tax Treaties. Read November 2, 2026.
Edition read: Publication 519 (2025), U.S. Tax Guide for Aliens, for use in preparing 2025 returns. Dollar figures on this page are the ones printed in that edition; check the current publication and form instructions for your tax year. This page summarizes the publication and does not replace it.
Frequently asked questions
What is the closer connection exception?
It lets a person who meets the substantial presence test be treated as a nonresident alien if present fewer than 183 days, with a foreign tax home and a closer connection to that foreign country than to the United States.
Who cannot use Form 8840?
Anyone who took steps during the year to become a permanent resident or who had an adjustment-of-status application pending during the year, per Publication 519.
When is Form 8840 due?
By the Form 1040-NR due date, attached to your return, or mailed to the Austin service center address if you have no return to file.
What if I miss the deadline?
You cannot claim the exception unless you show by clear and convincing evidence that you took reasonable actions to learn the requirement and significant steps to comply.
Does the tax home have to last all year?
Yes. For this exception the tax home must exist for the entire current year in the foreign country to which you claim a closer connection, except in the two-country situation the publication describes.
Not tax or immigration advice
This page summarizes an IRS publication and is not tax, legal, immigration or financial advice. A CPA, enrolled agent or immigration attorney can confirm how a rule applies to you. Everything runs in your browser; nothing you enter is sent anywhere.