Something that both residents and non-residents in Spain must once during their life in the country. The capital gains tax in Spain is one of the main taxes you will need to pay after obtaining a profit from an economic transaction. In this article, we are going to learn how does this tax work, which are the exact percentages to be paid, and how can you benefit from the existing bonifications and exemptions. Are you ready?

Key takeaways

  • What it is: the tax on the profit when you sell an asset such as a property, land, shares or funds, paid through IRPF if you are resident or IRNR if not.
  • Resident rates: 19% up to €6,000, 21% up to €50,000, 23% up to €200,000, 27% up to €300,000 and 30% above that, applied band by band to the gain.
  • Non-residents: a flat 19% on capital gains, whatever their nationality; when they sell a property, the buyer withholds 3% of the price and pays it with Modelo 211.
  • Main home: residents who reinvest the proceeds in a new main home within two years pay no tax; residents of EU or EEA countries can also use this exemption.
  • Over 65: residents aged 65 or over pay no tax on selling their main home, and other gains reinvested in a life annuity are exempt up to €240,000.
  • How to calculate: the gain is the sale price minus selling costs, less the purchase price plus purchase costs, taxes and documented improvements.

What is Capital Gains Tax in Spain?

The capital gains tax is the tax that is paid on the profits that you obtain once you sell any kind of asset like a property or land, or shares, funds or other investments. Whenever the sale value is greater than the acquisition value (what you paid plus the costs and taxes of buying), capital gains tax will be paid on that difference, the profit. 

So we are talking about one of the main taxes when selling your house in Spain. 

Unlike some countries like in the UK in which this tax works independently, in Spain we find it integrated within the personal income tax (IRPF) for residents, and within the non-resident income tax (IRNR) for non-residents.

Let’s use an example in order to better explain how this tax works. 

Imagine that you bought a property in Spain for €500,000. Now, after several years, you are planning to sell it. You find a buyer, and after some negotiations, you both accept that the sale price will be €700,000, as the Spanish real estate market has grown and properties are more expensive now. The resulting €200,000 that you earn is the taxable amount to which you will apply the capital gains tax rates (in practice the gain will be lower, because purchase and sale costs can be deducted).

As a Spanish tax resident you would pay €44,880; as a non-resident, €38,000. Here is why.

Capital Gains Tax rates in Spain for 2026

Capital Gains Tax rates for Spanish residents

Just as a reminder, you will be considered a tax resident in Spain if you stay in the country for more than 183 days per year (6 months), or if your main centre of business or economic interests is in Spain. You are also presumed to be resident if your spouse (not legally separated) and dependent minor children live in Spain. If another country also considers you resident, the double tax treaty between both countries decides.

In that sense, if you are considered a resident, the capital gains tax in Spain to be paid is calculated by bands, together with your other savings income (interest, dividends):

  • 19% for the first 6.000€ obtained as a profit
  • From 6.000€ to 50.000€, the tax percentage is 21%
  • From 50.000€ to 200.000€, a 23%
  • From 200.000€ to 300.000€, a 27%
  • Over 300.000€, a 30% (since 1 January 2025)

Only the part of the gain that falls within each band is taxed at that band’s rate. The Basque Country and Navarre apply their own scales.

Remember that these rates will be applied to the difference between the acquisition value of the property (or any other asset) and its sale value, both adjusted for costs (see the calculator section below).

Do you have any doubts so far? Ask our lawyers anything (or continue reading for more information):

I want to talk to a lawyer

Capital gains tax in Spain for non-residents

So far we have seen the situation for those staying in the country for more than 183 days per year. But what happens to the non-resident taxpayers in Spain with regard to this tax?

Non-residents pay a flat 19% on capital gains from selling assets located in Spain, whatever their nationality or country of residence. The 24% rate you may read elsewhere applies to other income of non-EU/EEA residents, such as rental income, not to capital gains. Going back to our example, a non-resident would pay €38,000 on the €200,000 gain, less than a resident.

Are there any reductions or exemptions for non-residents?

The answer is yes, but very few.

