Exemption
Regulations: Articles 38.1 Law IRPF , 41 Regulation IRPF
Capital gains obtained from the transfer of the taxpayer's habitual residence may be exempt, when the total amount obtained from the transfer is reinvested in the acquisition of another habitual residence or in the rehabilitation of one that will have such character .
Without prejudice to the above, take into account the exemption of capital gains derived from the transfer of the habitual residence by people over 65 years of age or by people in a situation of severe or great dependency, as discussed in section " Exempt capital gains ", of this same Chapter.
Special case: Transfer of primary residence with outstanding amounts to be paid off
When the taxpayer has used external financing to acquire the transferred property, the total amount obtained from the transfer will be considered, exclusively for these purposes, as the value of the transfer in the terms provided for in the Income Tax Law less the principal of the loan pending amortization. In these cases, therefore, partial reinvestment is not considered to exist, even if part of the amount obtained from the transfer of the property has been used to repay the outstanding loan.