Purchase & Sale Details
📊 Gains & Tax Breakdown
How is the sale of a house taxed in Spain in 2026? When you transmit a property, if your net sale value is higher than your net purchase value, you generate a capital gain. This gain is subject to Spanish personal income tax (IRPF) as savings income (Rendimientos del Ahorro). This property capital gains tax should not be confused with the municipal capital gains tax (plusvalía municipal) collected by local town halls. The national tax authority (AEAT) applies a progressive scale ranging from 19% to 28% on the net profit. However, Spanish tax legislation provides several key exemptions, such as a complete tax exemption if you reinvest the proceeds into a new primary residence, or if you are over 65. To review the total costs of your sale, we recommend estimating your local tax using our Municipal Capital Gains Calculator and checking the tax savings of buying a new home with the Primary Residence Reinvestment Tax Exemption Calculator.
🔍 How Spanish Property Capital Gains Tax is Calculated
Your taxable capital gain or loss is determined by calculating the difference between the net values defined under IRPF rules:
- Net Purchase Value (Valor de Adquisición):
- Formula: Original purchase price + Transaction costs (ITP transfer tax or VAT paid at purchase, notary fees, registry fees, and gestoria fees) + Cost of any capital improvements or renovations (ordinary maintenance like painting or repairs do not count).
- Net Sale Value (Valor de Transmisión):
- Formula: Final sale price – Transaction costs paid by the seller (real estate agency commissions, mortgage cancellation fees at the notary, and the plusvalía municipal tax paid to the town hall).
- Taxable Capital Gain:
- If the net sale value is lower than the net purchase value, you have a capital loss. You do not owe tax and can use this loss to offset other capital gains for up to 4 tax years.
- If there is a profit, it is taxed using the progressive Spanish savings income scale:
- First €6,000 of gain: 19%
- Slabs from €6,000 to €50,000: 21%
- Slabs from €50,000 to €200,000: 23%
- Slabs from €200,000 to €300,000: 27%
- Over €300,000: 28%
📝 Worked Examples
Example 1: Moderate capital gain on selling a second home
Profile: Carlos, selling a holiday flat inherited several years ago.
- Original purchase price: €150,000.00 | Purchase expenses (ITP): €15,000.00
- Final sale price: €220,000.00 | Sale expenses (agency + municipal tax): €10,000.00
- Taxable gain: €210,000 (net sale) – €165,000 (net purchase) = €45,000.00
Example 2: Capital loss on an urgent property sale
Profile: Laura, selling a property below the total accumulated costs.
- Original purchase price: €180,000.00 | Purchase fees and taxes: €18,000.00
- Final sale price: €185,000.00 | Sale expenses: €8,000.00
- Net sale value: €177,000.00 | Net purchase value: €198,000.00
Example 3: Substantial capital gains on a villa
Profile: Albert, selling an urban detached villa that appreciated heavily.
- Original purchase price: €300,000.00 | Purchase costs and extensions: €40,000.00
- Final sale price: €600,000.00 | Sale expenses: €20,000.00
- Taxable gain: €580,000 (net sale) – €340,000 (net purchase) = €240,000.00
⚠️ 4 Common Mistakes for Sellers in Spain
- Not adding closing costs to the purchase value: Many sellers simply calculate their gain by subtracting the purchase price from the sale price. Omitting the ITP transfer tax or VAT paid when buying increases your taxable gain, costing you more in tax.
- Claiming repairs as capital improvements: Tax authorities draw a strict line between regular maintenance (painting, plumbing repairs) and structural improvements (adding an extension, central heating, or elevator). Maintenance costs cannot be added to your purchase value.
- Failing to declare gains on partial reinvestment: If you sell your main home and buy a new one but keep part of the money in cash, the un-reinvested portion is taxable. Claiming a full exemption without reinvesting 100% of the proceeds will lead to an audit.
- Omitting tax-deductible losses from your return: Even if you sell at a loss, you must declare the sale on your annual tax return (Modelo 100). Failing to declare it means you lose the right to offset future capital gains.
🏠 Special Tax Rules in Spain
Main Residence Reinvestment Exemption
If you sell your primary residence (vivienda habitual) and reinvest all the proceeds into purchasing a new main home, your capital gain is completely exempt from income tax. You must complete the purchase within two years (before or after) the sale. If you only reinvest a portion, you receive a proportional tax relief.
Exemption for Sellers Over 65
Taxpayers over the age of 65 are completely exempt from paying capital gains tax on the sale of their primary residence, regardless of whether they reinvest the money. For secondary properties, they can also claim an exemption if they place up to €240,000 of the sale proceeds into a certified life annuity plan within 6 months.
📋 What This Means for You
If you are selling your main home to relocate
Ensure you complete the purchase of your next home within the two-year window to preserve your tax exemption. Be ready to prove that you lived in the old property for at least three consecutive years to qualify for the main residence status.
If you are selling a holiday home or rental property
As this is not your primary residence, the gain is taxable on your next annual tax declaration. Collect all invoices containing VAT for renovations and agent fees over the years to reduce the taxable gain as much as possible.
❓ Frequently Asked Questions (FAQ)
They are taxed under the progressive savings income scale on your annual IRPF return. Tax rates range from 19% to 28% in 2026, calculated on the difference between net sale and net purchase values.
You can add purchase taxes (ITP/VAT), notary fees, land registry fees, and structural renovations to the purchase price. For the sale price, you can deduct real estate commission, gestoria costs, and the municipal plusvalía tax.
You have a maximum window of two years, starting from the exact date of the sale, to reinvest your proceeds into a new primary residence. Reinvestment also applies if you purchased the new home up to two years before selling the old one.
Seniors over 65 pay no tax on the gain from selling their primary residence. For a second home, they can claim the exemption if they reinvest the proceeds (up to €240,000) into a qualified lifetime annuity contract.
No, mortgage interest payments are financing costs and cannot be added to your purchase value or used to reduce your taxable capital gains when you sell the property.
You must declare the loss in Section G2 of your annual IRPF tax return. The loss can be used to offset capital gains in the same year or carried forward to offset gains for the following four tax years.
Yes, the plusvalía municipal tax paid to the town hall is treated as a sale expense. It is subtracted from the final sale price, which directly lowers the taxable capital gain for your federal IRPF return.
If the property was rented, the purchase value must be reduced by the accumulated depreciation (amortización) that was or should have been deducted during the rental period. This slightly increases the taxable capital gain.