Capital gains tax in Spain

Pellicer&Heredia helps you to reduce your capital gains tax payment

If you’re planning to sell a property or other asset in Spain, understanding the capital gains tax can mean saving thousands of euros. At Pellicer & Heredia, we specialize in helping non-residents, expats, and foreign investors navigate the Spanish tax system efficiently.

Many foreigners are unaware of the differences in tax obligations between residents and non-residents, or that certain reinvestments, improvements, and legal costs can be deducted to reduce the final taxable gain. Our legal experts analyze every detail of your situation to identify exemptions, deductions, and legal strategies that can significantly lower your tax burden.

With over 20 years of experience in Spanish and international tax law, we make sure your capital gains are calculated accurately, your tax forms are filed correctly, and any overpaid amounts are successfully reclaimed.

Does Spain have capital gain tax?

Yes, Spain applies a capital gains tax to the profit made from the sale or transfer of assets, such as real estate, shares, or other investments. Both residents and non-residents are subject to this tax when they sell a property or other capital asset located in Spain.

The taxable gain is generally calculated as the difference between the sale price and the original purchase price, adjusted by certain deductible expenses.

The Spanish tax authorities take seriously this taxation, and failing to declare it properly can lead to fines or delays in property registration. That’s why it’s essential to understand how the tax is calculated, what rates apply, and what exemptions or deductions you may be eligible for—especially if you are a non-resident or foreign investor.

Download the most complete guide on taxes in Spain

Do you want to understand how taxes really work in Spain — whether you’re a resident, non-resident, investor, or business owner?  Download our free, lawyer-written guide with clear explanations.

Get the practical insights you need to avoid mistakes and stay fully compliant with Spanish tax law.

When do I need to pay capital gains tax?

It becomes payable in Spain when you sell or transfer an asset for more than you originally paid. The timing and method of payment depend on your residency status and the type of asset sold. Here’s a breakdown of the most common situations:

Selling a property in Spain

If you’re selling a house or other property and you’ve made a profit, you are required to declare and pay capital gains tax. This applies to both primary residences and investment properties, although Spanish residents may benefit from certain exemptions—for example, if the proceeds are reinvested in another main residence or if the seller is over 65.

Home sale by Non-residents

If you’re not a resident in Spain, you still need to pay capital gains tax when selling a property located in the country. In this case, the buyer is legally obliged to withhold 3% of the purchase price and pay it directly to the Spanish Tax Agency using Modelo 211.

As the seller, you must file Modelo 210 within 4 months of the sale to declare the actual capital gain and either pay any outstanding amount or claim a refund if the 3% withholding exceeds your actual tax liability.

Selling shares or company assets

Capital gains tax also applies when you sell shares, stocks, or interests in a company, whether it’s a private business or publicly traded equity. This includes foreign individuals holding Spanish assets. Both residents and non-residents must declare the gain, although non-residents may benefit from Double Taxation Treaties, which can reduce or eliminate this taxation depending on their country of residence.

How much is capital gains tax in Spain?

The amount you’ll pay in Spain depends primarily on your residency status and the profit made from the sale. Spain applies different tax rates for residents and non-residents, so identifying which category you fall into is crucial for calculating your tax liability accurately.

To determine how much you’ll owe, you must first calculate the taxable gain, or tax base, which is the difference between the sale price and the original purchase price, adjusted by certain allowable expenses. Importantly, only the net profit—not the total sale amount—is subject to capital gains tax.

How is the tax base calculated?

Capital Gain = Sale Price – (Purchase Price + Deductible Costs)

You are allowed to reduce your taxable base by including specific expenses related to the acquisition and sale of the asset. Some of the most common deductible costs include: notary and registry fees, real estate agency commissions or certain administrative costs.

Applying these deductions correctly can significantly reduce your tax liability, especially in high-value property transactions. Our legal team at Pellicer & Heredia ensures that all eligible expenses are factored in to help you pay only what you truly owe.

For foreigners residing in Spain

If you are a tax resident in Spain, capital gains are taxed at progressive rates based on the size of the gain. The current CGT rates for residents are:

  • 19% for gains up to €6,000
  • 21% for gains from €6,001 to €50,000
  • 23% for gains from €50,001 to €200,000
  • 27% for gains from €200,001 to €300,000
  • 30% for gains above €300,000

Residents may also benefit from certain exemptions or reductions, such as reinvesting the proceeds in a new main residence or being over 65 and selling their primary home. The gain must be declared in the annual income tax return (Modelo 100).

For Non-residents

If you’re a non-resident selling property or assets in Spain, a flat tax rate applies:

  • 19% for residents of the EU, EEA, or countries with a tax treaty with Spain
  • 24% for residents of non-EU/EEA countries without a tax treaty

Non-residents cannot usually claim the same exemptions available to residents. Additionally, the buyer must withhold 3% of the property sale price and pay it to the tax agency (Modelo 211) as a prepayment of CGT. You must then file the 210 form within 4 months of the sale to settle your tax bill or request a refund if the 3% withheld was more than the tax due.

