Capital Gains Tax in Spain: Rates, Exemptions and How to Declare It

How Spain taxes the profit from selling property, shares or other assets: rates, exemptions and how to declare it, whether you're resident or not.

Updated on:
October 31, 2026
TL;DR

Capital gains tax in Spain is the income tax you pay on the profit from selling an asset. Residents pay 19% to 30% by bands (2025 and 2026) and declare it in modelo 100. Non-residents pay a flat 19% through modelo 210, though some gains on shares are exempt. On property, the buyer withholds 3% of the price. Residents' main exemptions: reinvesting in a new main home and, over 65, selling their main home.

Sold a flat, some shares or your crypto and wondering how much the Agencia Tributaria (AEAT), Spain's Tax Agency, will take? Short answer on capital gains tax in Spain: if you're tax resident here, the gain goes into the savings part of your income tax (IRPF), taxed by bands from 19% to 30%. If you're not, you pay a flat 19% of non-resident income tax (IRNR) on Spanish gains, although some gains on shares are exempt.

Residents declare it in their annual return, modelo 100. Non-residents declare it in modelo 210. One caveat: in the Basque Country and Navarre, income tax is regional (foral), with its own rules not covered here.

Table of contents:

What counts as a capital gain in Spain

Spain has no separate capital gains tax. A gain is a ganancia patrimonial: the change in the value of your assets that shows up when their composition changes, typically when you sell something. It's taxed in IRPF if you're tax resident in Spain, or in IRNR if you're not.

Gains and losses come, among other things, from selling:

  • Property, such as a flat or a house.
  • Shares, listed or unlisted.
  • Investment funds, including redeeming your units.
  • Cryptocurrencies, sold or swapped as a private individual. Here's how crypto gains are taxed in Spain.

That list isn't closed, and assets used in a business follow their own rules. Three things work differently:

  • Dividends and interest aren't gains but investment income (rendimientos del capital mobiliario). They still add up in the same savings base as your gains from sales.
  • Gains that don't come from a transfer, such as an asset that comes into your hands without any sale behind it, are taxed with your general income, such as a salary, at the general rates.
  • Inheritance: passing assets to the heirs on death creates no gain in the deceased's income tax. A gift made during your lifetime, though, can create a gain for the giver.

Capital gains tax rates in Spain for 2025 and 2026

Rates for gains made in 2025 and 2026:

Savings income for the yearRate
Up to €6,00019%
€6,000 to €50,00021%
€50,000 to €200,00023%
€200,000 to €300,00027%
Over €300,00030%
Non-residents, any amount19%

The resident scale is progressive by portions: each rate applies only to the slice of income in its band, so nobody pays 30% on their whole gain.

📌 Example: your only savings income in 2026 is a €10,000 gain, and your salary already uses up your personal allowance. You pay 19% on the first €6,000 (€1,140) and 21% on the other €4,000 (€840): €1,980, an average rate of 19.8%. A non-resident would pay €1,900.

Tax residents: the savings income scale

As a resident, your gains from sales go into the base del ahorro (savings base). The scale applies not sale by sale but to your whole savings base for the year: all your gains and losses from sales plus your dividends and interest, once offset.

Each rate adds a state and a regional part with identical rates (9.5%, 10.5%, 11.5%, 13.5% and 15% each, since 2025). Regions can't change the savings rates, unlike the general ones, so where you live in Spain doesn't change your rate, except in the Basque Country and Navarre.

There's no tax-free amount of gain each year. What's taxed is the savings base above your personal and family allowance (mínimo personal y familiar). In the state part, that allowance is €5,550 a year in general, €1,150 more if you're over 65 and another €1,400 if you're over 75. Regions can adjust their part by up to 10%.

The allowance goes first against your general income, such as a salary. Only the part your general income can't absorb is applied to your savings base, and that part of the gain pays nothing.

Checking an older sale? For 2023 and 2024 gains, the top band was 28%.

Non-residents: a flat rate on gains

If you're not resident and have no permanent establishment (such as an office or other place of business) in Spain, you pay a flat 19% on the gain from selling an asset here, whether you live in the EU or outside it, the UK included. Some gains on shares and fund units are exempt, and a UK resident's gains on ordinary shares are taxed only in the UK (more on both below).

Don't confuse it with 24%: that's the general IRNR rate for income with no specific rate (19% for residents of the EU or of an EEA country with effective exchange of tax information), not the rate for gains.

There's no annual return adding everything up: each gain is taxed separately, with, in general, the same calculation rules as for residents. One difference: splitting up an asset you co-own isn't treated as a change in your assets for residents, but it is for non-residents, so it can produce a taxable gain.

Resident or non-resident: which rules apply to you

You're tax resident in Spain for a calendar year if either of these applies:

  • You spend more than 183 days in Spain in the year. Sporadic absences count unless you prove tax residence in another country.
  • The main centre or base of your business or economic interests is in Spain, directly or indirectly.

Spain also presumes you're resident, unless you prove otherwise, if your spouse (not legally separated) and dependent children under 18 live here habitually. More on how to know if you are a tax resident in Spain.

What it changes:

  • Resident: IRPF on your gains from anywhere in the world, such as a house sold in the UK or shares sold through a foreign broker.
  • Non-resident: IRNR only on Spanish-source gains: property in Spain (also through shares in companies whose assets are mainly Spanish property, or through shares or rights that give you the use of Spanish property), securities issued by Spanish residents and other assets located here. Selling a house you own abroad isn't taxed in Spain.

Opted for the special regime for people who move to Spain, known as the Beckham Law? You're taxed under non-resident rules: only on income obtained in Spain (all your work income, and income from an entrepreneurial activity, counts as such), with no offsetting between incomes, and gains from sales go on a scale from 19% to 30% (2025 and 2026).

The Basque Country and Navarre have their own (foral) income tax, and the Canary Islands, Ceuta and Melilla some special rules.

How to calculate your capital gain

The basic formula: gain (or loss) = sale value minus purchase value.

  • Purchase value (valor de adquisición): the price you paid plus improvements and the purchase costs and taxes you paid yourself, such as notary, land registry, transfer tax (ITP) or VAT and commissions. Mortgage interest doesn't count, nor do repairs and upkeep, which the Agencia Tributaria doesn't treat as improvements.
  • Sale value (valor de transmisión): the sale price minus the selling costs and taxes you paid. If the agreed price is below normal market value, market value is used.

Shares and fund units have specific valuation rules. Three situations also change the numbers:

  • Property you rented out: the purchase value goes down by the deductible depreciation (amortización) and, at least, by the minimum depreciation, even if you never claimed it. According to the Agencia Tributaria, for a let property that minimum is 3% a year of the higher of the purchase cost and the cadastral value, excluding the land.
  • Inherited or gifted assets: your purchase value is the Inheritance and Gift Tax value, capped at market value, plus that acquisition's costs and taxes. There are two exceptions. If you received the asset through a succession pact with immediate effect (pacto sucesorio) and sell it within five years of the pact, or of the death if that comes first, you take on the previous owner's purchase value and date when that value is lower. And if you received as a gift a business or shares that the law treats as creating no gain for the giver, you take on the giver's values and dates.
  • Shares or fund units bought at different times: when you sell part of a holding of identical (homogeneous) securities, the oldest ones are treated as sold first (FIFO).

Worked example: the same sale as a resident and as a non-resident

A flat sold in 2026 that wasn't the seller's main home and was never let. It cost €200,000 plus €20,000 in purchase costs and taxes and sold for €300,000, with €10,000 of selling costs. The seller has no other savings income.

ResidentNon-resident
Purchase value€220,000€220,000
Sale value€290,000€290,000
Gain€70,000€70,000
How it's taxed€6,000 at 19% (€1,140) + €44,000 at 21% (€9,240) + €20,000 at 23% (€4,600)19% of the whole gain
Tax€14,980€13,300
3% withheld by the buyerNone€9,000 (3% of €300,000)
Where it's settledAnnual return (modelo 100)Modelo 210: €4,300 still to pay

The resident pays more here because every slice of the gain above €6,000 is taxed at more than 19%. With a €20,000 gain, the non-resident would owe €3,800 and would claim back €5,200 through modelo 210.

It assumes the general rules (not the Basque Country or Navarre) and that the resident's other income uses up their allowance.

Offsetting capital losses

If you're resident, losses from sales are offset in this order:

  1. First, they're offset against your gains from sales in the same year.
  2. If a loss remains, it's offset against your net dividends and interest for the year, up to 25% of that net amount.
  3. Anything still left carries forward to the next four years, in the same order.

A net negative from dividends and interest works the same way against your gains, up to 25%. Offsetting isn't optional: each year you use as much as that year allows, and losses never reduce the tax on your salary.

⚠️ Sold at a loss and bought back? The loss is put on hold if you buy homogeneous listed securities in the two months before or after the sale (the year before or after for unlisted ones), or buy back any other asset you sold (a property or the same cryptocurrency, for example) within the following year. It counts when you sell what you bought.

Some losses never count: those you can't justify, those due to consumption (used personal belongings sold for less) and those from lifetime gifts.