If you live in another EU or EEA country with effective exchange of tax information (including Iceland, Norway and Liechtenstein) and sell what your main home in Spain was, the gain is exempt if you reinvest the proceeds in a new main home within two years. You can apply the exemption in Modelo 210 or, if you reinvest later, claim back the 3% withheld with Modelo 228.

Non-residents cannot use the over-65 exemption, and residents of non-EU/EEA countries (including the UK and the US) cannot use the reinvestment exemption either. The pre-1995 reduction coefficients, on the other hand, do apply to non-residents.

Capital Gains Tax when selling property in Spain

Selling a property in Spain can involve three different obligations: capital gains tax on the profit, the 3% withholding if the seller is a non-resident, and the plusvalía municipal charged by the town hall.

The 3% withholding for non-resident sellers (Modelo 211 and Modelo 210)

When the seller is a non-resident, the buyer must withhold 3% of the agreed price, not of the gain, and pay it to the Spanish Tax Agency with Modelo 211 within one month of the sale. This is an advance payment on the seller’s tax, not the final tax. The seller then files Modelo 210 within the following three months to declare the actual gain and either pay the balance or claim a refund of the excess.

In our example, the buyer would withhold €21,000 (3% of €700,000). With a tax bill of €38,000, the seller would still have to pay €17,000. If you sell with no gain or at a loss, filing Modelo 210 is how you get the 3% back.

Plusvalía municipal: the local tax on property sales

Besides capital gains tax, the town hall charges the plusvalía municipal (IIVTNU) on the increase in value of the urban land. It applies to residents and non-residents alike and is normally paid by the seller. You can choose between an objective calculation, based on the cadastral value, and one based on the real gain, whichever is lower. If there was no real increase in value, no tax is due. The plusvalía you pay can be deducted when calculating your capital gain.

Costs you can deduct when selling a property

  • Purchase costs (added to the acquisition value): transfer tax (ITP) or VAT and stamp duty, notary, land registry and legal fees.
  • Improvements with invoices (added to the acquisition value). Routine maintenance and repairs do not count.
  • Sale costs (subtracted from the sale price): estate agent’s commission, notary and legal fees paid by the seller, and the plusvalía municipal.

If you rented the property out while you were resident, the depreciation you deducted reduces the acquisition value.

Capital Gains Tax exemptions and reductions in Spain

If you are wondering how to avoid capital gains tax in Spain, these are the legal options. There are several ways to reduce or eliminate it, most of them only available to Spanish tax residents. Let’s go over them briefly.

1. The main home reinvestment exemption

If you are a Spanish tax resident and the amount of money that you earn from the sale of your main home is reinvested into the purchase of a new one within two years before or after the sale, and you will use this new house or flat as your new home, you don’t need to pay capital gains tax. If you reinvest only part of the money, only the proportional part of the gain is exempt.

 This is what we call the main home exemption. 

Hence, what you need to consider here is that the property you are selling was your habitual residence, and the one you are acquiring will be too. As a rule, a home counts as your habitual residence when you have lived in it continuously for at least three years.

You must declare the sale and the exemption in your income tax return for the year of the sale.

2. Capital gains tax in Spain over 65 years

If you are a Spanish tax resident aged 65 years old or over and sell your main home, it does not matter if the amount of money you get will be reinvested or not. You won’t need to pay this tax.

Nevertheless, you must bear in mind that there is a crucial condition you must meet in order to benefit from the 65-year-old exemption. And that is that the property you are selling must be your habitual residence. In other words, a minimum of 3 years lived in the property before selling it is required in order to avoid paying capital gains tax, and it must still be your main home when you sell it or have been so within the previous two years. This exemption does not cover second homes or other assets, and it is not available to non-residents.

Over 65: reinvesting in a life annuity

If you are 65 or over and sell any other asset, a second home, shares or funds, the gain is exempt if you reinvest the proceeds, up to a maximum of €240,000, in a life annuity (renta vitalicia) for yourself within six months. If you reinvest less, the exemption is proportional.

3. Reduction on assets bought before 1995

