Skip to content
Back to index
V5599-26 16 September 2026 · SG de Impuestos sobre la Renta de las Personas Físicas Criterion in force
IRPF · exención por reinversión

Full capital gains tax exemption may apply if net amount is reinvested after mortgage redemption

A taxpayer sold their primary residence, used part of the proceeds to settle the mortgage, and reinvested the remainder in a new home. The DGT ruled that, due to the existence of prior debt, the amount subject to reinvestment is the transfer value minus the outstanding loan principal.

The question raised

Aplicación de la exención por reinversión en vivienda habitual del artículo 38 de la LIRPF.

The DGT's ruling

Para que la ganancia por la venta de la vivienda habitual esté exenta, se debe reinvertir el importe total obtenido en una nueva vivienda habitual en un plazo de dos años (anteriores o posteriores a la venta). Si existía financiación ajena para la vivienda transmitida, el importe total obtenido se calcula restando al valor de transmisión el principal del préstamo pendiente de amortizar. Si se reinvierte la totalidad de dicho importe resultante, la exención sobre la ganancia patrimonial será total.

Book your free first meeting