CATEGORIES
MORE
HomeHousing & RentPrimary Residence Reinvestment Tax Exemption Calculator Spain 2026
‹ All Housing calculators🏠 Housing & Rent

Primary Residence Reinvestment Tax Exemption Calculator Spain 2026

Calculate the tax-exempt portion of your capital gains when selling your primary home and reinvesting into a new home in Spain.

Reinvestment Data

Capital Gain on Sale
€5.000€300.000
Net Sale Proceeds to Reinvest
€10.000€600.000
Amount Reinvested in New Home
€0€600.000
IRPF Tax Saved by Reinvestment
€7.875
IRPF Tax remaining to pay:€2.505

📊 Tax Benefit Breakdown

Reinvestment Ratio75,00%
Exempt Capital Gain€37.500,00
Taxable Capital Gain€12.500,00
Tax Saved (Exemption)€7.875,00
Net Tax Owed€2.505,00

How does the primary residence reinvestment tax exemption work in Spain in 2026? According to Article 38 of the Spanish IRPF Law (Ley 35/2006) and Article 41 of its Regulations, the capital gains obtained from selling your primary residence (vivienda habitual) can be entirely exempt from income tax if the total net proceeds of the sale are reinvested in acquiring a new primary home. The reinvestment must take place within a maximum window of two years, calculated before or after the sale date of the old property. If you reinvest only a portion of the proceeds rather than the entire amount, the tax relief is not lost entirely; instead, it is applied proportionally to the amount reinvested. To calculate your complete transaction tax profile, we advise calculating your initial capital gain with the Property Sale Capital Gains Tax Calculator and checking your transfer tax rate with the Rental Property Transfer Tax Calculator.


🔍 Rules and Proportional Calculation of the Exemption

The formula to determine what portion of your capital gain is exempt from IRPF income tax compares your net sale proceeds against the actual amount reinvested:

  1. Net Sale Proceeds (Valor de Transmisión):
    • This is the final sale price of the old property minus direct transaction costs (such as estate agency commissions and municipal plusvalía tax) and any outstanding mortgage balance that was settled during the sale. This net figure represents the actual cash proceeds that must be reinvested.
  2. Reinvestment Ratio:
    • Formula: Reinvestment Ratio (%) = (Amount Reinvested in New Home / Net Sale Proceeds) * 100
    • If the reinvested amount equals or exceeds the net sale proceeds, your reinvestment ratio is 100%, and your entire capital gain is tax-exempt.
  3. Exempt and Taxable Gains:
    • Exempt Capital Gain = Total Capital Gain × Reinvestment Ratio.
    • Taxable Capital Gain = Total Capital Gain – Exempt Capital Gain.
    • The progressive savings tax scale (19% to 28% in 2026) is applied to the remaining taxable capital gain.

📝 Worked Examples

Example 1: Full reinvestion of sale proceeds in Seville

Profile: Carlos, selling his primary home for net proceeds of €180,000.00 and buying a new home for €190,000.00.

Reinvestment Exemption
  • Taxable gain: €40,000.00 | Net sale proceeds: €180,000.00
  • Amount reinvested: €190,000.00 (exceeds net sale proceeds)
  • Reinvestment ratio: 100.00%
Exempt Gain: €40,000.00 (Tax saved: €9,240.00 | IRPF tax owed: €0.00)

Example 2: Partial reinvestment on downsizing

Profile: Laura, selling her large home for net proceeds of €200,000.00 and buying a smaller flat for €150,000.00.

Reinvestment Exemption
  • Taxable gain: €60,000.00 | Net sale proceeds: €200,000.00
  • Amount reinvested: €150,000.00 | Reinvestment ratio: 75.00%
  • Exempt gain (75%): €45,000.00 | Taxable gain (25%): €15,000.00
IRPF Tax Owed: €3,030.00 (Tax saved: €10,110.00)

Example 3: Purchasing the new home prior to selling

Profile: Albert, who buys a new home a year before successfully selling his previous property.

