Capital gains tax in Spain: what you really pay, and how to pay less legally

Spain taxes capital gains at 19% to 30% in 2026, with no holding-period relief. See rates for shares, crypto and property, and legal ways to pay less.
Capital gains tax in Spain: what you really pay, and how to pay less legally

Quick answer

In 2026, Spanish residents pay capital gains tax on a progressive savings scale: 19% up to €6,000, then 21%, 23%, 27% and 30% above €300,000. Shares, funds, crypto and property are all taxed this way, with no reduced rate for long holdings. Non-residents pay a flat 19% on Spanish gains.

Last reviewed: November 2026 · Reviewed by Stéphane Gombauld, tax expert, technologist and digital nomad

Heavnn

Optimize your tax position and get up to 100% tax savings

Discover legal tax optimization opportunities for location-independent workers and online businesses.*

* Potential savings depend on your tax residency, income structure, and eligibility under applicable tax laws.

Get my FREE digital interview 📝

You live in Spain, or plan to, and you hold ETFs, crypto or a flat somewhere. Spain taxes the profit when you sell, and the bill can climb fast. After reading this, you'll know what you really pay in 2026 and the legal ways to pay less.

Spain capital gains tax in 2026: the key figures

Item Figure for tax year 2026
Residents: savings scale 19% up to €6,000 · 21% to €50,000 · 23% to €200,000 · 27% to €300,000 · 30% above
Holding period relief None – a gain after 10 days and after 10 years is taxed the same
Non-residents 19% flat on Spanish-source gains
Property sold by a non-resident Buyer withholds 3% of the price as a payment on account
Selling your main home Exempt if you reinvest in a new main home within 2 years, or if you're 65+
Losses Offset against gains, then up to 25% of other savings income; carry forward 4 years
Exit tax Shares worth over €4m (or over €1m with a 25%+ stake) after 10 of the last 15 years resident
Foreign assets reporting Forms 720 (accounts, securities, property) and 721 (crypto) above €50,000

Is this guide for you?

Read on if you…

  • are tax resident in Spain and sell shares, funds, crypto or property;
  • are moving to Spain and want to know what happens to gains you already have;
  • are leaving Spain and worry about the exit tax.

Probably not your case if you…

  • only earn a salary and hold no investments;
  • trade so actively that your activity counts as a business – that's taxed as self-employment income, not as gains.

How does Spain tax capital gains?

Spain taxes residents on worldwide income through IRPF, the personal income tax. Your income is split into two boxes. The general base holds salary and freelance income, taxed at up to about 47% or more, depending on your region. The savings base (base del ahorro) holds dividends, interest and gains from selling assets.

Gains from selling an asset go into the savings base. They're taxed on their own progressive scale, separate from your salary. That's the good news: a big gain doesn't push your salary into a higher bracket.

The gain is simple to compute:

  1. Take the sale price, minus selling costs (broker fees, notary, agent).
  2. Subtract the purchase price, plus buying costs and, for property, improvements.
  3. For rented property, also subtract the depreciation you deducted over the years – it's added back.

Spain doesn't adjust for inflation any more. One exception survives: assets bought before 31 December 1994 can get a partial reduction on gains built up until January 2006, capped at a total of €400,000 of sale value over your lifetime.

Not sure if you're resident? Check the tax residency criteria in Spain first.

How much do you pay on each type of asset?

Here's the catch with Spain. The rate depends on the size of your total savings income for the year, not on the asset or how long you held it.

Asset How the gain is taxed (residents) Key rule
Listed shares and ETFs Savings scale, 19%–30% FIFO: oldest shares are treated as sold first
Investment funds (mutual funds) Savings scale, 19%–30% Switching between funds (traspaso) is tax-deferred
Crypto Savings scale, 19%–30% Crypto-to-crypto swaps are taxable disposals
Property Savings scale, 19%–30%, plus municipal plusvalía Main home reinvestment exemption
Unlisted company shares Savings scale, 19%–30% Minimum value rules apply to the price

Shares and ETFs

You pay tax when you sell. Spain uses FIFO – first in, first out – for identical securities.

Investment funds: the traspaso advantage

Good news for fund investors. You can move money from one investment fund to another without paying tax. The gain is deferred until you finally cash out. This works for Spanish funds and many foreign funds registered with the CNMV, the Spanish securities regulator. Most ETFs don't qualify.

Crypto

Spain treats crypto as an asset like any other. Selling for euros, paying with crypto, or swapping one coin for another all trigger a gain or loss. Staking and lending rewards are generally investment income, also in the savings base. Our guide to cryptocurrency taxation in Spain covers DeFi, mining and Form 721.

Property

Selling a flat triggers two taxes. IRPF on the gain, and the municipal plusvalía – a local tax on the increase in land value, paid by the seller. If you rented the property out, the depreciation you deducted is added back, so the gain is higher.

Can you pay less capital gains tax in Spain, legally?

Yes. Honestly? Most savings come from timing and good records, not from clever structures.

  1. Harvest your losses. Sell losing positions in the same year as winners. Losses offset gains first, then up to 25% of your dividends and interest.
  2. Mind the wash-sale rule. If you rebuy the same listed security within 2 months (1 year for unlisted), the loss is frozen until you sell the new shares.
  3. Spread big sales. The scale is progressive. Splitting a large sale across two tax years can keep more of it in the lower bands.
  4. Use fund switches. Rebalance through traspasos instead of selling.
  5. Reinvest in your main home. Gains on your main home are exempt if you buy a new main home within 2 years.
  6. Use the 65+ rules. From 65, selling your main home is exempt. Gains on other assets up to €240,000 are exempt if reinvested in a lifetime annuity within 6 months.
  7. Keep every receipt. Notary fees, purchase taxes and improvements raise your cost base. No invoice, no deduction.

