Spain remains one of the most attractive destinations for real estate investment in Europe, drawing buyers from around the world with its Mediterranean climate, rich culture, and competitive property prices. But before you commit to buying or selling property in Spain, understanding the property tax Spain framework — and specifically capital gains tax on property in Spain — is essential to making informed investment decisions in the 2025/2026 tax year.
Whether you're a Spanish resident selling your primary home, a non-resident offloading a holiday apartment on the Costa del Sol, or a foreign investor evaluating real estate investment Spain tax implications, this comprehensive guide covers everything you need to know about capital gains tax, exemptions, deductions, and common pitfalls.
What Is Capital Gains Tax on Property in Spain?
Capital gains tax (Impuesto sobre la Renta de las Personas Físicas for residents, or Impuesto sobre la Renta de No Residentes for non-residents) is a tax levied on the profit you make when you sell a property in Spain. The "gain" is calculated as the difference between your acquisition cost and your selling price, adjusted for allowable expenses and improvements.
In simple terms:
Capital Gain = Sale Price − (Purchase Price + Allowable Costs + Improvements)
If the result is positive, you've made a taxable gain. If negative, you've made a loss — which may be offset against other capital gains in the same or future tax years.
Spain's capital gains tax rules differ significantly depending on whether you are a tax resident or a non-resident, so let's break down each scenario.
Capital Gains Tax Rates for Residents in 2025/2026
If you are a tax resident of Spain (generally meaning you spend more than 183 days per year in the country, or your center of economic or vital interests is in Spain), capital gains from a property sale are classified as savings income (renta del ahorro) and taxed at progressive rates.
2025/2026 Savings Income Tax Brackets
The current rates applicable to capital gains for the 2025/2026 tax year are:
| Taxable Capital Gain (EUR) | Tax Rate |
|---|---|
| Up to €6,000 | 19% |
| €6,001 – €50,000 | 21% |
| €50,001 – €200,000 | 23% |
| €200,001 – €300,000 | 27% |
| Over €300,000 | 28% |
These rates are applied progressively, meaning that each portion of your gain is taxed at the corresponding rate for that bracket — not your entire gain at the highest applicable rate.
Practical Example: Resident Seller
Let's say you purchased an apartment in Barcelona for €250,000 (including all acquisition costs) and sold it in 2025 for €400,000 (net of selling expenses). Your taxable capital gain would be €150,000.
Here's how the tax would be calculated:
- First €6,000 at 19% = €1,140
- Next €44,000 (€6,001 – €50,000) at 21% = €9,240
- Remaining €100,000 (€50,001 – €150,000) at 23% = €23,000
Total capital gains tax = €33,380
Want to run your own numbers? Use our Spain Capital Gains Tax Calculator to estimate your liability instantly.
Capital Gains Tax for Non-Residents in 2025/2026
If you are a non-resident of Spain and you sell a Spanish property, you are still liable for capital gains tax in Spain. The rules, however, are slightly different — and in many ways simpler, though not necessarily cheaper.
Flat Rate for Non-Residents
Non-residents from EU/EEA countries, as well as non-residents from third countries (non-EU), are currently subject to a flat tax rate of 19% on property capital gains.
However, there is an important distinction:
- EU/EEA residents are taxed at the flat rate of 19% and may be able to offset certain expenses and losses similarly to Spanish residents.
- Non-EU/EEA residents are also taxed at 19%, but historically had fewer deduction options. Recent rulings and legislative updates have moved toward greater alignment, but it's crucial to verify current rules with a qualified professional.
The 3% Retention for Non-Residents
One of the most important aspects of property tax Spain rules for non-residents is the mandatory 3% retention (retención). When a non-resident sells a property in Spain, the buyer is legally required to withhold 3% of the total sale price (not the profit) and pay it directly to the Spanish Tax Authority (Agencia Tributaria) as an advance payment toward the seller's capital gains tax.
Example:
If you sell your property for €300,000, the buyer must withhold €9,000 and pay it to the tax authorities on your behalf within one month of the sale.
You will then need to file a non-resident capital gains tax return (Modelo 210) within four months of the sale date. If your actual tax liability is less than the amount retained, you can apply for a refund — though this process can take several months.
Common Mistake: Many non-resident sellers are surprised by this 3% retention and fail to account for it in their financial planning. Always factor it into your expected net proceeds from the sale.
Allowable Deductions: Reducing Your Taxable Capital Gain
Spain allows several deductions that can significantly reduce your taxable capital gain. Understanding and documenting these correctly is one of the most effective ways to lower your capital gains tax property Spain liability.
Purchase Costs You Can Deduct
When calculating your acquisition cost, you can add the following expenses to your original purchase price:
- Transfer Tax (ITP) or VAT (IVA) paid at purchase
- Notary fees for the purchase deed
- Land Registry fees
- Legal fees related to the purchase
- Real estate agent commissions paid at purchase (if applicable)
Improvement Costs
You can also add the cost of permanent improvements (mejoras) to the property — but not routine maintenance or repairs. Examples include:
- Building an extension or adding a new room
- Installing a swimming pool
- Major renovations (new kitchen, structural changes)
- Energy efficiency upgrades
Important: You must retain invoices and proof of payment for all improvements. The Spanish tax authorities can (and do) request documentation.
Selling Costs You Can Deduct
From the sale price, you can deduct:
- Real estate agent commissions paid for selling
- Legal fees related to the sale
- Municipal capital gains tax (Plusvalía Municipal) — this is a separate local tax based on the increase in land value (more on this below)
- Mortgage cancellation fees (the administrative cost of releasing the mortgage from the deed, not outstanding mortgage balance)
Inflation Adjustment (Historical Properties)
For properties acquired before December 31, 1994, a transitional reduction coefficient historically applied that could reduce or eliminate the taxable gain. While this provision still exists, it was capped in 2015 for gains exceeding €400,000 in sale price. If you own a property purchased before 1995, consult a tax advisor to see whether this reduction applies to your situation.
Key Exemptions and Relief for Property Sellers
Spain offers several important exemptions that can dramatically reduce — or even eliminate — your capital gains tax liability. These are particularly relevant for residents.
Primary Residence Exemption (Residents Only)
If you are a Spanish tax resident and you sell your habitual residence (vivienda habitual), you may be fully exempt from capital gains tax provided you reinvest the entire sale proceeds into a new primary residence within Spain or another EU/EEA country.
Key conditions:
- The property must have been your primary residence for at least 3 years (exceptions apply for job relocation, separation, or other justified reasons).
- You must reinvest the full sale price (not just the gain) into a new primary residence.
- The reinvestment must be made within 2 years before or after the sale.
- If you reinvest only part of the proceeds, the exemption is proportional.
Example: You sell your Madrid apartment for €350,000 (with a gain of €100,000) and buy a new home for €350,000 within two years. Your capital gains tax: €0.
If you reinvest only €250,000 of the €350,000, the exempt portion would be 250,000/350,000 = 71.4%, and you'd only pay tax on 28.6% of the gain.
Over-65 Exemption
Spanish tax residents aged 65 or over can benefit from a complete capital gains tax exemption when selling their primary residence, without any reinvestment requirement. This is one of the most generous tax reliefs in the Spanish system.
Additionally, individuals over 65 who sell a property that is not their primary residence can also be exempt, provided they use the proceeds to purchase a life annuity (renta vitalicia) within 6 months, up to a maximum of €240,000.
Dependants and Severe Disability
Persons in a situation of severe dependency (gran dependencia) are also exempt from capital gains tax on the sale of their habitual residence, without the reinvestment requirement.
Plusvalía Municipal: The Other Property Tax in Spain
Many property investors in Spain are caught off guard by the Plusvalía Municipal (Impuesto sobre el Incremento de Valor de los Terrenos de Naturaleza Urbana), which is a separate local tax imposed by the municipality (ayuntamiento) where the property is located.
This tax is based on the increase in the cadastral land value over the period of ownership, not the actual market gain. Following a landmark Constitutional Court ruling in 2021, Spain reformed this tax so that:
- You are not liable for Plusvalía Municipal if you sell the property at a loss (based on actual transaction values).
- You can choose between two calculation methods: the objective method (based on cadastral value and coefficients set by the municipality) or the real gain method (based on actual purchase and sale prices applied to the land portion).
The rates and coefficients vary by municipality, so the amount can differ significantly between cities. This tax is typically paid within 30 days of the sale.
Tip: Always request a Plusvalía estimate from the local town hall before completing your sale so there are no surprises.
Double Taxation Agreements: Avoiding Paying Tax Twice
If you're a non-resident selling property in Spain, you may wonder whether you'll also owe capital gains tax in your home country. The answer depends on the double taxation agreement (DTA) between Spain and your country of residence.
Spain has signed DTAs with over 90 countries, including the UK, the United States, Germany, France, the Netherlands, and most other EU nations. In most cases:
- Spain has the primary right to tax capital gains on real estate situated in Spain.
- Your home country may also tax the gain but will typically allow you to credit the tax paid in Spain against your domestic liability, avoiding double taxation.
Key Examples by Country
- UK residents: Under the Spain-UK DTA, Spain taxes the gain first. The UK also taxes worldwide gains, but you receive a foreign tax credit for the tax paid in Spain. Since UK capital gains tax rates (up to 24% for residential property in 2025/2026) may be higher than the 19% Spanish non-resident rate, you could owe additional tax in the UK.
- US residents: The US taxes its citizens and residents on worldwide income. Under the Spain-US DTA, you can claim a foreign tax credit on your US return for Spanish capital gains tax paid.
- German residents: Similar treatment — credit is given for Spanish tax paid, with any residual liability payable in Germany.
Always verify your specific DTA situation with a qualified cross-border tax advisor.
Common Mistakes When Dealing With Capital Gains Tax on Spanish Property
Avoiding these frequent errors can save you time, money, and stress:
- Not keeping receipts for improvements: Without proper invoices, the tax authorities may disallow deductions, increasing your taxable gain.
- Confusing the 3% retention with your total tax liability: The 3% withheld from non-residents is an advance, not the final tax. Your actual tax could be more or less.
- Forgetting to file: Non-residents must file Modelo 210 within four months of the sale. Late filing triggers penalties and interest.
- Ignoring Plusvalía Municipal: This is a separate tax. Failing to pay it can result in surcharges and even affect the property's legal status.
- Missing the reinvestment deadline: For the primary residence exemption, you have exactly two years. Missing the deadline means losing the exemption entirely.
- Underestimating the declared value: Spain's tax authorities compare sale prices against reference values. Declaring a sale price significantly below market value can trigger audits and adjustments.
- Not considering the tax year of sale: The capital gains tax return must be filed as part of your annual income tax declaration (for residents) for the year in which the sale occurs. Don't wait until the following year's filing deadline to start planning.
Use our Spain Capital Gains Tax Calculator to get a clear estimate before you sell, and our Spain Income Tax Calculator to understand how the gain integrates with your overall tax picture as a resident.
Frequently Asked Questions
How long do I have to file my capital gains tax return after selling property in Spain?
Residents include the gain in their annual income tax return (Declaración de la Renta), filed between April and June of the year following the sale. Non-residents must file Modelo 210 within four months of the sale date.
Can I offset capital losses against capital gains in Spain?
Yes. Spanish tax residents can offset capital losses from property sales against other capital gains in the same tax year. If there is still a net loss, it can be carried forward for four years to offset future gains.
Do I pay capital gains tax if I sell a property at a loss?
No. If the adjusted sale price (after deducting allowable expenses) is less than your adjusted purchase price, there is no capital gain and therefore no capital gains tax. You should still file the relevant tax forms and may be exempt from Plusvalía Municipal as well.
Is inherited property subject to capital gains tax in Spain?
When you inherit property in Spain, you pay inheritance tax (Impuesto sobre Sucesiones) but not capital gains tax at the time of inheritance. However, when you later sell the inherited property, you will owe capital gains tax on any increase in value from the date of inheritance (using the declared value for inheritance tax purposes as your acquisition cost) to the date of sale.
What about properties purchased before 1994?
Properties acquired before December 31, 1994, may benefit from transitional reduction coefficients that can significantly reduce or eliminate the taxable gain. However, this relief was capped for properties sold for more than €400,000 (total sale price) since January 1, 2015. It's worth consulting a specialist if this applies to your situation.
Conclusion: Plan Ahead for Maximum Tax Efficiency
Understanding capital gains tax on property in Spain is not optional — it's a critical part of any successful real estate investment strategy. Whether you're a resident taking advantage of the primary residence exemption, a non-resident navigating the 3% retention, or an international investor leveraging double taxation agreements, proper planning can save you thousands of euros.
Key takeaways for 2025/2026:
- Resident capital gains tax rates range from 19% to 28% on a progressive scale.
- Non-residents pay a flat 19% rate, with a mandatory 3% retention at the point of sale.
- Deductions for purchase costs, improvements, and selling expenses can significantly reduce your taxable gain.
- The primary residence exemption and over-65 relief can eliminate your tax bill entirely if conditions are met.
- Don't forget the Plusvalía Municipal — it's a separate tax that catches many sellers off guard.
- Double taxation agreements prevent you from being taxed twice, but you need to claim relief proactively.
Get a clear picture of your potential liability today with our Spain Capital Gains Tax Calculator, and explore your broader Spanish tax obligations with our Spain Income Tax Calculator.
This article is for informational purposes only and does not constitute tax advice. Tax laws change frequently; consult a qualified tax professional for advice specific to your situation.