Skip to content
Free calculator

Closer connection exception calculator

Meeting the substantial presence test does not always make you a US tax resident. If you were in the US for fewer than 183 days this year, kept your tax home in one foreign country and had a closer connection to it, the closer connection exception in IRC section 7701(b)(3)(B) generally lets you be treated as a nonresident. Enter your days and situation to check each condition.

Your US days and ties

Count any part of a day in the US, leaving out exempt days (for example as a student or teacher). Runs in your browser; nothing is uploaded.

Your situation this year

Result

Exception likely available

You meet the substantial presence test (220 weighted days). The exception applies only if every condition below is met, and you claim it on Form 8840 by your return due date.

  • Met: Fewer than 183 days in the US this year

    150 days this year.

  • Met: Tax home in a foreign country all year

    Your main place of business or work is abroad.

  • Met: Closer connection to that country than to the US

    Home, family, belongings and ties weigh toward the foreign country.

  • Met: No green card application or steps toward one

    No steps taken toward lawful permanent residence.

The four conditions

Under 26 CFR 301.7701(b)-2 you generally qualify for the exception for a calendar year only if all of these hold:

  • You were present in the US for fewer than 183 days in the current year (the weighted total can be higher).
  • Your tax home, your regular or principal place of business, was in a foreign country for the whole year.
  • You had a closer connection to that one foreign country than to the US.
  • You had not applied for, or taken other steps toward, lawful permanent resident status (a green card).

What counts as a closer connection

The regulation weighs the facts of your life: where your permanent home is, where your family lives, where your car, furniture and personal belongings are, where you bank, where you hold a driver's licence and vote, and the country you list on official forms. No single factor decides it, and the IRS looks at the year as a whole.

Claiming it with Form 8840

The exception is not automatic. You claim it by filing Form 8840, the Closer Connection Exception Statement, generally with your Form 1040-NR or on its own by the return due date. The IRS instructions explain that failing to file on time can mean you cannot claim the exception unless you show by clear and convincing evidence that you took reasonable steps to comply.

This calculator is a guide, not tax advice. To work out the weighted day count first, use the substantial presence test calculator. If you are resident of a treaty country as well, the treaty tie-breaker is a separate route.

Related tools and guides

Questions

Closer connection exception FAQ

What is the closer connection exception?

It is a rule in IRC section 7701(b)(3)(B) that lets someone who meets the substantial presence test be treated as a nonresident alien for the year, if they were in the US fewer than 183 days that year, kept a tax home in a foreign country and had a closer connection to it.

Can I use it if I spent 183 days or more in the US this year?

Generally no. The exception requires fewer than 183 days of presence in the current year. Days from prior years only count toward the weighted substantial presence total.

What form do I file?

Form 8840, the Closer Connection Exception Statement. It is generally attached to Form 1040-NR or filed separately by the due date for that return.

Does a green card application stop me from claiming it?

Generally yes. If you applied for lawful permanent residence, or have a pending application or petition, the regulation says you cannot claim a closer connection to a foreign country for that year.

Can I have a closer connection to two foreign countries?

Generally the regulation allows a closer connection to two foreign countries only in limited circumstances; in most cases it is tested against one country, where your tax home is.

Sources & further reading

Every rule on this page is drawn from primary sources. Verify the current law before making a residency decision.

  1. [1]26 U.S.C. § 7701(b), definition of resident alien and the substantial presence test (opens in a new tab)Office of the Law Revision Counsel
  2. [2]26 CFR 301.7701(b)-2, Closer connection exception (opens in a new tab)Code of Federal Regulations
  3. [3]Closer Connection Exception to the Substantial Presence Test (opens in a new tab)IRS
  4. [4]Form 8840, Closer Connection Exception Statement (opens in a new tab)IRS
  5. [5]Publication 519, U.S. Tax Guide for Aliens (opens in a new tab)IRS

Count your US days automatically

Tax Days logs your days in the US and abroad on your iPhone, so the totals for Form 8840 are ready at filing time.

Download Tax Days on the App Store