EnglishFrançaisEspañol

A Guide to Capital Gains Tax in Spain for Expats

When you sell a property, shares, or cryptocurrency in Spain, the profit you make is subject to capital gains tax. How much you pay—and whether you pay anything at all—depends on factors that most sellers don’t consider until it’s too late.

This guide explains the framework, the rates, and the exemptions that exist. What it cannot replace is a professional review of your specific situation before you act.

What Is Capital Gains Tax in Spain?

Capital gains tax applies to the profit from selling an asset—not the total sale price. The taxable gain is broadly the difference between what you paid for the asset and what you sold it for, adjusted for certain allowable costs.

The tax applies to real estate, financial investments, business assets, and cryptocurrency—including transactions many investors do not realise are taxable.

The starting point for any analysis is always the same question: are you a Spanish tax resident?

Resident vs. Non-Resident: Why It Changes Everything

Need Legal Guidance?

Need help with your case in Spain?

If this article applies to your situation, contact our team for tailored legal guidance and clear next steps.

Tax residency determines not just the rate you pay, but the scope of what Spain can tax.

  • A tax resident pays Spanish tax on worldwide gains—profits from assets held anywhere on the globe.
  • A non-resident only pays Spanish tax on gains from Spanish assets, such as a property located here.

Many expats assume residency is determined solely by the 183-day rule. In practice, the Spanish tax authorities also examine your centre of economic interests—where your business activity, income, and financial ties are concentrated—and your family situation. These factors can override a simple day count. Misclassification of residency is one of the most frequent and costly errors we encounter in practice.

Flowchart illustrating Capital Gains Tax residency determination, distinguishing between Spanish tax residents and non-residents.

The Tax Rates

For Tax Residents

Capital gains are classified as renta del ahorro (savings income) and taxed on a progressive scale. The rates below apply to the 2026 tax year:

Taxable Gain Rate
Up to €6,000 19%
€6,001 – €50,000 21%
€50,001 – €200,000 23%
€200,001 – €300,000 27%
Over €300,000 30%

These are marginal rates—you only pay each rate on the portion of your gain that falls within that bracket, not on the total gain.

Note: autonomous community rates do not affect savings income. This scale applies uniformly across Spain.

For Non-Residents

Non-residents are subject to the Impuesto sobre la Renta de No Residentes (IRNR). For capital gains specifically—meaning gains from the sale of property or other assets—the rate is generally 19%. This rate applies to the net gain—not the sale price—and the final liability depends on how the gain is calculated and documented. The applicable rate should always be confirmed based on your specific residency status and any relevant tax treaty position.

The commonly cited 24% rate is the general IRNR rate for other types of Spanish-source income (such as rental income for non-EU residents). It does not apply to capital gains from asset transfers in most cases. This is a distinction that many guides—and some advisors—get wrong, but the precise rate in your situation depends on the facts.

How Your Taxable Gain Is Calculated

The formula is: Sale Price − Acquisition Cost = Taxable Gain

Where things get complex—and where most sellers leave money on the table—is in correctly establishing the full acquisition cost. The acquisition cost extends beyond the purchase price to include associated taxes, fees, and qualifying improvements—provided they are properly documented and accepted by the tax authorities.

This is a critical distinction: major structural improvements (obras de mejora) that genuinely increased the property’s value may qualify. Routine maintenance and redecoration do not.

For property, major structural improvements (obras de mejora) that genuinely increased the property’s value may also be added to the acquisition cost, directly reducing your taxable gain. Routine maintenance and redecoration do not qualify.

The burden of proof lies entirely with the taxpayer. Without proper documentation—official invoices (facturas) with VAT for every deductible item—the tax office will disallow the deduction. This is an area where poor record-keeping from years prior can have a significant financial impact at the point of sale.

Diagram illustrating taxable gain calculation: Sale Price minus Acquisition Cost, with deductible costs including transfer tax, notary fees, commissions and major improvements.

Note for property sellers: In addition to the national capital gains tax (IRPF or IRNR), the sale of urban property also triggers the Impuesto sobre el Incremento de Valor de los Terrenos de Naturaleza Urbana—commonly known as the Plusvalía Municipal. This is a separate local tax levied by the town hall. It is generally calculated based on cadastral value using statutory methods, although recent legal developments allow the tax to be challenged in certain situations—particularly where no real increase in value has occurred. It applies to both residents and non-residents, and cannot be offset against your capital gains liability.