One more point. Gains on assets you hold at death aren't taxed in IRPF – your heirs pay inheritance tax instead. Gifts during your life are different: the donor pays tax on the gain, and the recipient pays gift tax.

Residents vs non-residents: who pays what?

Residents Non-residents
What's taxed Worldwide gains Spanish-source gains only
Rate 19%–30% savings scale 19% flat (IRNR, non-resident income tax)
Losses Offset across the year Each gain taxed on its own
Main home exemption Yes Limited; EU/EEA residents may claim reinvestment relief
Property sale Reported in the annual return 3% withheld by the buyer, Form 210 within 3 months after the 1-month withholding deadline

Non-residents in a treaty country often escape Spanish tax on listed share gains. Spain's domestic law also exempts gains on shares sold on Spanish official markets by residents of treaty countries with an information-exchange clause. Check your treaty in Spain's tax treaties.

Moving to Spain on the Beckham regime? Under that regime, gains on foreign assets aren't taxed in Spain. See tax breaks for expats and digital nomads in Spain.

What happens to your gains when you leave Spain?

Spain has an exit tax – a tax on gains you haven't realised yet, charged when you stop being resident. It only bites if both apply:

  1. you were Spanish resident for at least 10 of the last 15 years; and
  2. your shares and fund units are worth more than €4 million, or more than €1 million in a company where you hold over 25%.

The unrealised gain is taxed in your last year of residence. Moves within the EU/EEA can usually be deferred, as long as you report on time.

Also watch the 4-year rule. Spanish nationals who move to a tax haven on Spain's list stay Spanish tax resident for the year of the move and the next 4 years. Planning your departure? Read the practical guide to ceasing your tax residency in Spain.

Example – Lucas, French developer living in Madrid

In 2026 Lucas sells ETFs with a €38,000 gain and Bitcoin with a €12,000 gain. That's €50,000 of gains. Tax: 19% on €6,000 (€1,140) plus 21% on €44,000 (€9,240) – €10,380 in total. He also holds a tech stock showing a €5,000 loss. He sells it in December and doesn't rebuy for 2 months. Taxable gains drop to €45,000 and his tax to €9,330. Same portfolio risk, €1,050 saved.

Lucas saved €1,050 with one sale. What's in your portfolio?

Find my savings: we'll check your gains, losses and timing before you sell.

Find my savings →

Common mistakes (and what they cost)

  • Treating crypto swaps as tax-free → every swap is a disposal; missed gains bring back tax, late-payment interest and penalties from 50% of the unpaid amount.
  • Skipping Forms 720 or 721 → fixed penalties per missing item and an easier audit trail against you.
  • Rebuying within 2 months to "realise" a loss → the loss is frozen, and your expected tax saving disappears.
  • Forgetting depreciation on a rented flat → the gain is understated, which leads to a reassessment with interest.
  • Selling property as a non-resident without filing Form 210 → you lose the chance to reclaim excess withholding, and Spain can pursue the shortfall.

Frequently asked questions

What is the capital gains tax rate in Spain in 2026?

Residents pay 19% on the first €6,000 of savings income, 21% up to €50,000, 23% up to €200,000, 27% up to €300,000 and 30% above. Savings income includes gains, dividends and interest, all added together. Non-residents pay a flat 19% on Spanish-source gains. No reduced rate applies for holding an asset longer.

Is there a holding period that makes gains tax-free in Spain?

No. Spain has no holding period exemption for shares, funds, crypto or property. A gain made after one week is taxed the same as one made after twenty years. The only time-based relief left is the partial reduction for assets bought before 1995, and that's capped at €400,000 of total sale value.

Do I pay tax on crypto-to-crypto swaps in Spain?

Yes. The Spanish tax authority treats swapping one cryptocurrency for another as a disposal. You calculate the gain or loss in euros at the time of the swap. The gain goes into the savings base, taxed at 19% to 30%. You also report crypto held abroad on Form 721 if it exceeds €50,000.

How is selling my home taxed in Spain?

The gain is taxed in the savings base. If it was your main home, the gain is exempt when you reinvest the proceeds in a new main home within two years. If you're 65 or older, selling your main home is exempt with no reinvestment needed. The municipal plusvalía may still apply.

How do non-residents pay capital gains tax in Spain?

Non-residents pay 19% on gains from Spanish assets through IRNR, the non-resident income tax. When you sell Spanish property, the buyer withholds 3% of the price and pays it to the tax authority. You then file Form 210 to settle the real tax or claim a refund. A treaty may reduce the tax.

Can I offset capital losses in Spain?

Yes. Losses first offset gains in the same year. Any remaining loss can offset up to 25% of your positive investment income, such as dividends and interest. Whatever's left carries forward for four years. Losses aren't allowed if you rebuy the same listed security within two months.

Sources

This guide is general information, not personalised tax advice. See how we research and review.

Selling something big in Spain this year?

Find my savings before the sale, not after the tax bill arrives.

Start with Heavnn →
About the author
Heavnn

Heavnn

Heavnn is a borderless tax technology solution supporting the future of work. We assist international remote workers with the design and implementation of their global tax setups.

Welcome to Heavnn University!

Access all of our learning resources, blogs, and articles for digital nomads, remote workers, and distributed teams right here on Heavnn University. For more tailored advice, take our digital interview below!

Design Your Global Remote Setup
Heavnn University

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to Heavnn University.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.