Selling a habitual residence also entails settling accounts with the treasury, and not only for the payment of the municipal capital gain, but also for the Personal Income Tax (IRPF). Thus, the sale of a property must be included in the income tax return as a capital gain or loss.

However, if it is a habitual residence, “the gain may be exempt in certain cases,” the Tax Agency explains. The first is that the amount obtained is reinvested in the acquisition of another property that will be used as the buyer’s usual residence, or in the rehabilitation of the house that will be used for this purpose. The exemption is also applicable when, once acquiring a new home, the taxpayer takes up to two years to sell what was his or her habitual home.

To take advantage of this tax benefit, you will be obliged to express your willingness to benefit from it under the condition that the reinvestment is carried out, in one go or successively, in a period not exceeding two years from the date of the sale. If only a part of the capital gain obtained in the transfer of the previous one was allocated to the new home, “only the proportional part” of the reinvested amount will be excluded from taxation. For example, a taxpayer who sells the real estate in which he usually resides for 200,000 euros and invests only 175,000 euros in the purchase of another, would have to declare a capital gain of 25,000 euros, which would be taxed in the savings tax base, with rates ranging from 19% to 28% depending on the amount.

A question that may arise is whether the taxpayer can subtract from the capital gain the sales taxes that have been paid for the new real estate. According to Rubén Gimeno, technical secretary of REAF Asesores Fiscales, the answer is affirmative. Likewise, the seller could deduct the amount of the municipal capital gain from the capital gain. “The taxes inherent to the purchase or sale are part of a higher acquisition price or lower sale price,” he says.

There are two other cases in which the capital gain derived from the sale of the habitual residence does not have to be declared in the income: that the taxpayer is over 65 years of age or that he or she is a person in a situation of severe or great dependency. In these two cases, “the exemption also applies to the transfer of bare ownership of the habitual residence by its owner over 65 years of age, reserving lifetime usufruct over said residence,” the Tax Agency clarifies. However, when the full ownership of a home is divided between the bare owner and the usufructuary, neither of them will be able to benefit from this tax exemption.

It must also be taken into account that the Tax Agency will only consider that a habitual residence is being transferred when it had such consideration at the time of sale or up to two years prior to the date of transfer.

On the other hand, Gimeno explains that when a person over 65 years of age or with severe dependency transfers a property – even if it is not their habitual residence – “they are also not taxed on the gain obtained if the amount of the sale is reinvested in a life annuity of up to a maximum of 240,000 euros.”