Key Exemptions for Tax Residents

Illustration of a house and key representing property tax exemptions and reliefs available in Spain.

Spain offers meaningful reliefs on capital gains, but none of them are automatic. Each requires specific conditions to be met and must be declared correctly on your tax return.

Main Residence Reinvestment Relief
If you sell your vivienda habitual and reinvest the proceeds into a new main residence, the gain may be exempt from tax. The conditions are strict: the property must have been your continuous main residence for a minimum period before the sale, and reinvestment must be completed within a defined window. Certain exceptions may apply in cases such as relocation for work, separation, or other legally justified circumstances. Full reinvestment of the proceeds produces full relief; partial reinvestment may still qualify for proportional relief. Failing to declare the intention to reinvest on the return for the year of sale is enough to lose the exemption entirely.

Exemption for Over-65 Residents
Tax residents over 65 who sell their main residence are fully exempt from capital gains tax, with no obligation to reinvest the proceeds. The property must qualify as the main residence under Spanish law at the time of sale. For properties that have appreciated significantly over decades, this exemption can represent a tax saving of tens of thousands of euros.

Capital Gains Tax on Property in Spain for Non-Residents

Selling property in Spain as a non-resident involves a specific set of obligations that differ significantly from those applicable to residents. The capital gains arising from a Spanish property sale are subject to IRNR, and the process is managed through a two-step mechanism that many sellers are not aware of until after the transaction has completed.

The 3% retention applied at the point of sale is not the final tax settlement—it is an advance. The actual capital gain on the property must subsequently be calculated and declared, taking into account the full acquisition cost, eligible deductions, and any applicable treaty provisions. Non-residents who fail to file after selling property in Spain frequently leave refunds unclaimed or expose themselves to penalties for non-compliance.

For non-residents considering a Spanish property sale, early planning is not optional—it is the difference between a managed outcome and an avoidable liability.

The 3% Withholding: What Non-Resident Sellers Must Know

When a non-resident sells a Spanish property, the buyer is legally required to withhold 3% of the total sale price and pay it directly to the Agencia Tributaria as an advance on the seller’s tax liability.

This withholding is not the final settlement. The 3% retention mechanism applied at the time of sale is an advance payment only. The seller must subsequently file a separate return—this is typically declared through Modelo 210 for non-residents—within approximately four months from the date of transfer. That return is where the actual gain is calculated and the real tax liability is determined. If the 3% withheld exceeds the tax owed, a refund can be claimed—but only if the return is filed. Many sellers fail to take this step, leaving money unclaimed.

Situations That Carry Higher Risk

The following circumstances carry a disproportionate risk of errors, penalties, or lost reliefs, and are situations where professional guidance is not optional:

  • Ambiguous residency status, particularly where work patterns, international travel, or family ties could be interpreted differently by the tax authorities.
  • Property that has served dual purposes—both a primary home and a rental property—where the applicable reliefs are partially restricted.
  • Inherited or gifted assets, which are subject to specific valuation rules that differ fundamentally from standard purchases.
  • Assets held in multiple countries, where the correct application of a Double Taxation Agreement is essential to avoid paying tax twice.
  • Beckham Law holders, whose capital gains treatment depends on the nature and location of the asset, and is frequently misunderstood. See our guide to the Beckham Law in Spain.
  • Residents with assets held abroad, who may have additional reporting obligations under Spanish law beyond the capital gains return itself.

For non-residents with specific obligations arising from a Spanish property sale, our guide to Spanish property tax for non-residents covers the broader compliance picture. If you are unsure whether you qualify as a tax resident, our non-resident tax guide provides a detailed breakdown.

Filing and Compliance Considerations

Although the concept of capital gains tax may appear straightforward, the filing and compliance process is often where errors occur—particularly for non-residents.

Capital gains derived from the sale of Spanish property by non-residents are typically declared using Modelo 210, which must be submitted within four months from the date of transfer. The 3% retention mechanism applied at the time of sale must later be reconciled through this return. Failure to correctly file the corresponding tax return may result in:

  • Loss of potential refunds
  • Penalties or surcharges
  • Delays in recovering withheld amounts

