Enforcement Rules of the Act Governing Relations with Hong Kong and Macau Article 29

The additional amount of tax due as a result of applying the appropriate tax rates to the total combined taxable income from Hong Kong or Macau and foreign countries referred to in Paragraph 3 of Article 28 of the Act, shall be computed according to the following formula:(Income in the Taiwan Area + Income in the Mainland Area + Income in Hong Kong or Macau + Income in foreign sources) × tax rate = payable tax for the total amount of income of a profit-seeking enterprise.(Income in the Taiwan Area + Income in the Mainland Area) × tax rate = payable tax for the amount of income from the Taiwan Area and the Mainland Area of a profit-seeking enterprise.Payable tax for the total amount of income of a profit-seeking enterprise - payable tax for the amount of income from the Taiwan Area and the Mainland Area of a profit-seeking enterprise = increased payable tax from Hong Kong, Macau, and foreign sources.
中文原文 香港澳門關係條例施行細則第29條
本條例第二十八條第三項所稱因加計其香港或澳門所得及其國外所得,而依其適用稅率計算增加之應納稅額,其計算公式如下:(臺灣地區所得額+大陸地區所得額+香港或澳門所得額+國外所得額)x稅率=營利事業全部所得額應納稅額(臺灣地區所得額+大陸地區所得額)x稅率=營利事業臺灣地區及大陸地區所得額應納稅額營利事業全部所得額應納稅額-營利事業臺灣地區及大陸地區所得額應納稅額=因加計香港或澳門所得及國外所得而增加之結算應納稅額

English translation for reference only; the Chinese text prevails. Not legal advice.