Reinvestment Exemption
  • Taxable gain: €30,000.00 | Net sale proceeds: €150,000.00
  • Amount reinvested (including deposit plus mortgage principal paid within the 2-year window): €150,000.00
  • Reinvestment ratio: 100.00%
Exempt Gain: €30,000.00 (IRPF tax owed: €0.00)

⚠️ 4 Common Mistakes Made by Taxpayers

  1. Failing to subtract the settled mortgage from proceeds: Many believe that if they sell a house for €250,000, they must reinvest the full €250,000. If they had €100,000 left on their mortgage which was cleared at the notary, the net proceeds to reinvest are actually €150,000. Reinvesting €150,000 qualifies them for the 100% exemption.
  2. Missing the strict two-year window: The law requires the purchase of the new home to occur within 24 months (before or after) the sale. Missing the deadline by a single day (month 25) invalidates the exemption, resulting in a large back-tax bill plus interest.
  3. Not declaring the intent to reinvest on your tax return: You must explicitly report the transaction and your intent to reinvest in your annual IRPF declaration (Modelo 100) for the year of the sale, even if the new home has not yet been bought.
  4. Selling a home that is no longer your primary residence: To qualify for the exemption, the property must have been your permanent residence for at least three consecutive years prior to the sale. If you moved out and rented it out for 4 years before selling, it loses its primary residence status.

🏠 Special Tax Rules in Spain

Reinvestment Through Mortgage Principal Payments

The tax office allows you to claim the exemption even if you buy your new home using a mortgage. In this scenario, the amount considered reinvested each year is the sum of the cash down payment plus the mortgage principal payments (excluding interest) paid during the 24 months following the sale of your previous home.

Delays in Off-Plan Property Deliveries

If you buy an off-plan property from a developer and the developer suffers delays that push the deed signature beyond the two-year window, your exemption is in jeopardy. The tax office requires the deed to be signed within 2 years, except in verified cases of force majeure.


📋 What This Means for You

If you are planning a family relocation

Plan the sale and purchase dates carefully to ensure they fit within the 24-month tax window. Keep utility bills and census records (empadronamiento) to prove that both properties have been your actual permanent home.

If you are over 65 years old

You do not need to reinvest the proceeds of your home sale to avoid capital gains tax. Spanish tax law automatically exempts seniors over 65 from paying tax on the sale of their primary residence, giving you full access to your cash.


❓ Frequently Asked Questions (FAQ)

A property is considered your primary residence if you have lived in it permanently for a continuous period of at least three years. Exceptions are made in case of marriage, job relocation, or death before the three-year limit is reached.

If you reinvest only 50% of the net sale proceeds, the tax exemption applies to only 50% of your capital gains. The remaining 50% of your gain is taxable under the progressive savings income rates on your tax return.

Yes, the Spanish Supreme Court and the Directorate General of Taxes (DGT) have confirmed that the reinvestment exemption applies if your new primary residence is located in any EU or EEA member state.

Yes. The total amount reinvested includes not only the purchase price of the property, but also all transaction taxes and fees paid by the buyer (such as ITP, VAT, notary fees, registry fees, and gestoria costs).

Yes, the regulations treat "home rehabilitation" similarly to a new purchase. The renovation works must be certified as a rehabilitation by the local municipality, and the total cost must exceed 25% of the original purchase price.

It must be declared in your tax return for the year the sale occurred. You must check the "exención por reinversión" box and specify the amount you have already reinvested or commit to reinvesting within the next two years.

If the two-year period passes and you fail to reinvest the committed amount, you must file an amended tax return (declaración complementaria) for the year of the sale, paying the unpaid tax plus interest.

No, the reinvestment exemption is strictly reserved for Spanish tax residents. Non-residents selling a property in Spain are subject to a flat 19% non-resident income tax (IRNR) on their capital gains, with no reinvestment relief.

Regulation & Financial Stability

🏛️
Spanish Tax Agency (AEAT)
Establishes the reinvestment exemption regulated under Article 38 of the IRPF Law and Article 41 of the Tax Regulation.
AEAT Website
🛡️
Last updated: February 2026 (España)