If you bought the property you now want to sell before 1995, part of your gain can be reduced with the so-called reduction coefficients (coeficientes de abatimiento).

This means that all the properties and other assets that were acquired until 31 December 1994 are eligible for this reduction. Nevertheless, there are two things to consider:

  • The reduction only applies to the gains generated up to 19 January 2006. Any increase in the asset value afterwards won’t include the tax reduction and will be taxed at the normal rate.
  • Since 2015, it only applies while the combined sale value of all the assets you sell using it does not exceed €400,000 per person

Then, if the property or asset you want to sell meets these requirements, which is the exact reduction you will enjoy? 11.11% per year for properties, 25% per year for listed shares and 14.28% per year for all other assets, for each year of ownership beyond two, counted up to 31 December 1996.

What if you sell at a loss?

Spanish residents can offset a capital loss against other gains in the savings base and carry any remaining loss forward for four years. Non-residents cannot carry losses forward, but they should still file Modelo 210 to recover the 3% withheld.

I want to talk to a lawyer

What assets are subject to Capital Gains Tax?

As we have previously mentioned, properties are not the only assets subject to the capital gains tax. 

This tax applies mainly to:

  • Company shares and investment funds
  • Buildings
  • Lands
  • Flats and houses
  • Cryptoassets
  • Precious metals, art and other valuables.

Selling or redeeming bonds produces investment income rather than a capital gain, but it is taxed at the same 19%–30% savings rates.

Capital gains tax calculator Spain 

Would you like to easily compute your capital gains tax in Spain?

Then follow these four steps:

  1. Sale value = sale price − costs of selling (estate agent, notary and legal fees, plusvalía municipal).
  2. Acquisition value = purchase price + purchase costs and taxes + documented improvements.
  3. Gain = sale value − acquisition value.
  4. Tax = the progressive bands if you are resident, or 19% if you are a non-resident.

Worked example

Item Amount
Purchase price €300,000
Purchase costs and taxes €30,000
Documented improvements €20,000
Acquisition value €350,000
Sale price €500,000
Selling costs €20,000
Sale value €480,000
Taxable gain €130,000
Tax as a Spanish resident €28,780
Tax as a non-resident (19%) €24,700

As a resident: €1,140 (19% of the first €6,000) + €9,240 (21% of the next €44,000) + €18,400 (23% of the remaining €80,000) = €28,780. As a non-resident, the buyer withholds €15,000 (3% of €500,000), so the seller pays the €9,700 balance with Modelo 210.

Every sale is different: your residency, an inherited property, a rented property or the Beckham Law can change the final bill. Our tax team can review your case and file your Modelo 210 before you sign.

FAQs about Capital Gains Tax in Spain

How much Capital Gains Tax do non-residents pay in Spain?

Non-residents pay a flat 19% on the gain, whatever their nationality. When they sell a property, the buyer withholds 3% of the price as an advance payment, and the seller settles the difference or claims a refund with Modelo 210.

Is plusvalía municipal the same as Capital Gains Tax?

No. Capital gains tax is a state tax on your whole profit, paid through IRPF (residents) or IRNR (non-residents). The plusvalía municipal is a separate local tax on the increase in value of the urban land, charged by the town hall. When you sell a property you may have to pay both, but the plusvalía you pay reduces your capital gain.

Let us optimize your taxes!

Now you know the rules of the game. Nevertheless, you may still find it difficult to solve the puzzle. 

There are several rules and exemptions regarding all the taxes you need to pay in Spain as an expat, and knowing them all can be nearly impossible. That is why we want to make your life easier. 

Our tax lawyers are specialized on expat taxes. They will analyze your situation, answer all your doubts and manage all your taxes so you can pay just what you should. 

We want you to focus on enjoying your life in Spain without the need to worry about the boring part. Let us do that for you!

Online booking
Speak with our lawyers

Choose the date that suits you best for a consultation with our lawyers, and let us guide you step by step.

1Choose a service
2Pick a date and time
3Confirm your appointment
Balcells Group
 Online or in-office

Related content of interest: