Individuals who receive gains on the sale of their primary residence can be exempt from paying income tax if the vendor is over 65 years old or the gains are reinvested in a new primary residence.
The following requirements must be fulfilled:

1. Primary residence
a)  The house being sold must qualify as the taxpayer’s primary residence, in other words, they must have lived in it for at least three years.
b)  The house they are buying must be their new primary residence. They must live in it within twelve months from the date of purchase and it must be their primary residence for three years.

2. Reinvesting
a)  The reinvestment in the new primary residence must be within two years from the sale of the old house, or the date of purchase of the new house, in other words, calculated forwards or backwards in time. The new house can be bought and the old one sold within two years from the date of purchase. Likewise, the old house can be sold and the gains reinvested in a new one within two years.
b)  The total amount received must be reinvested within two years. In the case of an off-plan property, the money must be reinvested within two years, regardless of whether construction has been completed or whether the deeds have been signed within that period. Whatever the case, the individual must live in the new house within 12 months for it to qualify as their primary residence.
c)  The amount being reinvested must be the same as the net proceeds from the sale, i.e. the sale price minus expenses such as capital gains, estate agent fees, notary fees, and any outstanding mortgage debt.
d)  The amount being reinvested must be the same as the total net proceeds from the sale, with the option of using financing for this purpose.
e)  If only part of the amount of net proceeds is reinvested, capital gains relief will be applied in the same proportion.