Selling a property in Barcelona, cashing out shares listed on the Madrid Stock Exchange, or disposing of cryptocurrency holdings while living on the Costa del Sol? In every case, you need to understand how Spain capital gains tax works. Spain's capital gains tax (known as Impuesto sobre las Ganancias Patrimoniales) affects both residents and non-residents, and the rules for the 2025/2026 tax year include progressive rates that can reach up to 28%.

In this comprehensive guide, we explain how capital gains tax works in Spain, walk through the current rates and thresholds, cover exemptions and reliefs, and highlight critical differences for non-residents. Whether you're a Spanish national, an expat, or a foreign investor, this article will help you understand your obligations and plan accordingly.

Use our Spain Capital Gains Tax Calculator to quickly estimate your CGT liability based on your specific situation.

What Is Capital Gains Tax in Spain?

Capital gains tax (CGT) in Spain is a tax levied on the profit you make when you sell or dispose of an asset for more than you originally paid for it. The gain—the difference between the acquisition cost and the sale price—is what gets taxed, not the total sale proceeds.

Assets subject to capital gains tax in Spain include:

  • Real estate (residential property, commercial property, land)
  • Shares and securities (stocks, bonds, mutual funds, ETFs)
  • Cryptocurrency (Bitcoin, Ethereum, and other digital assets)
  • Precious metals and collectibles
  • Business assets disposed of outside the normal course of trade
  • Intellectual property rights and other intangible assets

For Spanish tax residents, capital gains are classified as part of the savings tax base (base imponible del ahorro), which is taxed separately from general income (such as salary, pensions, and rental income). This distinction is crucial because savings income—including capital gains—is taxed at different, generally lower, progressive rates than general income.

Capital Gains vs. General Income: Understanding the Difference

Spain's personal income tax system (IRPF – Impuesto sobre la Renta de las Personas Físicas) splits taxable income into two bases:

  1. General tax base (base imponible general): employment income, self-employment income, rental income, and certain imputed income. This is taxed at progressive rates from 19% up to 47% (or higher in some autonomous communities).
  2. Savings tax base (base imponible del ahorro): capital gains from asset disposals, dividends, and interest income. This is taxed at the progressive savings rates detailed below.

Understanding this split is essential because it means your capital gains are not simply added on top of your salary and taxed at your marginal income tax rate. Instead, they benefit from the dedicated savings tax schedule.

If you also want to understand how your employment or self-employment income is taxed, check out our Spain Income Tax Calculator.

Spain Capital Gains Tax Rates for 2025/2026

For the 2025/2026 tax year, Spain applies progressive tax rates to capital gains that fall within the savings tax base. The rates are as follows:

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 marginal, meaning they apply only to the portion of the gain that falls within each bracket—not to the entire gain. This is a common misconception.

How the Progressive Bands Work: A Practical Example

Let's say you are a Spanish tax resident and you sell an investment property in 2025, realizing a capital gain of €80,000. Here's how the tax would be calculated:

  1. First €6,000 taxed at 19% = €1,140
  2. Next €44,000 (€6,001 to €50,000) taxed at 21% = €9,240
  3. Remaining €30,000 (€50,001 to €80,000) taxed at 23% = €6,900

Total CGT liability = €17,280

This gives an effective tax rate of approximately 21.6% on the €80,000 gain.

Want to run your own numbers? Try our Spain Capital Gains Tax Calculator for an instant estimate.

Regional Variations

It's worth noting that Spain's autonomous communities (such as Catalonia, Andalusia, Madrid, and the Basque Country) can influence certain aspects of personal taxation. However, the savings tax rates that apply to capital gains are set at the national level and are consistent across all regions. Regional variation primarily affects the general income tax rates, not the savings tax base.

The Basque Country and Navarra operate under their own fiscal regimes (régimen foral) and may have slightly different rules. If you reside in these regions, seek specialist local advice.

Calculating Your Capital Gain in Spain

Before applying the tax rates, you need to correctly calculate the taxable gain. The basic formula is:

Capital Gain = Sale Price – Acquisition Cost – Allowable Expenses

Acquisition Cost

The acquisition cost includes:

  • The original purchase price of the asset
  • Transfer taxes or VAT paid at the time of purchase
  • Notary fees, registry fees, and legal costs related to the acquisition
  • For property: the cost of permanent improvements (but not routine maintenance or repairs)

Allowable Deductions from the Sale Price

From the sale price, you can deduct:

  • Estate agent or broker commissions
  • Legal and notary fees related to the sale
  • Municipal capital gains tax (plusvalía municipal) paid by the seller
  • Any other costs directly attributable to the sale transaction

Inflation Adjustment