How to avoid the Spanish capital gains tax

While in Spain isn’t always possible avoid this payment, there are several legal exemptions and strategies that can significantly reduce or eliminate what you owe—especially if you’re properly advised before the sale.

Whether you’re a resident or non resident, understanding the options available under Spanish tax law can help you optimize your sale and keep more of your gains.

Exemptions for primary residence sales

If you’re a Spanish tax resident selling your main home, you may be fully exempt under certain conditions:

  • If you reinvest the proceeds in the purchase of another main residence within Spain or another EU/EEA country.
  • If you are over 65 years old, have lived in the property for at least three years, and it is your habitual residence at the time of sale.

These exemptions apply only to residents, not non-residents, and must be declared correctly in your income tax return. At Pellicer & Heredia, we help clients prepare the necessary documentation to ensure they qualify and benefit from these exemptions.

Deductions you can apply

To reduce your taxable gain, you can deduct a wide range of expenses related to the purchase and sale of the asset. These include:

  • Notary, registration, and legal fees during purchase or sale
  • Real estate agent commissions
  • Capital improvements (not regular maintenance)
  • Transfer tax or VAT paid at acquisition
  • Advertising costs or energy certificate fees related to the sale

Properly applying these deductions can significantly lower the amount of capital gains tax owed, especially in high-value transactions. Our legal team ensures that every eligible expense is accounted for, helping you minimize your tax base.

Double taxation treaties

Spain has signed double taxation agreements with many countries to avoid taxing the same income twice. If you’re a non-resident and your country has a treaty with Spain, you may be able to claim relief or reduce your capital gain tax liability depending on how the treaty allocates taxing rights.

Our international tax planning advisors review your case and apply the correct treaty terms to ensure you’re not taxed unfairly or unnecessarily. We also handle all communications with Spanish tax authorities and, if needed, coordinate with tax advisors in your country of residence.

Experts tax advisors for non residents in Spain

Which tax form should you use?

Filing the correct tax form is essential to properly declare your capital gain and avoid penalties or delays. The form you need depends entirely on whether you are considered a resident or non-resident for tax purposes in Spain.

Each form has its own rules, deadlines, and submission procedures—so getting it right is crucial for a smooth and compliant transaction.

Income tax model 100 for residents

If you are a tax resident in Spain, you must declare your capital gains in the annual income tax return, known as Model 100. This return includes all income and gains earned during the year, and capital gains are reported as part of your overall income.

The filing period for the 100 form is typically between April and June of the following year. You’ll need to include documentation that supports the capital gain, such as the purchase and sale deeds, invoices for improvements or legal costs, and any other deductible expenses.

210 form for Non-residents

If you’re a non-resident, the form you must use is the Spanish 210 form, which is specifically designed for declaring non-resident income and capital gains in Spain. This applies when you sell a property, shares, or other assets located in Spain.

In the case of real estate sales, the buyer is legally required to withhold 3% of the purchase price and pay it directly to the Tax Agency using the form 211.

As the seller, you must then file model 210 within four months of the sale date to declare the actual gain and either pay the difference or request a refund if the 3% withheld exceeds your capital gains tax liability.

capital gain tax in spain resident vs non resident

Our capital gains tax services

At Pellicer & Heredia, we offer specialized legal services for individuals and investors who need to declare and optimize their Capital Gains Tax in Spain. Whether you are a resident selling your main home or a non-resident disposing of a Spanish property or investment, our tax lawyers provide comprehensive support at every step of the process. We ensure your tax obligations are met efficiently and help you minimize what you pay legally.

Full legal management, filings and declarations

We take care of the entire legal process, from calculating the capital gain to filing the correct tax form. Our team handles all interactions with the Spanish tax authorities, ensuring that every document is submitted on time, correctly, and with all applicable deductions properly documented.

Tax planning before the sale

Planning ahead is key to reducing your tax liability. We provide strategic advice before the sale takes place, helping you understand the tax implications of the transaction and recommending the most efficient way to proceed. This might include timing the sale, assessing the impact of reinvestment opportunities, or adjusting ownership structures where applicable.

Exemption and deduction analysis

Our tax advisors and lawyers conduct a thorough review to identify any exemptions or deductions you may be eligible for—such as reinvesting in another primary residence, age-related exemptions, or deductible costs like legal fees, agent commissions, and improvement expenses. We make sure every allowable expense is applied to reduce your taxable gain as much as possible.

Capital gain tax recovery for Non-residents

If you’re a non-resident, you’ve likely had 3% of your sale price withheld by the buyer. In many cases, this amount exceeds the actual tax owed. We help you file the 210 form to recover the overpaid tax quickly and efficiently, managing all communication with the Spanish Tax Office on your behalf and ensuring you receive the maximum refund allowed by law.

Contact us today

Enter your info below and get

INSTANT ACCESS BY EMAIL

to all our free documents