How do capital gains figure into credit limit

If I'm retired and not drawing a salary, but living of capital gains from a mostly US based portfolio, how is 外国税額控除, foreign tax credit calculated.

Credit limit for income tax = Amount of income tax for the year × (Adjusted amount of foreign income for the year / Total amount of income for the year)

I think the specific point is "is income from capital gains taken into account for the amount of income tax for the year", if that's the case then the credit limit will definitely be higher than the US tax on dividends (10% IIRC). But if it's not then the credit limit will be zero, because all income will come from dividends or capital gains.

this could also be phrased as 'is it tax efficient to invest in dividend yielding US instruments while not drawing an income in Japan' (specifically thinking of DBMF or KMLM as a good diversifier)

by SorryAstronomers