This is an issue that seems to be popping up more and more. Taxpayers take a job outside the US and spend the majority of their time living there. Now whether they qualify to claim the foreign earned income exclusion (FEIE) depends on a number of things, and certain tests have to be met.
1) Physical presence test. You need to be outside the US for 330 out of any 365 day period. Its not as simple as that depending on travel and where you physically are, but thats a requirement.
2) If you don't meet the physical presence test, you might still be considered outside the US if you meet the Bona Fide residence test. This is a tougher test to meet because it requires demonstrating that your home is in the foreign country. It also requires that you reside in the foreign country for an entire calendar year before claiming it. When would this happen and you don't meet the physical presence test? You live outside the US but take extended time visiting family in the US. Your foreign home might not be your domicile.
Having said this, EVEN IF you meet one of those tests, you might not qualify for the FEIE. One of the requirements that is always missed is that the taxpayer must not have a US abode. Taxpayers and tax preparers constantly miss this not so minor detail, focusing on the out of the US tests. Taxpayers are losing often on this issue in Tax Court. This requirement regarding abode is literally written into the tax code but people often times completely ignore it. It applies even if you spend every day of the year living in the foreign country. Its not an exception to the physical presence or bona fide residence tests, its an additional test that must be met.
What is a US abode? Well the courts have looked mostly to a dictionary definition.
"Abode" has been variously defined as one's home, habitation, residence, domicile, or place of dwelling. It does not mean your principal place of business. "Abode" has a domestic rather than a vocational meaning and does not mean the same as "tax home." The location of your abode often will depend on where you maintain your economic, family, and personal ties.
Mostly, taxpayers where one spouse takes an overseas assignment and the family remains in the US, where the assignment isn't permanent and the spouse intends to return to the US are impacted by this.
In any event, the takeaway here is to consult with your tax advisor if you take a job overseas.