If you are a U.S. citizen or a resident alien of the United States and you live abroad, you are taxed on your worldwide income. To Qualify for the Foreign Earned Income Exclusion you must meet either the Bona Fide Residence Test or the Physical Presence Test.
PHYSICAL PRESENCE TEST
To meet the Physical Presence Test you must be physically present in a foreign country or countries 330 full days during a period of 12 consecutive months. The 330 days do not have to be consecutive. Any U.S. citizen or resident alien can use the physical presence test to qualify for the exclusions and the deduction.
The physical presence test is based only on how long you stay in a foreign country or countries. This test does not depend on the kind of residence you establish, your intentions about returning, or the nature and purpose of your stay abroad.
330 full days. Generally, to meet the physical presence test, you must be physically present in a foreign country or countries for at least 330 full days during a 12-month period. You can count days you spent abroad for any reason. You do not have to be in a foreign country only for employment purposes. You can be on vacation.
You do not meet the physical presence test if illness, family problems, a vacation, or your employer’s orders cause you to be present for less than the required amount of time.
Exception. You can be physically present in a foreign country or countries for less than 330 full days and still meet the physical presence test if you are required to leave a country because of war or civil unrest.
Full day. A full day is a period of 24 consecutive hours, beginning at midnight.
Travel. When you leave the United States to go directly to a foreign country or when you return directly to the United States from a foreign country, the time you spend on or over international waters does not count toward the 330-day total.
Example. You leave the United States for France by air on June 10. You arrive in France at 9:00 a.m. on June 11. Your first full day of physical presence in France is June 12.
Passing over foreign country. If, in traveling from the United States to a foreign country, you pass over a foreign country before midnight of the day you leave, the first day you can count toward the 330-day total is the day following the day you leave the United States.
Example. You leave the United States by air at 9:30 a.m. on June 10 to travel to Kenya. You pass over western Africa at 11:00 p.m. on June 10 and arrive in Kenya at 12:30 a.m. on June 11. Your first full day in a foreign country is June 11.
Change of location. You can move about from one place to another in a foreign country or to another foreign country without losing full days. If any part of your travel is not within any foreign country and takes less than 24 hours, you are considered to be in a foreign country during that part of travel.
Example 1. You leave Ireland by air at 11:00 p.m. on July 6 and arrive in Sweden at 5:00 a.m. on July 7. Your trip takes less than 24 hours and you lose no full days.
Example 2. You leave Norway by ship at 10:00 p.m. on July 6 and arrive in Portugal at 6:00 a.m. on July 8. Since your travel is not within a foreign country or countries and the trip takes more than 24 hours, you lose as full days July 6, 7, and 8. If you remain in Portugal, your next full day in a foreign country is July 9.
In United States while in transit. If you are in transit between two points outside the United States and are physically present in the United States for less than 24 hours, you are not treated as present in the United States during the transit. You are treated as traveling over areas not within any foreign country.
Travel Log. You must track all of your travel to and from the US and all foreign countries. This will be needed to file your tax return.
Source: IRS Publication 54