Tax residency rule, United States

US Tax — Closer Connection (Form 8840)

Summary

If you meet the US day test for tax residence, you can still be treated as a nonresident for that year when you were in the United States on fewer than 183 days in the year, had your tax home in another country and had closer ties to that country. This is the closer connection exception. The hard limit is 182 days in the calendar year: on day 183 the exception is gone. You must claim it each year on Form 8840, sent to the Internal Revenue Service (IRS) on time.

Limit
Fewer than 183 days in the United States, so 182 at most
Period
One calendar year, 1 January to 31 December
A day counts when
You are physically in the United States at any time during the day
Form
Form 8840, Closer Connection Exception Statement for Aliens
Law
Internal Revenue Code section 7701(b)(3)(B), Regulations 301.7701(b)-2
Run by
The Internal Revenue Service (IRS)

Who it applies to

The rule

The Substantial Presence Test makes you a US tax resident when you have at least 31 days in the United States this year and at least 183 weighted days over three years: all of this year's days, one third of last year's and one sixth of the year before. A person who spends 122 days or more in the country every year meets it. The closer connection exception in section 7701(b)(3)(B) of the Internal Revenue Code lets such a person stay a nonresident.

You qualify for a year when all of these are true. You were present in the United States on fewer than 183 days in that year. You kept a tax home in a foreign country for the whole year. You had a closer connection to that country than to the United States. And you did not apply for a green card, take other steps to become a lawful permanent resident, or have such an application pending in the year. A tax home is the main place where you work, or the place where you regularly live if you have no main place of work.

To decide where your closer connection is, the IRS compares your ties. Form 8840 asks where your permanent home is, where your family lives, where your car, furniture and other belongings are, where you bank, where you vote and hold a driving licence, which country you name as your residence on official forms, where your social, cultural and religious groups are, and where most of your income comes from. A permanent home must be available to you at all times. It can be owned or rented.

The exception is not automatic. You must file Form 8840 for each year you claim it. If you file a US nonresident return, Form 1040-NR, you attach the form to it. If you do not have to file a return, you send Form 8840 by itself to the IRS by the due date for Form 1040-NR, including extensions. If you do not file on time, you cannot claim the exception and may be treated as a US resident, unless you show by clear and convincing evidence that you took reasonable steps to learn about the requirement and to comply.

Why it exists

The weighted day test is wide on purpose, so it also catches people who only spend winters or regular business trips in the United States and whose life is clearly somewhere else. Congress added the exception so that these people are not taxed as residents on income from the whole world. The 183-day limit keeps the exception away from people who spend most of the year in the country, and the form gives the IRS the facts it needs to check the claim.

Counting the days

You count the days you were physically in the United States in one calendar year. Any part of a day counts as a full day. The earlier years do not matter for this limit.

  1. List every trip to the United States between 1 January and 31 December of the year.
  2. Count each day on which you were in the country at any time, including the day you arrived and the day you left.
  3. Take out days the law excludes, such as transit stops under 24 hours between two foreign places.
  4. If the total is 182 or lower, the day condition is met. If it is 183 or higher, the exception is not available for this year.
  5. Check the other conditions: a tax home abroad for the whole year, closer ties abroad, and no green card application.
  6. File Form 8840 by the due date for Form 1040-NR.
How Countr counts it. Countr counts each day on which it sees you in the United States, from 1 January to 31 December, and treats any part of a day as a full day. It shows the count against 182 and starts to warn you 14 days before you reach it. In the app this card sits next to the US Tax Residence (Substantial Presence) tracker, because the exception only matters once you meet that test. Countr counts only the days. It cannot check where your tax home is, where your ties are, whether you applied for a green card, or whether you sent Form 8840. It also does not take out excluded days such as short transit stops, so it may show a slightly higher number than the IRS would count.

Track US Tax — Closer Connection (Form 8840) on your phone.

Countr finds your past trips in your photos and keeps counting from there.

Examples

A winter visitor who can use the exception

Marc lives in Quebec and spends 150 days in Florida in each of 2024, 2025 and 2026. For 2026 his weighted count is 150, plus 50, plus 25, which is 225. That is above 183, so he meets the Substantial Presence Test. But he was in the United States on only 150 days in 2026, his home, family and bank are in Canada, and he has never applied for a green card. He files Form 8840 for 2026 and stays a nonresident.

One long year that closes the door

Sofia lives in Spain and normally spends 100 days a year in the United States. In 2026 she stays from 5 January to 7 July to help with a new grandchild. That is 27 days in January, 28 in February, 31 in March, 30 in April, 31 in May, 30 in June and 7 in July, a total of 184 days. She meets the Substantial Presence Test on this year's days alone and, with 184 days, she cannot claim the closer connection exception. Her only other route is the tie-breaker in the tax treaty between Spain and the United States.

Under 183 days but a green card is pending

Arjun spends 140 days in the United States in 2026 and meets the Substantial Presence Test because of earlier years. His home and business are in India. In March 2026 his US employer filed an immigrant petition for him, Form I-140, and he filed Form I-485 to adjust status. The IRS lists both forms as steps towards permanent residence. Arjun cannot use the closer connection exception for 2026, even though he has fewer than 183 days.

Exceptions

Common misconceptions

“If I stay under 183 days in the year, I am automatically a nonresident.”
No. Staying under 183 days only keeps the exception open. If your weighted three-year count is 183 or more, you are a US tax resident unless you file Form 8840 on time and meet the other conditions.
“I file Form 8840 once and it covers me for ever.”
The form is for one year. You must file a new Form 8840 for every year in which you meet the Substantial Presence Test and want to be treated as a nonresident.
“Owning a house in Florida means I cannot have a closer connection abroad.”
Owning a US home does not close the exception by itself. The IRS compares all your ties. What matters is where your permanent home, family, belongings, work and daily life mainly are.
“Form 8840 is a tax return, so filing it means I admit I owe US tax.”
It is a statement, not a return. It tells the IRS why you are a nonresident. If you have no US income to report, you send it by itself.

Questions and answers

How many days can I spend in the United States and still file Form 8840?

182 days in the calendar year at most. The law says fewer than 183 days, and any part of a day counts as a day.

Do I need Form 8840 if I spend only two months a year in the United States?

Usually not. With 60 days every year your weighted count is 60 plus 20 plus 10, which is 90, so you do not meet the Substantial Presence Test and there is nothing to claim. The form is needed only when the weighted count reaches 183.

What happens if I file Form 8840 late?

You lose the exception for that year and may be treated as a US resident for tax. The IRS accepts a late form only if you show by clear and convincing evidence that you took reasonable steps to learn about the rule and to follow it.

Can each person in a couple file one joint Form 8840?

No. Each person who claims the exception files a separate form. A couple who both spend winters in the United States send two forms.

Where do I send Form 8840 if I do not file a US tax return?

You mail it to the IRS Service Center in Austin, Texas, at the address in the form instructions, by the due date for Form 1040-NR. If you do file Form 1040-NR, you attach it to that return.

Does Form 8840 change my immigration status or my right to visit?

No. It is a tax form for the IRS. It only decides whether you are taxed as a resident or a nonresident. Entry and length of stay are decided separately by the border authorities.

Sources

Read more: The 183-day rule: what it means and what it does not.

Other rules for United States

See all trackers

This page explains the rule and how the days are counted. It is not legal or tax advice. The authority decides each case on its own facts.