Homeowners who sell their primary home to buy another may be exempt from paying personal income tax on the profit obtained from the sale. However, to benefit from this tax advantage, it is not enough to sell a house and reinvest the money in another, since the Treasury warns that the exemption It is not applied automatically and that taxpayers must express their willingness to benefit from it.
This is how it explains Tax Agency on its websitewhere it states that “the application of the exemption does not operate automatically, but you must express your willingness to take advantage of it.”
It must be taken into account that in order to apply this exemption, a series of requirements must be met, among them, that what is sold is the habitual residence and the money is reinvested in another that is also going to be; Furthermore, the reinvestment must be made within the established deadlines.
The Treasury makes an important distinction between those who have bought the new home before selling and those who sell before buying the new one, but they do not do so in the same year, since it will be in the latter case that they must communicate it in their income tax return if they want to apply said exemption.
You must communicate your intention to reinvest the money in another home in order to apply the exemption.
This exemption for reinvestment in habitual residence is included in the article 41 of the Personal Income Tax Regulationsand may be done within a maximum period of two years, both before and after the sale. That is, a person can first buy their new home and then sell the previous one, or do it the other way around, without losing the right to the exemption.
As has been said, in the case when the taxpayer sells his home and intends to use the money to buy another in the following two years, the Treasury establishes that he must communicate in the income tax return corresponding to the year of sale his intention to take advantage of said exemption.
This is reflected in section 3 of article 41 of the Personal Income Tax Regulations, which establishes that, when the reinvestment is not carried out in the same year as the sale, “the taxpayer will be obliged to state his intention to reinvest in the tax return for the year in which the capital gain is obtained.”
This means that, if a person sells their primary home in 2026 and plans to buy another in 2027, they must indicate their intention to reinvest the money when submitting the Income Tax return corresponding to 2026, which will be carried out in 2027. In this way, they inform the Treasury that they intend to take advantage of this tax benefit within the established period.
On the contrary, when the reinvestment has already been made in the same year of sale or in the two previous years, there is no same specific obligation to communicate an intention for future reinvestment.
What happens if you do not inform the Treasury that you are going to reinvest the money
Although the Treasury establishes the obligation to communicate the intention to reinvest in certain cases, forgetting to carry out this procedure does not necessarily mean losing the right to the exemption.
In fact, the Central Economic-Administrative Court (TEAC), in a resolution dated March 31, 2025, established that this exemption is a right of the taxpayer, not a tax option.
Therefore, as long as they meet the requirements to be able to apply it, if the intention has not been expressed in the corresponding Income Tax return, there is the possibility of doing so later, for which a rectification of the return would have to be made, provided that the situation allows it.
Finally, it must be taken into account that communicating to the Treasury the intention to reinvest does not in itself guarantee the exemption. If the new home is not finally purchased within the established period or the required conditions are not met, the corresponding gain will have to be taxed. In that case, the situation must be regularized through a complementary declaration, with the corresponding late payment interest.
The Treasury will charge personal income tax for compensation for a voluntary early retirement if there was no ERE open when signing it, even if the company implemented it months later

The Treasury confirms that self-employed people who work from home can deduct the IBI, the community of neighbors and the interest on the mortgage
Furthermore, if the taxpayer reinvests an amount less than the amount obtained from the sale, the exemption will only apply proportionally to the amount reinvested.
