Note
Reinvestment relief when selling a main home in Spain
Quick answer
Reinvesting the proceeds of the sale of a habitual home in a new habitual home can exempt the gain, in proportion to the amount reinvested, according to the agency’s manual for residents. The conditions are strict, and we could not read the agency’s detailed page, so the rules need checking.
Applies toResidents who sell their main home and plan to buy another. It is not relevant to a holiday home or to an investment property.
This area of Spanish law is complex. We could not open the legal text behind the point below in full on the official site, so we state it as it is generally understood and have not checked it word for word. Before you rely on it, ask an independent Spanish lawyer who acts for you to confirm it for your case.
- Reinvesting the proceeds of the sale of a habitual home in a new habitual home can exempt the gain, in proportion to the amount reinvested (personal income tax manual).
On this page: 8 sections
§ 1The idea
When a resident sells the habitual home at a gain, the law can exempt the gain if the proceeds are reinvested in a new habitual home. The exemption works in proportion: the part of the proceeds reinvested is exempt, and the part not reinvested is taxed. The tax agency describes the rule in its manual for personal income tax, in the chapter on gains excluded from taxation. The chapter on the whole subject is a closer look at capital gains tax on a sale.
§ 2What we could and could not verify
We found the agency's manual page for the relief, titled as the sale of the habitual home and the amount reinvested, but the page could not be read in full by our tools. We therefore describe the principle and not the details, and the claim in our register is marked as pending a primary check. The period for reinvesting, the treatment of a mortgage and the rules for a new home bought before the sale are all points to confirm with an adviser.
§ 3The habitual home condition
The same definition applies as for the over-sixty-five exemption: a home lived in continuously and permanently by the taxpayer for at least three years, which keeps the status if it had it up to two years before the sale. A home that never met the test cannot benefit. That excludes most holiday homes and most homes bought to let.
§ 4Proportion in practice
Imagine, as an illustration only, that an owner sells a home for €400,000 with a gain of €100,000 and reinvests €300,000 in a new main home. The exemption would apply in the proportion of the amount reinvested to the proceeds, which is three quarters, and the rest of the gain would remain taxable. The figures are invented to show the proportion and are not a calculation for your sale.
§ 5Timing
The law sets a period during which the reinvestment must be made, and the period can include a purchase made before the sale. The timing is a common source of loss, since an owner who misses the period loses the relief. Ask your adviser to give you the date in writing and to note any steps you must take, such as reporting the intention to reinvest in the return.
§ 6Non-residents
The relief appears in the manual for residents. We did not find a statement that non-residents can use it, and we do not claim that they can. A non-resident who is thinking of selling should ask an adviser how the sale is taxed and whether any relief is available.
§ 7Questions to ask
Ask whether the home meets the habitual home test, what the reinvestment period is, how a mortgage affects the amount, whether a purchase before the sale counts and how to report it on the return. Keep the deeds of both homes and the proof of payment.
§ 8Related pages
The three per cent retention explained explains the three per cent retention the buyer withholds, and the over-65 exemption explained explains the exemption for sellers over sixty-five.
FAQRelated questions
Is the whole gain exempt if I reinvest?
Only in proportion to what you reinvest. The agency describes an exemption that depends on the amount reinvested, so putting only part of the proceeds in the new home leaves part of the gain taxable. Ask your adviser to calculate it.
Does it apply to a second home?
No. The relief is for the habitual home, which the agency defines as a home lived in continuously and permanently by the taxpayer. A holiday home or an investment property does not meet the definition.
How long do I have to reinvest?
The law sets a period, and we could not read the agency’s page that states it, so we print none. Ask your adviser for the period before you sell, and put the date in your calendar.
Dotted underline marks an illustrative figure. It shows how a calculation works and is not a quote, a rate or a forecast.
Sources
- Agencia Tributaria: Sale of the habitual home by people over 65 (official source, opens in a new window), Personal income tax exemptionLast checked 17 October 2026
- Agencia Tributaria: Sale of the habitual home and reinvestment: amount (official source, opens in a new window), Personal income tax manual, 2025Last checked 17 October 2026
Tax note. Rates depend on the region, the type of property and the buyer, and they change. Figures here are dated and sourced; examples are illustrative and show their assumptions. Confirm yours with the regional tax agency or a tax adviser.