Navigating the maze of foreign tax benefits is a difficult but necessary undertaking for expats and other individuals with income from foreign sources. If you’ve held a job in another country for an extended timeframe or have investments in foreign companies, your tax situation becomes more complicated. There are three different tax benefits you can claim for your foreign income: the foreign earned income exclusion (FEIE), foreign tax deduction, and foreign tax credit. In general, you can only choose one of these benefits when filing your tax return.

Here are the three main foreign tax benefits and how they work:

Foreign Earned Income Exclusion (FEIE)

The foreign earned income exclusion entails reporting your foreign income on your tax return but not actually paying US income taxes on it. For 2017, the maximum amount you can exclude is $102,100 (it will be $104,100 for the 2018 tax year.) There is also an additional amount you may be able to exclude for foreign housing costs. If you claim FEIE and your total foreign earned income exceeds the FEIE amount, then you must pay income tax on the excess portion.

In order to qualify for FEIE, there are certain conditions you must meet based on how you long you’ve been out of the country (the physical presence test.) This exclusion is also only for earned income such as a foreign employer or self-employment earnings from abroad. For self-employed taxpayers, you will still owe self-employment tax but reduced or no income tax depending on what your net earnings were. You cannot claim FEIE for other types of income like interest, dividends, and foreign rental income.

Foreign Tax Deduction

If you itemize deductions on your tax return, you can claim foreign taxes as part of the taxes you paid if you haven’t claimed FEIE or the foreign tax credit. While your specific “taxes paid” item can still be optimized for the 2017 tax year if you itemize, the 2018 tax reform is likely to make more taxpayers with foreign-sourced income turn to FEIE or the foreign tax credit.

The taxes do not have to solely be on earned income. They can be paid on any type of income to a foreign government.

Foreign Tax Credit

The foreign tax credit is a dollar-for-dollar reduction of your income tax bill based on foreign taxes on any type of income. Since the credit is nonrefundable, any foreign taxes paid that exceed your income tax liability do not get paid back to you and can’t offset self-employment taxes.

Foreign tax law as it pertains to US residents is incredibly complex. An international tax accountant can help you navigate and optimize the three different foreign tax benefits available to both expats and residents living stateside who happen to have foreign income. Foreign tax accountants such as Dukhon Tax that specialize in foreign income tax issues can optimize your tax return to get you the most favorable outcome.