Capital gains tax exemptions and reductions

The law lets you pay less, or nothing, in several cases, and not all of them reach non-residents. Besides the main ones below, one is easy to miss: urban property acquired between 12 May and 31 December 2012. Its gain is 50% exempt, for residents and non-residents, unless you acquired it from, or sell it to, your spouse, a relative up to the second degree or a related company. For residents, it must have been bought for a price (not inherited or gifted).

Reinvesting in a new main home

If you sell your main home (vivienda habitual) and reinvest the total amount obtained in another main home, the gain is exempt. If you reinvest only part, the exemption is proportional. The rules:

  • Two years: you have two years after the sale to buy, and a home bought in the two years before it also counts.
  • Mortgage: what you must reinvest is the sale value minus the loan principal outstanding when you sell.
  • Paperwork: if you don't reinvest in the year of the sale, state in that year's return that you intend to. If you then don't, file a supplementary return (complementaria) for the year of the sale, with late-payment interest, by the end of the filing period for the year in which you fail to meet the condition.

Your main home is where you've lived for at least three years in a row (less if a justified reason, such as death, marriage, separation or a job transfer or change, forced you to move), having moved in within twelve months of buying it. It counts if it was your main home when you sell or at any time in the two years before.

Non-residents living in another EU country or an EEA country with effective exchange of tax information (according to the Agencia Tributaria: Iceland, Norway and, since 11 July 2021, Liechtenstein) can also use this exemption for what was their main home in Spain, as long as it still counted as their main home when they sold it or at some point in the two years before. The buyer still withholds 3% and you still file modelo 210, attaching a tax residence certificate from your country's tax authorities (valid for one year): a reinvestment made by then counts, and if you reinvest later, you claim a refund. It doesn't reach residents of countries outside the EU and the EEA, such as the UK.

Over 65: selling your main home or buying a life annuity

If you're a Spanish tax resident over 65, or with severe or major dependency, the gain from selling your main home is exempt with no need to reinvest. It doesn't cover a second home or any other asset.

For other assets, residents over 65 have another route: the gain is exempt if, within six months, you put the total amount obtained into a life annuity (renta vitalicia) in your favour. Here dependency doesn't replace the age.

  • The most you can put in, adding up all your reinvestments, is €240,000: a limit on the money reinvested, not on the gain. Put in less than you obtained and the exemption is proportional.
  • The annuity is taken out with an insurer, paid at least yearly, starts within a year and can't fall by more than 5% from one year to the next. Tell the insurer it's a reinvestment and, if you set it up in the year after the sale, state in the return for the year of the sale that you intend to.
  • Cash it in early, or break any of these conditions, and the gain becomes taxable: file a supplementary return for the year of the sale, with late-payment interest, by the end of the filing period for the year in which it happens.

Assets bought before 31 December 1994

Selling an asset not used in a business that you bought before 31 December 1994? You can reduce the part of the gain generated up to 19 January 2006, split in proportion to the days, with the reduction coefficients (coeficientes de abatimiento). They apply for each year of ownership beyond two, counting up to 31 December 1996 and rounding up:

  • Property, rights over it and shares in companies at least half of whose assets are Spanish property (except real estate investment companies and funds): 11.11% a year.
  • Listed shares: 25% a year, except shares of investment companies (Sociedades de Inversión Mobiliaria e Inmobiliaria), which go at 14.28%.
  • Other assets: 14.28% a year.

For listed shares and funds, the pre-2006 part of the gain is worked out with their 2005 Wealth Tax value. The catch: it only applies while the sale values of everything sold under this regime since 1 January 2015 add up to less than €400,000. Beyond that, the reduction shrinks or disappears. Non-residents can use it too.

Non-residents selling property in Spain: the 3% withholding and Form 210

Selling Spanish property as a non-resident takes two steps and two forms:

  1. The buyer withholds 3% of the agreed price, resident or not, and pays it in with modelo 211 within one month of the sale, as a payment on account of your tax (not your final tax). They give you a copy, so you can subtract it when you file.
  2. You file modelo 210 (Form 210, the non-resident income tax return) within the three months after the buyer's one-month deadline, so up to four months after the sale, whatever the result: gain, loss or refund. You subtract the 3%: if your tax is lower, you claim back the excess; if higher, you pay the difference.

If the property is in the Basque Country or Navarre, the tax on the gain is collected by that territory's own tax authority (the Diputación Foral in the Basque Country, the Comunidad Foral de Navarra in Navarre) under its own rules, which also set where, how and when you file.

Non-residents selling Spanish shares or funds

