How Capital Gains Tax in Spain Actually Works
Capital gains tax in Spain combines progressive rates for residents (19% to 28%), a flat rate for non-residents, and a holding-period rule that can push short-term gains into income tax territory at rates approaching 47%. If your gains routinely exceed €300,000, the headline 19% rate you see in most articles is largely irrelevant to your situation.
The Two Tax Bases: Where Your Gains Actually Land
Spain splits taxable income into two buckets: the general tax base (renta general) and the savings tax base (base imponible del ahorro). Where your capital gain lands determines everything about your rate.
Assets held for more than one year fall into the savings tax base and face the progressive rates covered below. Assets held for one year or less are swept into the general tax base alongside employment income, where combined state and regional rates can reach 47% to 54% depending on your autonomous community.
This binary treatment is one of the most consequential and least-understood aspects of Spanish capital gains tax for investors accustomed to US or UK systems with graduated holding-period benefits. The US taxes short-term gains at ordinary income rates and long-term gains at preferential rates across multiple holding periods. Spain uses a single threshold: one year.
Cross that line and you access the savings base. Miss it and you face income tax rates on the full gain.
The practical implication is straightforward. On a €500,000 gain from a position you held for eleven months, the difference between selling now and waiting six weeks could be €100,000 or more in additional tax. That is not a rounding error.
Spanish Capital Gains Tax Rates for Residents in 2024
The Agencia Tributaria classifies capital gains within the savings tax base with five progressive brackets. Spain introduced a 27% bracket in 2021 and a 28% top rate on gains exceeding €300,000, a threshold directly relevant to anyone selling a property, business, or concentrated equity position at FatFIRE scale.
| Gain Amount (Savings Tax Base) | Tax Rate |
|---|---|
| Up to €6,000 | 19% |
| €6,001 to €50,000 | 21% |
| €50,001 to €200,000 | 23% |
| €200,001 to €300,000 | 27% |
| Above €300,000 | 28% |
Most general-audience articles quote the 19% entry rate. For a €2M property gain, the blended effective rate sits materially higher. The first €6,000 is taxed at 19%, but the vast majority of the gain falls into the 27% and 28% brackets. Model your actual liability against the full bracket stack, not the headline rate.
The European Commission's 2023 Taxation Trends report confirms that Spain's top savings tax rate of 28% places it among the higher tiers within the EU for capital income taxation.
What Non-Residents Pay on Spanish Capital Gains
Non-residents face a different structure. According to the Agencia Tributaria's guidance on the Impuesto sobre la Renta de No Residentes (IRNR), EU and EEA residents pay a flat 19% on Spanish-source capital gains. Non-residents from outside the EU and EEA generally face a 24% rate on most Spanish-source income, though capital gains are typically taxed at 19% regardless of origin.
| Residency Status | Capital Gains Rate | Applicable Form |
|---|---|---|
| Spanish tax resident | 19%–28% (progressive) | Modelo 100 (IRPF) |
| EU / EEA non-resident | 19% (flat) | Modelo 210 |
| Non-EU / non-EEA non-resident | 19% on gains (24% on other income) | Modelo 210 |
The flat rate looks simpler, but non-residents selling Spanish real estate face an immediate cash-flow complication covered in the next section.
For context on how Spain's approach compares to other European systems, see European capital gains tax frameworks and comparing Spain's rates with Germany's system.
The 3% Withholding Rule Non-Residents Cannot Ignore
When a non-resident sells Spanish real estate, the buyer is legally required to withhold 3% of the gross purchase price and remit it directly to the Agencia Tributaria as a prepayment against the seller's capital gains tax liability.
This is not 3% of the gain. It is 3% of the total sale price.
On a €3M property sale, €90,000 is withheld at closing regardless of your actual gain. If your taxable gain is modest relative to the sale price, because you paid €2.5M for the property and your actual tax liability is €30,000, you are owed a €60,000 refund. The Agencia Tributaria processes these refunds via Modelo 210, and the timeline typically runs 12 to 18 months.
That is a significant liquidity consideration for anyone planning a large Spanish real estate exit. Factor the withholding into your closing proceeds and budget accordingly. If you are reinvesting sale proceeds into another asset shortly after closing, the refund timeline could create a gap.
For broader context on capital gains tax implications for foreign property and non-resident taxation on investment income, the withholding mechanics vary significantly by jurisdiction.
How Spain's Double Tax Treaties Affect Your Position
Spain has bilateral double tax treaties with over 90 countries, including the US, UK, Germany, and France. The OECD Model Tax Convention, which underpins most of these agreements, generally grants the right to tax real property gains to the country where the property is located.
In practice, this means a US citizen selling a Spanish villa owes Spanish capital gains tax on that transaction regardless of their US tax obligations. The US-Spain treaty does not eliminate the Spanish liability; it provides mechanisms to credit Spanish tax paid against US obligations and vice versa, reducing (but rarely eliminating) double taxation.
For UK residents post-Brexit, the UK-Spain treaty still applies, but UK residents are now treated as non-EU non-residents for IRNR purposes in some administrative contexts. Confirm current treaty application with a Spanish tax advisor before assuming EU rates apply.
Treaty provisions also affect portfolio investment income differently from real property gains. Dividends and interest from Spanish securities may be taxed at reduced withholding rates under treaty, while gains on shares in Spanish companies held by non-residents are generally taxable in Spain only if the company derives more than 50% of its value from Spanish real estate.
Key Exemptions and Reliefs Worth Knowing
Spain offers several meaningful exemptions. The ones below are the ones most relevant to high-net-worth individuals.
Primary residence reinvestment exemption. Under Article 38 of Spain's IRPF law (Ley 35/2006), taxpayers under 65 can exclude capital gains from the sale of their habitual residence if the full proceeds are reinvested in a new primary residence within two years. The reinvestment must be complete, not partial. If you reinvest 80% of the proceeds, you exclude 80% of the gain.
Over-65 primary residence exemption. Residents aged 65 or older who sell their habitual residence are fully exempt from capital gains tax on that sale, with no reinvestment requirement.
Life annuity exemption. Residents over 65 who sell any asset and use the proceeds to purchase a qualifying life annuity (renta vitalicia) can exclude up to €240,000 of gains from tax. The annuity must be contracted within six months of the sale.
Loss offsetting. Capital losses can offset capital gains within the same tax year. Unused losses carry forward for four years. This is a standard tool for tax-loss harvesting on equity portfolios, though Spain's rules on wash sales differ from US rules.
Reinvestment relief for business assets. Gains from selling certain business assets can be deferred if reinvested in qualifying replacement assets within a defined window.
| Exemption | Eligibility | Key Condition |
|---|---|---|
| Primary residence reinvestment | Under 65, Spanish tax resident | Full reinvestment within 2 years |
| Primary residence sale | Over 65, Spanish tax resident | None (full exemption) |
| Life annuity exemption | Over 65, any asset | Up to €240,000; annuity within 6 months |
| Loss carryforward | All residents | 4-year carry period |
For selling vacation homes in Spain and non-primary residence capital gains considerations, none of these primary residence exemptions apply. The full gain is taxable.
Calculating Your Taxable Gain: What the Acquisition Cost Includes
The taxable gain is sale price minus acquisition cost, with both figures adjusted for allowable expenses.
Acquisition cost includes the original purchase price plus purchase taxes (ITP or IVA), notary fees, land registry fees, legal costs, and the cost of capital improvements made to the property. Routine maintenance does not qualify.
Sale price is the gross proceeds minus estate agent commissions, notary fees, and legal costs directly attributable to the sale.
One significant change: Spain's 2021 Anti-Fraud Law (Ley 11/2021) eliminated the monetary correction coefficients that previously allowed sellers to adjust the acquisition cost for inflation. For long-held properties, this elimination increases the nominal gain and therefore the tax liability. A property purchased in 1995 and sold today carries the full nominal gain without any inflation adjustment, even though a portion of that gain is purely monetary rather than real.
This is a material change that affects anyone holding Spanish real estate acquired before 2015 or so. Model your gain using the unadjusted acquisition cost.
Cryptocurrency and Digital Assets: Spain's Current Position
Spain's Directorate General of Taxes (Dirección General de Tributos) has issued binding rulings confirming that cryptocurrency disposals are taxable capital gain events under IRPF. This includes swaps between cryptocurrencies. Exchanging Bitcoin for Ethereum is a taxable event, not a deferral.
Cost basis is calculated using FIFO (first-in, first-out) methodology, per DGT guidance. You cannot choose specific identification or LIFO to optimize your tax position, which limits the tax-loss harvesting flexibility that US investors may be accustomed to.
Staking rewards and mining income are generally treated as ordinary income at the time of receipt, not as capital gains. When you later sell staked tokens, the gain is calculated from the fair market value at the time of receipt (your cost basis) to the sale price.
DeFi transactions present ongoing complexity. The DGT has addressed some scenarios, but many DeFi interactions lack definitive rulings. Liquidity provision, yield farming, and protocol token distributions each carry different potential treatments. If your crypto exposure is material, get a binding ruling (consulta vinculante) before filing.
For minimizing capital gains on stock sales, many of the same timing and loss-harvesting principles apply to crypto, within the FIFO constraint.
Spain's Wealth Tax and How It Interacts with Capital Gains Planning
Spain's Wealth Tax (Impuesto sobre el Patrimonio), reinstated permanently after 2021 under Ley 19/1991 and supplemented by the Solidarity Tax on Large Fortunes for net assets above €3 million, creates a compounding tax burden that directly affects capital gains planning for high-net-worth residents.
The Solidarity Tax applies at 1.7% on net assets between €3M and €5M, 2.1% between €5M and €10M, and 3.5% above €10M. This is an annual charge on the value of your assets, not on gains. Holding a concentrated position in Spanish real estate or a private company means paying wealth tax on the full value every year, regardless of whether you sell.
This dynamic changes the calculus on timing. Holding an appreciated asset to defer capital gains tax has a real annual cost in wealth tax. In some scenarios, selling sooner and paying capital gains tax is more efficient than holding and paying wealth tax annually on an inflated asset value.
The interaction also affects structuring decisions. Assets held through certain corporate structures may be valued differently for wealth tax purposes, and some structures can reduce the wealth tax base while maintaining economic exposure.
Spain's wealth tax system is a parallel planning constraint that your Spanish tax advisor should model alongside capital gains scenarios, not separately. For comparison, Portugal's wealth taxation landscape takes a meaningfully different approach that some high-net-worth individuals factor into residency decisions.
The Exit Tax: What Happens When You Leave Spain
Spain's exit tax (Impuesto de Salida), established under Article 95 bis of the IRPF law, taxes unrealized capital gains when a Spanish tax resident relocates abroad. Two thresholds trigger it: shares and investment funds with a combined value exceeding €4 million, or a holding exceeding 25% of a company worth more than €1 million.
The gain is calculated as if you sold all qualifying assets on the day you ceased Spanish tax residency. You owe tax on paper gains you have not realized.
Payment can be deferred if you relocate to an EU or EEA country, with the tax becoming payable only when you actually dispose of the assets. Relocation to a non-EU country (including the US, UK post-Brexit, or UAE) triggers immediate payment.
For a FATFIRE individual with a €10M equity portfolio built up during Spanish residency, the exit tax could represent a seven-figure liability on departure. Multi-year advance planning is required. Options include gifting assets before departure, restructuring holdings, or timing the relocation to coincide with a year of realized losses that can offset the deemed gain.
This is not a theoretical concern. It is one of the primary reasons high-net-worth individuals who want to leave Spain for a lower-tax jurisdiction should begin planning three to five years before their intended departure date.
For context on countries offering capital gains tax advantages, the exit tax liability can significantly reduce the net benefit of relocating to a zero-capital-gains jurisdiction if the planning is not done well in advance.
Reporting, Filing, and Deadlines
For Spanish tax residents, capital gains are reported as part of the annual IRPF return (Modelo 100), due by June 30 of the year following the gain. The filing window typically opens in April.
Non-residents file Modelo 210 for each taxable event. For real estate sales, the filing deadline is four months from the date of the sale. The 3% withholding remitted by the buyer at closing is credited against the final liability calculated on Modelo 210.
Documentation requirements for property transactions include the original purchase deed (escritura), evidence of all acquisition costs and improvements, the sale deed, and documentation of all deductible sale expenses. For equity sales, brokerage statements showing acquisition dates, prices, and sale proceeds are required.
Penalties for late filing start at 5% of the unpaid tax for delays under three months and escalate to 20% for delays exceeding twelve months, plus interest. The Agencia Tributaria has significantly increased cross-border information sharing under the Common Reporting Standard (CRS) and FATCA, so non-reporting of Spanish-source gains by non-residents carries real detection risk.
References
- Agencia Tributaria -- "Impuesto sobre la Renta de las Personas Físicas (IRPF) -- Ganancias y Pérdidas Patrimoniales" (2024)
- Agencia Tributaria -- "Impuesto sobre la Renta de No Residentes (IRNR) -- Modelo 210" (2024)
- OECD -- "Model Tax Convention on Income and on Capital (Full Version)" (2017)
- European Commission -- "Taxation Trends in the European Union -- Data for EU Member States, Iceland and Norway" (2023)
- Boletín Oficial del Estado (BOE) -- "Ley 35/2006, de 28 de noviembre, del Impuesto sobre la Renta de las Personas Físicas" (2006)
- Boletín Oficial del Estado (BOE) -- "Ley 19/1991, de 6 de junio, del Impuesto sobre el Patrimonio" (1991)
- Dirección General de Tributos (DGT) -- "Consultas Vinculantes sobre Criptomonedas e IRPF" (2023)
- Boletín Oficial del Estado (BOE) -- "Ley 11/2021, de 9 de julio, de medidas de prevención y lucha contra el fraude fiscal" (2021)
