Income Tax Act Article 17-2

The amount of individual income tax paid by a taxpayer on the income realized from the sale of a self-used residential building, if he repurchases another building as his self-use residence within two years from the date on which the registration of transfer of ownership of the old building was completed, and the cost of the new building exceeds the original sale price, may be deducted or refunded from the individual income tax payable or paid for the year in which the transfer of the ownership of the repurchased residential building for self-use was registered. However, if the income realized from the property transaction had already been offset against the loss incurred from property transaction concluded previously in accordance with the stipulations of this Act, then the provisions hereof shall not apply.The preceding paragraph shall also apply to the taxpayer who buys first and sells later.
中文原文 所得稅法第17-2條
納稅義務人出售自用住宅之房屋所繳納該財產交易所得部分之綜合所得稅額,自完成移轉登記之日起二年內,如重購自用住宅之房屋,其價額超過原出售價額者,得於重購自用住宅之房屋完成移轉登記之年度自其應納綜合所得稅額中扣抵或退還。
但原財產交易所得已依本法規定自財產交易損失中扣抵部分不在此限。
前項規定於先購後售者亦適用之。

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