Complete Guide to Property Capital Gains Tax (IRPF) in Spain: Reinvestment & Exemption Rules
Selling real estate in Spain generates a taxable capital gain or loss (ganancia o pérdida patrimonial) that must be reported in your personal income tax return (Declaración de la Renta - IRPF) filed with the Spanish Tax Agency (AEAT). The taxable capital gain is calculated as the difference between the net transmission value and the real acquisition value of the property.
The Spanish Income Tax Law (Ley 35/2006 del IRPF) offers powerful tax exemptions—specifically the 100% tax exemption for sellers aged 65 and older and the primary residence reinvestment exemption (exención por reinversión en vivienda habitual). Accurate calculation of deductible acquisition and transfer expenses is vital to minimize your tax liability within full statutory compliance.
How Acquisition and Transfer Values Are Computed
Spanish tax rules establish precise definitions for real estate capital gains:
- Real Acquisition Value: Original purchase price stated in the title deed (escritura) + statutory purchase taxes (ITP or VAT + AJD) + notary, land registry, and legal fees + accredited structural renovation investments (mejoras y ampliaciones), minus fiscal amortizations if the property was rented out.
- Net Transmission Value: Final sale price agreed in the deed minus expenses borne by the vendor (real estate agency commissions, Municipal Capital Gains Tax / Plusvalía Municipal IIVTNU, and mortgage cancellation fees).
- Net Capital Gain:
Gain = Net Transmission Value - Real Acquisition Value.
Progressive Savings Tax Brackets in the Spanish IRPF
Net property capital gains are taxed under the savings tax base (base imponible del ahorro):
- First €6,000: Taxed at 19%.
- From €6,000.01 to €50,000: Taxed at 21%.
- From €50,000.01 to €200,000: Taxed at 23%.
- From €200,000.01 to €300,000: Taxed at 27%.
- Above €300,000: Taxed at 28%.
Primary Residence Reinvestment vs. Senior Citizen Exemption
Two statutory regimes allow homeowners to legally eliminate or reduce capital gains tax:
- Primary Residence Reinvestment (Art. 38 LIRPF): If you sell your habitual home (lived in continuously for at least 3 years) and reinvest the total net proceeds in buying or rehabilitating a new primary residence within 2 years before or after the sale, the entire capital gain is 100% tax-free. Partial reinvestment grants a proportional tax exemption.
- Sellers Aged 65 and Older (Art. 33.4.b LIRPF): Homeowners aged 65 or older selling their primary residence enjoy a full 100% tax exemption on the entire capital gain, with zero requirement to purchase another property.
Seniors Selling Secondary Residences: Annuity Exemption (Renta Vitalicia)
When taxpayers aged 65 or older sell a secondary property, holiday apartment, or land, they can also exempt up to €240,000 of capital gains from IRPF, provided the sales proceeds are allocated to contracting an insured lifetime annuity (renta vitalicia asegurada) with a financial or insurance entity within a maximum period of 6 months following the sale (Art. 38.3 LIRPF).
Difference Between State IRPF and Municipal Plusvalía (IIVTNU)
It is important to distinguish the national personal income tax (IRPF) collected by the AEAT from the local municipal tax (IIVTNU - Impuesto sobre el Incremento de Valor de los Terrenos de Naturaleza Urbana) paid to the local City Council. The municipal plusvalía taxes the administrative appreciation of urban land during the ownership period. The amount paid in municipal plusvalía is fully tax-deductible as an expense from the transfer value in your national IRPF return.
Offsetting Capital Losses Over 4 Consecutive Years
If you sell a property at a financial loss (real acquisition value exceeds net transfer value), the generated capital loss can be offset against other capital gains realized in the same tax year. Any remaining negative balance can be carried forward and offset against net capital gains over the subsequent 4 consecutive tax years, or against up to 25% of positive income from movable capital.
Inherited Properties & Structural Renovation Investments
For inherited homes or gifted properties, the acquisition value is the official value declared in the Inheritance and Gift Tax (Impuesto sobre Sucesiones y Donaciones - ISD) plus inheritance probate legal expenses, notary fees, and registration costs. Furthermore, certified structural renovations that increase property longevity or usable area (e.g. elevator installation, thermal insulation, full room expansions) are added directly to the acquisition value, lowering your taxable capital gain.
Practical Example
Purchase: 180,000 € + 18,000 € expenses (198,000 €) | Sale: 260,000 € - 10,000 € expenses (250,000 €) | Reinvestment: 250,000 €
Net Capital Gain: 52,000.00 € | Exemption: 100% | Total IRPF Tax: 0.00 €
Reinvesting the entire net sale amount within the 2-year statutory window exempts 100% of the €52,000 capital gain from income tax.
Acquisition Value: 150,000.00 € | Net Transmission Value: 210,000.00 € | Primary Home: No
Capital Gain: 60,000.00 € | Bracket 1 (6k @ 19%): 1,140 € | Bracket 2 (44k @ 21%): 9,240 € | Bracket 3 (10k @ 23%): 2,300 € | Total IRPF: 12,680.00 €
As a secondary holiday home, the reinvestment exemption does not apply, subjecting the €60,000 gain to progressive savings tax rates.