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.
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:
That list isn't closed, and assets used in a business follow their own rules. Three things work differently:
Rates for gains made in 2025 and 2026:
| Savings income for the year | Rate |
|---|---|
| Up to €6,000 | 19% |
| €6,000 to €50,000 | 21% |
| €50,000 to €200,000 | 23% |
| €200,000 to €300,000 | 27% |
| Over €300,000 | 30% |
| Non-residents, any amount | 19% |
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.
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%.
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.
You're tax resident in Spain for a calendar year if either of these applies:
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:
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.
The basic formula: gain (or loss) = sale value minus purchase value.
Shares and fund units have specific valuation rules. Three situations also change the numbers:
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.
| Resident | Non-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 buyer | None | €9,000 (3% of €300,000) |
| Where it's settled | Annual 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.
If you're resident, losses from sales are offset in this 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.
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).
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:
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.
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.
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:
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.
Selling Spanish property as a non-resident takes two steps and two forms:
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.
The flat 19% also applies to Spanish shares and fund units, sale by sale. Modelo 210 for these gains is due:
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:
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.
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:
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).
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 asset | Boxes in the 2025 return |
|---|---|
| Investment funds | Block from box 0310 (totals in 0324 and 0325) |
| Listed shares | Block from box 0326 (total sale value in 0328; totals in 0339 and 0340) |
| Subscription rights | Block from box 0341 |
| Cryptocurrencies | Boxes 1800 to 1814 |
| Property | Block from box 1815 (main home reinvestment exemption in 1835; 50% exemption for 2012 purchases in 1641) |
| Other assets | Block from box 1624 |
Some funds not subject to withholding go in their own block (boxes 2224 to 2236).
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:
In general, if you paid tax abroad on a gain you also declare here, you subtract the lower of these two amounts:
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.
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.
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.
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.