The flat 19% also applies to Spanish shares and fund units, sale by sale. Modelo 210 for these gains is due:

  • With tax to pay: in the first 20 calendar days of April, July, October or January, for the previous quarter's sales.
  • With a zero result: from 1 to 20 January of the following year.
  • With a refund: from 1 February of the following year, within four years.

If tax was already withheld on the gain, you don't have to file for it, except for a fund redemption where the withholding was lower than your tax.

Two exemptions take the tax to zero for some sellers:

  • You live in another EU country, or an EEA country with effective exchange of tax information, and have no permanent establishment in Spain: gains on shares and other movable assets aren't taxed. There are two exceptions: shares in companies whose assets are mainly Spanish property, and holding at least 25% of the company at any time in the 12 months before the sale.
  • Your country's double taxation treaty with Spain has an information exchange clause and you sell the securities, or redeem the fund units, on an official Spanish secondary market.

Neither applies to gains obtained through a tax haven. If you live in the UK, the treaty between Spain and the UK applies: gains on assets other than property, such as ordinary shares, are taxed only in the UK. The exceptions are shares that aren't regularly traded on a stock exchange and get more than 50% of their value from Spanish property, and shares or other rights that give you the use of Spanish property.

If you apply any of these exemptions, or the treaty, in modelo 210, attach a tax residence certificate issued by your country's tax authorities, valid for one year. For a treaty, it must state that you're resident within the meaning of that treaty.

How to declare capital gains as a Spanish tax resident

Residents declare gains and losses in their annual income tax return, modelo 100, for the year of the sale: a 2026 sale goes in Renta 2026. Inside the return, they go in section F2 (gains and losses from transfers of assets), under the heading for each type of asset. More on filing your tax return in Spain as a foreigner.

Do you have to file? Yes, unless all your income fits the limits in the law, for example:

  • Work income up to €22,000 (less in some cases, such as having more than one payer), plus investment income and gains subject to withholding up to €1,600 in total.
  • Income and gains of up to €1,000 in total, with losses under €500.

A gain outside those limits means you have to file. You also always file if you're entitled to the double taxation deduction or were registered as self-employed (RETA).

Where each gain goes in Renta WEB

In Renta WEB, the Agencia Tributaria's online tool, these are the section F2 boxes (casillas) of the 2025 return, filed in 2026. The 2026 form isn't approved yet and its numbering may change.

Type of assetBoxes in the 2025 return
Investment fundsBlock from box 0310 (totals in 0324 and 0325)
Listed sharesBlock from box 0326 (total sale value in 0328; totals in 0339 and 0340)
Subscription rightsBlock from box 0341
CryptocurrenciesBoxes 1800 to 1814
PropertyBlock from box 1815 (main home reinvestment exemption in 1835; 50% exemption for 2012 purchases in 1641)
Other assetsBlock from box 1624

Some funds not subject to withholding go in their own block (boxes 2224 to 2236).

Gains on assets outside Spain and double taxation

As a Spanish resident, you also declare what you sell abroad, such as a house in the UK or shares with a foreign broker, unless you opted for the Beckham Law. Here's how to report the sale of foreign shares.

The other country may tax the gain too: it depends on its treaty with Spain, and each treaty is different. With the UK:

  • Property in the UK: the UK can tax the gain, as the treaty lets the country where the property is located tax it. You still declare it in Spain, which lets you subtract the UK tax up to the part of the Spanish tax that corresponds to that gain. Keep proof of what you paid.
  • Shares and other assets that aren't property: taxed only in Spain, where you live. The exceptions are shares that aren't regularly traded on a stock exchange and get more than 50% of their value from UK property, and shares or other rights that give you the use of UK property.

In general, if you paid tax abroad on a gain you also declare here, you subtract the lower of these two amounts:

  • The tax you actually paid abroad, if it's identical or similar to income tax.
  • What you get by applying your average effective savings rate to the part of your income taxed abroad.

Being entitled to this deduction means you must file a return. More on declaring foreign income in Spain.

📌 Modelo 720 is an information return on assets held abroad (bank accounts, securities, insurance and property). It's not a tax on your gain, which goes in your income tax return. But if the asset you sold was one you had to report in modelo 720, the sale must also be reported in modelo 720 for that year, between 1 January and 31 March of the following year.

