PropertinspainBuying in Spain from abroad

Note

Reinvestment relief when selling a main home in Spain

By Inés Arroyo VidalReviewed by Marta Calderón IbáñezPublished Updated Stage 2: Budget and money

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.

Complex point: confirm it with a lawyer

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
  1. The idea
  2. What we could and could not verify
  3. The habitual home condition
  4. Proportion in practice
  5. Timing
  6. Non-residents
  7. Questions to ask
  8. Related pages
Checked 26 October 2026by Marta Calderón Ibáñez. Claims on this page are tied to the sources listed at the end. A point on this page is flagged for a lawyer to confirm.
Gain rates not printedWe have verified the buyer’s withholding and the filing windows for a non-resident seller. We have not verified the rate of tax on the gain itself, so none is printed. Ask an adviser to calculate the gain for your sale.

§ 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.

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

About this page

Written by

Inés Arroyo Vidal

Writer, taxes, legal steps and money

Inés writes the chapters on taxes, the legal process, mortgages and money, renting, owning and selling. She works from the laws and the official pages that apply them, quotes the section she relied on and says plainly what she could not confirm. She is not a lawyer or tax adviser.

Reviewed by Marta Calderón Ibáñez, chief editor and source editor, 26 October 2026. Checked: Figures and rules checked against the official texts listed in the sources

Found an error? Report it. Each report gets a dated reply, and confirmed corrections are logged on the updates page.

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.