Selling a flat at a profit is always great news. However, after the initial joy of achieving a satisfactory price, there comes a moment of reflection when the obligation arises to pay tax on the capital gains derived from the sale of real estate. For Spanish residents, capital gains from the sale of property are subject to personal income tax (IRPF), which can be a significant tax burden.
However, the Spanish Personal Income Tax Act (Ley 35/2006) provides for the possibility of total exemption from this tax, if certain criteria are met. One of the most important solutions enabling the use of the exemption is the so-called exención por reinversión en vivienda habitual, that is, an exemption from IRPF when the proceeds are reinvested in a new property used as the taxpayer’s permanent residence.
What is the IRPF exemption for reinvestment in new residential property?
It is a type of tax relief that enables individuals who sell their main residence (vivienda habitual) and allocate the proceeds to purchase or renovate a new property in which they will live to avoid paying tax on the profit from the sale. However, it is not enough to simply invest the funds in a new purchase – this must be done within a specified period and duly reported to the Spanish tax office (Hacienda). This mechanism is intended to facilitate a change of residence without additional tax burdens. However, it requires careful planning and proper documentation.
Conditions for claiming the tax relief – three basic requirements
In accordance with Article 38.1 of the Personal Income Tax Act (LIRPF) and Article 41 of the implementing regulation, in order to benefit from the IRPF exemption for reinvestment, the 
-
Notification of intention to reinvest
The taxpayer must declare their intention to take advantage of the relief in their tax return. Failure to do so will result in the tax office (Hacienda) not applying the exemption automatically.
-
The property sold must be the permanent place of residence.
The condition is that the property sold must have been the taxpayer’s place (vivienda habitual) of actual and permanent residence for at least three consecutive years. If the period of residence was shorter, it is necessary to demonstrate justified reasons for changing residence, such as marriage, divorce, secondment or health problems.
-
The proceeds from the sale must be used to purchase a new property that will serve as the primary residence.
Reinvestment may consist of purchasing a new property that will become the main place of residence or renovating an existing property. For the renovation to be considered eligible for the relief, its cost should be at least 25% of the purchase price of the property (excluding the value of the land).
Partial reinvestment – proportional exemption
If the taxpayer reinvests only part of the amount obtained from the sale, then the IRPF exemption applies proportionally – only to the part of the profit that corresponds to the amount reinvested. The remaining part of the profit is taxable. This situation often occurs when the new property is cheaper than the one sold.
Mortgage and the right to relief
Having a mortgage does not exclude the possibility of benefiting from the relief. The “amount obtained from the sale” is considered to be the sale value decreased by the unpaid mortgage capital at the time of the transaction. In addition, both the initial payment at the time of purchase and subsequent early repayments of the mortgage loan are considered reinvestments. All bank confirmations documenting these transactions should be preserved. The tax office may request these documents in order to verify the operation.
Can you claim the relief if you no longer lived in the property you sold?
Yes, provided that at the time of sale the property still had the status of vivienda habitual, i.e. it had been inhabited for at least three years without interruption. If the taxpayer stopped living there earlier, the Spanish tax authorities may refuse to grant the relief, unless there are documented reasons justifying the earlier change of residence.
What if I exceed the two-year reinvestment period?
In this case, the taxpayer loses the right to the exemption. The two-year period for reinvestment cannot be extended. If the purchase of the new property or the start of the works takes place after this period, the entire capital gain will be subject to IRPF taxation.
Obligation to physically reside in the new property
The new property for which the funds were allocated must actually become the place of permanent residence. You must move in within 12 months of the date of purchase or completion of renovation work and remain there for at least three years. Failure to comply with this obligation will result in the loss of the exemption. Documents such as registration, utility bills, energy or internet supply contracts help prove this obligation.
Different fiscal years – how to report reinvestment
If the sale and purchase take place in different fiscal years, the relief may still be applied, provided that the two years is observed. In this case, the tax return for the year in which the sale took place must clearly indicate the intention to reinvest in the following two years.
Consequences of incorrect settlement
Incorrect reporting or failure to provide information about reinvestment may have serious consequences: loss of the right to exemption, the need to pay additional tax along with interest, and even penalties for withholding information. Therefore, it is recommended that before making a sale or purchase, you consult a solicitor or tax advisor who will help you prepare all the documentation.
Automatic exemptions – seniors and dependents
Article 33.4.b of the LIRPF provides for cases in which the taxpayer does not have to reinvest funds in order to benefit from the exemption. This applies to persons over 65 years of age and persons recognised as being in a state of serious or total dependence. In such situations, the exemption applies automatically, without the need to submit additional applications.
Recommendation
The tax relief for reinvesting in new residential property is one of the most advantageous solutions offered by Spanish tax law. However, in order to take full advantage of it, it is necessary to properly plan the entire process, meet the required deadlines and document the actions undertaken.
Each case is unique; therefore, before selling a property for reinvestment, it is advisable to consult a solicitor or tax adviser who will help you choose the safest and most effective solution.
This will ensure that the sale of the property is not only financially beneficial but also completely safe from a tax perspective.
FAQ
What is the IRPF reinvestment exemption?
It allows taxpayers to avoid capital gains tax when selling their main residence in Spain, provided the proceeds are reinvested in a new permanent residence within two years.
Who can benefit from the IRPF reinvestment exemption?
Any individual who sells their vivienda habitual in Spain and reinvests the proceeds in another property that becomes their main residence.
What qualifies as a vivienda habitual?
A property that was the taxpayer’s permanent residence for at least three consecutive years, unless a justified reason explains a shorter period.
Is it mandatory to declare the intention to reinvest?
Yes. The intention to reinvest must be declared in the personal income tax return for the year of sale.
What is the time limit for reinvestment?
The reinvestment must be completed within two years from the date of sale. This deadline cannot be extended.
Can renovation costs qualify as reinvestment?
Yes, provided the renovation costs represent at least 25% of the purchase price of the property, excluding the land value.
What happens in the case of partial reinvestment?
The exemption applies proportionally. Only the part of the capital gain corresponding to the reinvested amount is exempt.
Does having a mortgage affect the exemption?
No. The sale proceeds are calculated after deducting the outstanding mortgage, and mortgage repayments may qualify as reinvestment.
Do I need to live in the new property after reinvestment?
Yes. You must move in within 12 months and live in the property for at least three years.
What happens if the reinvestment deadline is exceeded?
The right to the exemption is lost, and the entire capital gain becomes subject to IRPF.
Are there automatic exemptions without reinvestment?
Yes. Taxpayers over 65 and persons with severe or total dependency may benefit from the exemption without reinvesting the proceeds.
If you are planning to buy a new property in Spain, contact an experienced real estate lawyer who will guide you through the entire legal and tax process.