Common mistakes with capital gains tax in Spain

  • Applying 24% to a non-resident's gain. When Spain taxes them, gains from sales pay 19% for every non-resident, EU or not. The 24% is the general rate for other income.
  • Forgetting costs and improvements. They reduce your gain, so leaving them out means paying tax on more than you made.
  • Not subtracting depreciation on a property you let. At least the minimum comes off the purchase value, claimed or not.
  • Not claiming back excess withholding. If the 3% is more than your tax, the difference only comes back if you claim it in modelo 210.
  • Filing late. Without a prior request from the tax authorities, a late modelo 210 or income tax return costs a surcharge of 1%, plus 1% for each full month of delay, on the amount due. After 12 months, it's 15%, plus late-payment interest from then on. If there's nothing to pay, filing late can still bring a fixed fine: €100 if you file before the tax authorities ask you, €200 otherwise.
  • Buying back right after a loss. Repurchase homogeneous listed securities in the two months before or after the sale, or buy back any other asset you sold, crypto included, within the following year, and the loss waits until you sell what you bought.

Capital gains tax is not the plusvalía municipal

Selling urban property can also bring a town hall bill: the plusvalía municipal (Impuesto sobre el Incremento de Valor de los Terrenos de Naturaleza Urbana), a separate local tax on the increase in value of urban land when it changes hands. You may owe it on top of IRPF or IRNR. The seller pays it, but if the seller is a non-resident individual, the buyer pays it as substitute. Councils can choose whether to charge it.

Frequently asked questions

Do you pay capital gains tax in Spain if you are over 65?
Not on your main home, if you're a Spanish tax resident over 65: the gain from selling it is exempt with no need to reinvest, and the same applies to people in a situation of severe or major dependency. As a general rule, it must have been your main home, usually one you've lived in for at least three years, when you sell or at some point in the two years before. On other assets, such as a second home or shares, age alone doesn't exempt the gain, but putting the total amount obtained into a life annuity in your favour within six months does, up to €240,000 across all your reinvestments.
How can you legally avoid or reduce capital gains tax in Spain?
If you're tax resident in Spain, these are the main legal ways: include every purchase and sale cost and the improvements you made, which reduce your gain; offset losses against gains, carrying any leftover forward for four years; reinvest what you get for your main home in a new main home within two years; if you're over 65, sell your main home exempt or put the proceeds from other assets into a life annuity within six months, up to €240,000; and, for assets bought before 31 December 1994, apply the reduction coefficients to the part of the gain up to 19 January 2006. Each one has its own conditions, so check them before you sell.
At what point do you start paying capital gains tax in Spain?
Spanish law sets no tax-free amount of gain each year, so in principle you pay from the first euro. As a resident, the first €6,000 of your savings income is taxed at 19% and the rest at higher rates: a €10,000 gain as your only savings income in 2026 costs €1,980 if your salary or other income already uses up your personal allowance. The only cushion is your personal allowance (generally €5,550 in the state part): if your other income doesn't use it all, the rest covers part of the gain. Non-residents pay a flat 19% on each Spanish gain, although some gains on shares are exempt. Whether you must file a return depends on all your income, but a gain outside the limits in the law obliges you to file.
Do I pay capital gains tax in Spain if I sell a property in the UK?
If you're tax resident in Spain, yes: you declare gains from anywhere in the world, so the sale goes in your Spanish return (unless you opted for the Beckham Law, which only taxes income obtained in Spain). The UK can tax it as well, because the treaty between Spain and the UK lets the country where the property is located tax the gain. Spain then lets you subtract the UK tax paid, up to the part of the Spanish tax that corresponds to that gain, and being entitled to that deduction obliges you to file a return. If you're not resident in Spain, Spain doesn't tax the sale of a house you own outside Spain.

Selling in Spain? What to remember

  • Residents pay 19% to 30% by bands on savings income and declare gains in modelo 100.
  • Non-residents pay a flat 19% on Spanish gains (some gains on shares are exempt). On property, the buyer withholds 3% and you file modelo 210 within four months.
  • Exemptions and reductions for your main home, over-65s and assets bought before 31 December 1994 can cut or remove the tax if you meet their conditions.
  • Costs, improvements and losses lower your gain, and late filing adds surcharges.

Whether you live in Spain or abroad, we can help you declare your sale: see our tax return service for foreigners living in Spain or our service for non-residents, which guides you through modelo 210. Start for free with TaxDown.

Official sources

Author
TaxDown Team
Your tax return, done right
Follow me here
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

TaxDown is the Spanish platform that helps you file your income tax return easily, quickly and with maximum savings. It's a social collaborator of the Agencia Tributaria (Spanish Tax Agency) and has more than 300 expert tax advisors who review every return.

Related articles

Download our app

File your tax return from wherever you are.

QR code to download the TaxDown app
Person using their mobile phone to file their tax return
Foreigners in Spain
Tax registration from 35€.
See my case