All articles 5 min read

Closer Connection to a Foreign Country: U.S. Taxes for Noncitizens (2025 IRS Guide)

This guide covers “Closer Connection to a Foreign Country” within u.s. taxes for noncitizens. The following material presents the IRS treatment of this topic, including the qualifications, exceptions, and examples in the source section. Read the rules alongside the facts of your own situation before deciding what to report, deduct, or document.

Adapted from Publication 519 (2025), U.S. Tax Guide for Aliens, published by the Internal Revenue Service. This guide retains the source edition’s years, amounts, deadlines, and examples. It is guidance for that edition, not a statement that the same figures apply to every tax year.

Context for these rules

You are a resident for tax purposes if you meet the substantial presence test for calendar year 2025. To meet this test, you must be physically present in the United States on at least:

The term “United States” includes the following areas.

  • All 50 states and the District of Columbia.

  • The territorial waters of the United States.

  • The seabed and subsoil of those submarine areas that are adjacent to U.S. territorial waters and over which the United States has exclusive rights under international law to explore and exploit natural resources.

Closer Connection to a Foreign Country

Even if you meet the substantial presence test, you can be treated as a nonresident alien if you:

  • Are present in the United States for less than 183 days during the year,

  • Maintain a tax home in a foreign country during the year, and

  • Have a closer connection during the year to one foreign country in which you have a tax home than to the United States (unless you have a closer connection to two foreign countries, discussed next).

Closer connection to two foreign countries.

You can demonstrate that you have a closer connection to two foreign countries (but not more than two) if you meet all of the following conditions.

  • 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 continued to maintain your tax home in the second foreign country for the rest of the year.

  • You had a closer connection to each foreign country than to the United States for the period during which you maintained a tax home in that foreign country.

  • You are subject to tax as a resident under the tax laws of either foreign country for the entire year or subject to tax as a resident in both foreign countries for the period during which you maintained a tax home in each foreign country.

Tax home.

Your tax home is the general area of your main place of business, employment, or post of duty, regardless of where you maintain your family home. Your tax home is the place where you permanently or indefinitely work as an employee or a self-employed individual. If you do not have a regular or main place of business because of the nature of your work, then your tax home is the place where you regularly live. If you do not fit either of these categories, you are considered an itinerant and your tax home is wherever you work.

For determining whether you have a closer connection to a foreign country, your tax home must also be in existence for the entire current year and must be located in the same foreign country to which you are claiming to have a closer connection.

Foreign country.

In determining whether you have a closer connection to a foreign country, the term “foreign country” means:

  • Any territory under the sovereignty of the United Nations or a government other than that of the United States,

  • The territorial waters of the foreign country (determined under U.S. law),

  • The seabed and subsoil of those submarine areas that are adjacent to the territorial waters of the foreign country and over which the foreign country has exclusive rights under international law to explore and exploit natural resources, and

  • Territories of the United States.

Establishing a closer connection.

You will be considered to have a closer connection to a foreign country than the United States if you or the IRS establishes that you have maintained more significant contacts with the foreign country than with the United States. In determining whether you have maintained more significant contacts with the foreign country than with the United States, the facts and circumstances to be considered include, but are not limited to, the following.

  1. The country of residence you designate on forms and documents.

  2. The types of official forms and documents you file, such as Form W-9, Form W-8BEN, or Form W-8ECI.

  3. The location of:

    • Your permanent home;

    • Your family;

    • Your personal belongings, such as cars, furniture, clothing, and jewelry;

    • Your current social, political, cultural, professional, or religious affiliations;

    • Your business activities (other than those that constitute your tax home);

    • The jurisdiction in which you hold a driver’s license;

    • The jurisdiction in which you vote; and

    • Charitable organizations to which you contribute.

It does not matter whether your permanent home is a house, an apartment, or a furnished room. It also does not matter whether you rent or own it. It is important, however, that your home be available at all times, continuously, and not solely for short stays.

When you cannot have a closer connection.

You cannot claim you have a closer connection to a foreign country if either of the following applies.

  • You personally applied, or took other steps during the year, to change your status to that of a permanent resident.

  • You had an application pending for adjustment of status during the current year.

For more information on forms and other steps used to change the status to that of a permanent resident, go to USCIS.gov and DOL.gov.

Form 8840.

You must attach a fully completed Form 8840 to your income tax return to claim you have a closer connection to a foreign country or countries.

If you do not have to file a return, send the form to:

Department of the Treasury
Internal Revenue Service Center
Austin, TX 73301-0215

You must file Form 8840 by the due date for filing Form 1040-NR. The due date for filing is discussed later in chapter 7.

If you do not timely file Form 8840, you cannot claim a closer connection to a foreign country or countries. This does not apply if you can show by clear and convincing evidence that you took reasonable actions to become aware of the filing requirements and significant steps to comply with those requirements.

Using the guidance

Keep the documents that establish the dates, amounts, and circumstances described above. References to other chapters, forms, worksheets, or earlier and later sections refer to the linked IRS publication. Check the full publication and its updates before relying on a rule for a different tax year or a situation not addressed here.

Sources and further reading

The cited U.S. government text is in the public domain. Source accessed October 28, 2026. Fynoptic has organized this material for educational use and is independent of, and not endorsed by, the IRS.