To determine tax credit on foreign income we need the earned income from the foreign country, tax credit allowed by the Internal Revenue Service and the number of days spend in a foreign country. Here's an explanation using an example.
The taxpayer earned $215,000 from a foreign country, but the IRS exemption was $120,000. The taxpayer lived for 325 days in a foreign country.
325 day/365 days = 0.890 x 120,000 = $106,849 - $215,000 = $108,151 is taxable income whereas $106,849 is exempted for tax purpose.