Spain eliminated the inflation adjustment coefficients (coeficientes de actualización) for property capital gains back in 2015. This means there is no mechanism to adjust your acquisition cost for inflation when calculating gains on property sold today.

However, for assets acquired before 20 January 2006, transitional relief (régimen transitorio) may still apply. Under this regime, a reduction is available on gains accumulated before that date, calculated using specific abatement coefficients. This relief is capped—it only applies to the first €400,000 of total sale proceeds across all disposals benefiting from this regime.

Example: Selling a Property Purchased in 2002

Imagine you purchased an apartment in Madrid in 2002 for €150,000 (including all acquisition costs) and sell it in 2025 for €350,000, with €10,000 in selling costs. Your total gain is:

€350,000 – €150,000 – €10,000 = €190,000

Because the property was acquired before January 2006, part of this gain may qualify for the transitional abatement relief, potentially reducing the taxable amount. The calculation of the abatement is complex and depends on the number of years the asset was held before 20 January 2006 and the type of asset. A qualified tax advisor can help you determine the exact reduction.

Exemptions and Reliefs from Capital Gains Tax in Spain

Spain offers several important exemptions and reliefs that can significantly reduce or eliminate your CGT liability.

1. Primary Residence Exemption (Exención por Reinversión en Vivienda Habitual)

This is the most valuable relief for homeowners. If you sell your primary residence and reinvest the full proceeds into purchasing a new primary residence within two years (before or after the sale), the capital gain is fully exempt from tax.

Key conditions:

  • The property must have been your habitual residence (vivienda habitual) for at least three years (with some exceptions)
  • You must reinvest the entire sale proceeds, not just the gain
  • If you reinvest only part of the proceeds, the exemption is proportional
  • The new property must also become your habitual residence

2. Over-65 Exemption for Primary Residence

If you are aged 65 or older and sell your primary residence, the capital gain is completely exempt from tax—no reinvestment required. This is a significant benefit for retirees downsizing or relocating.

3. Over-65 Exemption with Life Annuity (Renta Vitalicia)

Taxpayers aged 65 or older who sell any asset (not just their home) can exempt the gain if they reinvest the proceeds (up to a maximum of €240,000) into a qualifying life annuity (renta vitalicia asegurada) within six months of the sale.

4. Losses Offsetting Gains

Capital losses realized in the same tax year can be offset against capital gains within the savings tax base. If your losses exceed your gains, you can carry forward the net loss for four years to offset future capital gains.

Important: You cannot offset savings-base losses against general-base income (such as salary), and vice versa, except for a limited 25% cross-offset rule for certain categories.

5. Dation in Payment (Dación en Pago)

If you surrender your primary residence to a bank in settlement of a mortgage debt and you have no other assets sufficient to pay the debt, the resulting capital gain may be exempt.

Capital Gains Tax for Non-Residents in Spain

Understanding how capital gains tax works in Spain for non-residents is critical for foreign property owners and investors. The rules differ significantly from those for residents.

Non-Resident CGT Rate

Non-residents who dispose of Spanish assets are subject to a flat tax rate on capital gains:

  • EU/EEA residents: 19% flat rate
  • Non-EU/EEA residents: 24% flat rate

These are flat rates, not progressive. The entire gain is taxed at the applicable rate regardless of the amount.

The 3% Withholding (Retención del 3%)

When a non-resident sells Spanish property, the buyer is legally required to withhold 3% of the total sale price (not 3% of the gain) and pay it directly to the Spanish tax authority (Agencia Tributaria) on behalf of the seller. This acts as an advance payment toward the seller's CGT liability.

If the actual tax owed is less than the 3% withheld, the non-resident seller can file a tax return to claim a refund of the excess. This refund process can take several months, so plan your cash flow accordingly.

Double Taxation Agreements (DTAs)

Spain has an extensive network of double taxation agreements with over 90 countries, including the United States, United Kingdom, Germany, France, Canada, Australia, and most EU member states. These treaties generally give Spain the right to tax gains on immovable property (real estate) located in Spain, but may provide relief for gains on other assets.

If you are a tax resident of another country and realize a capital gain in Spain, you should:

  1. Check the specific DTA between Spain and your country of residence
  2. Determine which country has primary taxing rights over the type of asset disposed of
  3. Claim a foreign tax credit in your home country for any Spanish CGT paid, to avoid being taxed twice on the same gain

For example, under the Spain-UK Double Taxation Agreement, Spain retains the right to tax gains on Spanish property, but the UK taxpayer can usually credit the Spanish tax against their UK capital gains tax liability.

Non-Resident Exemptions

Non-residents are generally not entitled to the primary residence reinvestment exemption or the over-65 primary residence exemption. However, EU/EEA residents may be able to claim the reinvestment exemption under EU non-discrimination principles—this is a nuanced area that requires professional advice.

