At Welex, your law and accountancy firm in Spain, we are pleased to write a few lines about the conditions for tax exemption for reinvestment of the capital gains obtained after the sale of your main residence in Spain.

Are you a tax resident in Spain? You wish to sell your main residence in Spain and you want to know your taxation. Please note that it is possible to sell your main residence in Spain and not to pay any tax on the capital gain if you reinvest in a new main residence in Spain.


tax exemption for capital gains reinvestment in a new property after your main residence sale in spain


The exemption for reinvestment in primary residence allows taxpayers to exclude from taxation the capital gains obtained from the sale of their primary residence, provided that the total amount obtained is reinvested in the acquisition or rehabilitation of a new primary residence in Spain within a specific period of time. This exemption is subject to a series of formal and material requirements detailed in national and autonomous community legislation, as well as interpreted by case law and administrative decisions.


Legislation and regulation in Spain relating to the conditions of tax exemption for reinvestment of capital gains after the sale of your main residence in Spain:

The Spanish legal basis for the tax exemption for reinvestment in habitual residence in Spain is found in Article 38.1 of Law 35/2006, of November 28, on the Spanish Personal Income Tax (IRPF), as well as in the specific regulation on the same tax of the Autonomous Community of Navarre. Both establish that taxpayers can enjoy a tax exemption on capital gains obtained from the sale of their principal residence if they reinvest the total amount obtained in the acquisition or rehabilitation of a new principal residence within a period of two years. If the reinvestment is partial, the exemption will be applied proportionally to the amount reinvested.


Jurisprudence in Spain relating to this casuistry:

Case law in Spain has reiterated and specified the requirements for the application of this exemption. The High Court of Justice of Catalonia, in several judgments (No. 4300/2021, No. 2899/2021, No. 1590/2021, among others).


Implications and limitations relating to the reinvestment exemption after the sale of your principal residence in Spain:

  1. The reinvestment exemption for the sale of a principal residence in Spain only applies if the reinvestment is made within two years after the sale of the initial residence.
  2. The exemption is proportional in case of partial reinvestment.
  3. Both the property sold and the property acquired must qualify as the taxpayer’s principal residence.
  4. The autonomous community regulations may introduce additional specificities, as is the case of Navarra, so it is important to check the applicable legislation in each autonomous community.
  5. Administrative decisions and case law underline the importance of complying with all formal and material requirements in order to benefit from the exemption.

Be careful, when selling your house in Spain whether you are a resident or not, it is essential to have the advice of a specialized property lawyer in Spain who will determine the type of contract to use, as this can make a difference if you later want to adhere to the reinvestment exemption.


Can non-residents in Spain benefit from the reinvestment exemption?

If you are a non-resident in Spain and you are resident in another European Union state, you will not be able to adhere to the reinvestment exemption: we tell you all about the taxes to be paid if you sell your property as a non-resident.


Do not hesitate to contact our office o visit our team of lawyers and accountants in Spain for any tax and legal consultation on property sales and purchases in Spain.