Substantial Presence Test Calculator

Closer connection exception to the substantial presence test

A person who meets the substantial presence test can still be treated as a nonresident alien under the closer connection exception. It is claimed on Form 8840. See also the comparison of Forms 8843 and 8840.

Requirements

  • You were present in the United States on fewer than 183 days during the year.
  • You had a closer connection to one foreign country, in which you had a tax home, than to the United States. A two-country option exists if you changed your tax home during the year.
  • You maintained your tax home in that foreign country for the entire year.
  • You did not take steps toward, and did not have a pending application for, lawful permanent resident (green card) status.

What a closer connection looks like

The IRS looks at where you have more significant contacts, such as your permanent home, family, belongings, affiliations, driver's license, voter registration and charitable giving. Your home must be available to you continuously, not only for short stays.

Who cannot claim it

You cannot claim the exception if, during the year, you applied for or took other steps toward green card status, or had an application for adjustment of status to lawful permanent resident pending. Filing a form such as I-508, I-485, I-130, I-140, ETA-750 or OF-230 during or before the year signals intent to become a permanent resident.

Filing

Attach Form 8840 to your U.S. income tax return. If you do not have to file a return, send it to the IRS service center listed in the form instructions. It is due by the return due date. If it is late, you can still claim the exception only if you show by clear and convincing evidence that you took reasonable steps to learn the filing requirements and made significant efforts to comply.

Updated: November 4, 2026

Back to the calculator →

Guides