Common Mistakes and Misconceptions

When dealing with capital gains tax in Spain, taxpayers frequently make the following errors:

1. Confusing Plusvalía Municipal with National CGT

The Impuesto sobre el Incremento de Valor de los Terrenos de Naturaleza Urbana (commonly called plusvalía municipal) is a separate local tax charged by the municipality on the increase in land value. It is not the same as national capital gains tax, and you may owe both when selling property. The plusvalía is, however, deductible as a selling cost when calculating your national CGT.

2. Assuming the 3% Retention Covers Everything

Non-residents sometimes assume the 3% buyer withholding is all they owe. In reality, the 3% is based on the total sale price, while the actual tax is based on the gain. If you bought a property for €100,000 and sell it for €500,000, the 3% withholding would be €15,000, but your actual tax liability at 19% on the €400,000 gain would be €76,000—a massive shortfall.

3. Missing the Reinvestment Deadline

The two-year window for reinvesting in a new primary residence is strict. Missing it by even a day means losing the exemption entirely, resulting in a potentially significant unexpected tax bill.

4. Failing to Report Losses

Some taxpayers don't report capital losses because they assume there's no obligation if there's no gain. However, reporting losses is essential to carry them forward and offset future gains.

5. Ignoring Cryptocurrency Gains

Spain's tax authority (AEAT) actively monitors cryptocurrency transactions. All gains from crypto disposals are taxable at the standard savings tax rates, and Spain requires disclosure of overseas crypto holdings through Modelo 721 if they exceed €50,000 in value.

Filing and Payment: Key Deadlines

Knowing when and how to file is just as important as knowing the rates.

For Tax Residents

  • Capital gains are reported in your annual income tax return (Modelo 100 / Declaración de la Renta)
  • The filing period for the 2025 tax year typically runs from April to June 2026
  • Payment is due at the time of filing, though installment options may be available

For Non-Residents

  • Non-residents must file Modelo 210 to declare capital gains
  • The filing deadline for property disposals is three months from the end of the period allowed for the buyer to file the 3% withholding (Modelo 211)
  • In practice, this typically means filing within four months of the sale date
  • If you are due a refund of the 3% withholding excess, you can apply for it through the same Modelo 210 process

Plusvalía Municipal Deadline

The separate municipal plusvalía must be declared within 30 business days of the property transfer for sales between living parties.

Frequently Asked Questions

Do I have to pay capital gains tax in Spain if I'm a non-resident?

Yes. Non-residents who sell Spanish property or other Spanish-sourced assets are subject to capital gains tax at a flat rate of 19% (EU/EEA residents) or 24% (others). A 3% withholding of the total sale price is retained by the buyer and remitted to the tax authorities as an advance payment.

Is there a capital gains tax exemption for selling my home in Spain?

Yes, if you reinvest the full sale proceeds into a new primary residence within two years. Additionally, sellers aged 65 and over who sell their habitual residence are fully exempt without any reinvestment requirement.

How are capital gains tax rates structured in Spain for 2025?

Spain uses progressive rates on capital gains: 19% on the first €6,000, 21% from €6,001 to €50,000, 23% from €50,001 to €200,000, 27% from €200,001 to €300,000, and 28% on gains exceeding €300,000.

Can I offset capital losses against capital gains in Spain?

Yes. Capital losses can be offset against capital gains in the same tax year. Any remaining net loss can be carried forward for up to four years to offset future gains within the savings tax base.

Do I have to pay capital gains tax on cryptocurrency in Spain?

Yes. Cryptocurrency gains are fully taxable in Spain at the standard savings tax base rates. Additionally, holdings of crypto assets abroad exceeding €50,000 must be declared via Modelo 721.

Conclusion: Plan Ahead to Minimize Your Spanish CGT

Spain's capital gains tax system is straightforward in principle but complex in detail. Here are the key takeaways for the 2025/2026 tax year:

  • Progressive rates range from 19% to 28% for residents, applied to the savings tax base
  • Non-residents pay a flat 19% (EU/EEA) or 24% (non-EU) rate, with a mandatory 3% withholding on property sales
  • The primary residence reinvestment exemption and over-65 exemption are powerful tools for reducing or eliminating CGT
  • Capital losses can offset gains and be carried forward for four years
  • Double taxation agreements may provide relief for international investors
  • Don't forget the separate plusvalía municipal on property sales

Proper planning—timing your disposals, utilizing exemptions, and offsetting losses—can save you thousands of euros. Use our Spain Capital Gains Tax Calculator to model different scenarios, and consult our Spain Income Tax Calculator to understand your overall tax position.


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.