To meet this test, you must be one of the following:
A U.S. citizen who is a bona fide resident of a foreign country, or countries, for an uninterrupted period that includes an entire tax year or
A U.S. resident alien who is a citizen or national of a country with which the United States has an income tax treaty in effect and who is a bona fide resident of a foreign country, or countries, for an uninterrupted period that includes an entire tax year.
See IRS Publication 901, U.S. Tax Treaties, for a list of countries with which the United States has an income tax treaty in effect.
There are no specific rules that determine whether you are a bona fide resident of a foreign country. Bona fide residence is determined in each individual case, taking into account factors such as your intention, the purpose of your trip, and the length and nature of your stay. Going to a foreign country to work does not necessarily make you a bona fide resident. Generally, if you go to another country for an extended and indefinite period, and you set up permanent quarters there for yourself and your family, you have established a residence, even though you intend to eventually return to the U.S.
Generally, if you go to a foreign country for a definite, temporary purpose and return to the United States after you accomplish it, you are not a bona fide resident of the foreign country. If accomplishing the purpose requires an extended, indefinite stay, and you make your home in the foreign country, you may be a bona fide resident.
Physical Presence Test
To meet this test, you must be a U.S. citizen or resident alien who is physically present in a foreign country or countries, for at least 330 full days during 12 consecutive months.
This test is based only on physical presence and does not depend on the type of residence you establish, or the purpose of your stay. You do not have to be in a foreign country only for employment purposes the entire time – vacation periods also count toward meeting the total number of days.
The 330 days do not have to be consecutive, and can be interrupted by periods when you are traveling over international waters or are otherwise not in a foreign country. To figure the minimum of 330 full days of presence, add all separate periods you were present in a foreign country during the 12-month period.
A nonresident alien who, with a U.S. citizen or U.S. resident alien spouse, chooses to be taxed as a resident of the United States may qualify under this test if the time requirements are met.
Figuring the 12-Month Period
For purposes of meeting the physical presence test, the following apply with regard to the 12-month period:
The 12-month period can begin on any date.
The 12 months must be consecutive.
The 12-month period does not have to begin on your first full day in a foreign country, or end on the day you leave the country. You can use any 12-month period in which the 330 days fall.
12-month periods can overlap when determining 12-month periods as part of a longer stay in a foreign country or countries.
Example of overlapping 12-month periods:
You are assigned to work in a foreign country from January 1 of one year until August 31 of the following year – a 20 month period.
You return to the U.S. for a vacation of 30 days in April of each year.
Your first 12-month period is from January 1 through December 31 of the first calendar year.
Your second 12-month period is from September 1 of the first calendar year through August 31 of the second calendar year.
You are physically present for 335 days in each 12-month period, so the entire 20-month period qualifies for the foreign earned income exclusion.