We regularly see cases where sellers assume that the withholding fully settles their tax position, when in reality a formal filing is still required. The process, deadlines, and documentation requirements vary depending on residency status and the nature of the asset, making early review essential to avoid costly mistakes.

Frequently Asked Questions

What is Modelo 210 in Spain?

Modelo 210 is the tax return used by non-residents to report Spanish-source income, including capital gains from the sale of property.

In practice, this is the filing that determines whether additional tax is due or whether part of the 3% withholding can be recovered. Errors in calculation or timing can directly affect the final tax position and any potential refund.

What is the 3% retention for non-residents in Spain?

When a non-resident sells property in Spain, the buyer is required to withhold 3% of the purchase price and pay it to the Spanish tax authorities.

This is not the final tax, but an advance payment. However, whether this amount is sufficient—or excessive—depends entirely on how the capital gain is calculated and subsequently reported.

When do you have to pay capital gains tax in Spain?

The timing depends on residency status.

Non-residents must regularise their position through Modelo 210 within four months from the date of transfer. Tax residents declare capital gains in their annual income tax return (IRPF), filed between April and June of the following year.

Failure to comply with deadlines may result not only in penalties, but also in the loss of the right to recover excess withholding.

Do non-residents always pay 19% capital gains tax in Spain?

In general terms, capital gains derived by non-residents are taxed at 19%. However, this does not apply to the sale price, but to the net gain—calculated after applying acquisition costs, taxes, and other adjustments.

In practice, the final liability often differs significantly depending on how the transaction is structured and reported. Applicable tax treaties and individual circumstances may also affect the outcome.

Can you reduce capital gains tax in Spain?

Spanish law provides certain exemptions and reductions, particularly for tax residents.

However, these benefits are subject to strict legal conditions and must be carefully planned in advance. In many cases, failing to structure the transaction correctly can result in losing the available tax relief.

Do people over 65 pay capital gains tax in Spain?

Tax residents over 65 who sell their main residence (vivienda habitual) may benefit from a full exemption from capital gains tax.

However, this exemption is not automatic. The property must meet the legal definition of a main residence, and the exemption must be correctly applied and declared in the tax return.

Additionally, individuals over 65 may benefit from a separate exemption when reinvesting gains into a qualifying life annuity (renta vitalicia asegurada), subject to specific conditions and limits.

Do I pay capital gains tax in Spain if I sell at a loss?

No tax is due if the sale results in a loss. However, the transaction must still be properly reported.

Declared losses may be offset in accordance with applicable rules, provided they are correctly declared. Failure to report the loss may result in losing the ability to use it.

What is Plusvalía Municipal and is it the same as capital gains tax?

These are separate taxes.

Capital gains tax is a national tax based on the profit obtained from the sale. Plusvalía Municipal is a local tax calculated based on the increase in the cadastral value of the land.

Recent legal developments have introduced important changes in how this tax is assessed, and in certain cases it may be possible to challenge or reduce the amount payable.

Is inherited property subject to capital gains tax in Spain?

Inheritance itself is subject to a separate tax. However, if the inherited property is later sold, capital gains tax will apply.

The value declared at the time of inheritance becomes the reference point for future taxation, making correct valuation and documentation essential.

Before You Proceed

The rules governing capital gains tax in Spain are not a checklist—they are a framework that interacts with your specific circumstances, documentation, and timing. The difference between a correct and incorrect application of these rules is often the difference between a manageable tax bill and a significant unexpected liability.

If your situation involves any of the complexities above, a case review before the transaction—not after—is the only way to ensure that every available relief is properly claimed.

Book a 45-minute consultation with Legal Fournier →


This article is for informational purposes only and does not constitute legal or tax advice. Individual circumstances vary and may significantly affect the outcome. Legal Fournier recommends seeking professional guidance before taking any action based on the content of this article.

Share your love
Francisco Ordeig Fournier
Francisco Ordeig Fournier

Lawyer for Spanish immigration, tax, property and business matters

Practical legal guidance for international clients through one coordinated firm.

Bar registration number 2330

Book a consultation

Articles: 260