Form 8840 and the closer connection exception

Updated

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 calculator is made by Spyglass Beacon, a sister site. It runs entirely in your browser: the days you enter are not sent anywhere, by them or by us.

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 green card bar, which sits outside the conditions

What tax home means here

The factors the IRS weighs

If you moved between two foreign countries

Filing Form 8840, and the deadline

How it relates to the day count and to a treaty

What people get wrong about Form 8840

Which forms does this involve?

Forms
FormWhat it does
Form 8840Closer 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 8843Statement 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-NRThe nonresident alien return that Form 8840 attaches to when a return is required, and whose due date sets the Form 8840 deadline.
Form 8833Treaty-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.