Capital Gains Tax in Spain When Selling Property

Capital gains tax is one of the main taxes to consider when selling property in Spain. It applies to the profit made on the sale, not to the full sale price.

In simple terms, the capital gain is calculated by comparing the value for which the property is sold with the value for which it was acquired, taking into account certain documented costs and improvements.

Capital gains tax is separate from plusvalía municipal, which is a local town-hall tax. It is also separate from the 3% withholding that applies when a non-resident sells Spanish property. The 3% withholding is not the capital gains tax itself. It is a payment on account of the non-resident seller’s potential capital gains tax liability. Find here a full overview of all taxes involved when selling a property in Spain.

Before selling, it is important to calculate the expected capital gain and collect the documents needed to support the calculation. This helps you understand your likely net proceeds and avoid tax surprises at completion.

At SEB LEESON LEGAL GROUP, we assist resident and non-resident sellers with Spanish capital gains tax calculations, seller-tax planning, sale contracts, completion before the Notary and post-sale tax steps.

What is capital gains tax in Spain?

Capital gains tax is the tax charged on the profit made when an asset is sold. In the context of Spanish property, it usually arises when the sale value is higher than the acquisition value. For property sellers, the key question is not simply: “What price am I selling for?” The better question is: “What taxable gain will the Spanish Tax Agency consider I have made after taking into account the original purchase, taxes, costs, improvements and sale expenses?”

The answer depends on the documents available and the seller’s tax residence. Spanish residents and non-residents are taxed under different systems, although the basic idea of comparing acquisition value and transfer value is similar.

Basic capital gains tax formula

The basic calculation is:

However, each part of the calculation needs to be reviewed carefully.

The acquisition value is generally based on what the seller paid when they acquired the property, plus certain acquisition costs and taxes, and in some cases documented improvement works.

The transfer value is generally based on the sale price, reduced by certain costs directly connected with the sale.

If the adjusted transfer value is higher than the adjusted acquisition value, there is usually a taxable gain. If the adjusted transfer value is lower, there may be a capital loss.

This calculation should be supported by documents. If costs cannot be proven, they may not be accepted in the calculation.

What can be included in the acquisition value?

The acquisition value may include more than the original purchase price.

Depending on the case and supporting documentation, it may include:

  • The original purchase price.
  • Transfer Tax, IVA, IGIC or Stamp Duty paid on acquisition.
  • Notary fees from the purchase.
  • Land Registry fees from the purchase.
  • Legal fees connected with the purchase.
  • Certain documented improvement works.
  • Costs connected with inheritance or donation acquisition, where relevant.

The key point is documentation. Sellers should keep the purchase deed, tax payment forms, invoices and proof of payment. Without documents, it may be difficult to include certain costs in the calculation.

What costs may reduce the transfer value?

The transfer value may be reduced by costs that are directly connected with the sale, where properly documented.

These may include:

  • Estate agent commission.
  • Legal fees connected with the sale.
  • Certain Notary or registry costs connected with the sale.
  • Mortgage cancellation costs, where relevant.
  • Other necessary sale expenses, depending on the transaction.

The cost must normally be real, justified and connected with the sale. Sellers should keep invoices and proof of payment.

A seller who does not collect the correct documents may pay more capital gains tax than necessary because deductible or relevant costs cannot be proven.

Are renovation works deductible for capital gains tax?

Some documented improvement works may be relevant to the capital gains tax calculation, but ordinary maintenance and repairs should not be treated automatically as deductible improvements.

The distinction can be important.

A genuine improvement may increase the value, capacity, habitability or useful life of the property. Ordinary maintenance usually keeps the property in its existing condition.

Examples that may need review include:

  • Extensions.
  • Structural works.
  • Pool construction.
  • Major refurbishment.
  • New installations that improve the property.
  • Works that were properly licensed and invoiced.

Examples that are maintenance include:

  • Painting.
  • Small repairs.
  • Replacing broken items.
  • Routine maintenance.
  • Cleaning or minor cosmetic works before sale.
Capital gains tax in Spain

Every case depends on the documents and the nature of the works. Invoices, proof of payment, licences, technical documents and before-and-after evidence can be important.

Capital gains tax for non-resident sellers

Non-resident sellers are taxed in Spain on gains made from selling Spanish property.

For non-residents, the capital gain is generally calculated by comparing the transfer value and acquisition value. The tax rate for non-resident capital gains from Spanish property is generally 19%.

When the seller is non-resident, the buyer normally withholds 3% of the sale price at completion and pays it to the Spanish Tax Agency. This is often called the 3% retention or 3% withholding.

The 3% withholding is not the final capital gains tax calculation. It is a payment on account. The seller’s final capital gains position should still be calculated after the sale.

If the final tax due is lower than the amount withheld, the seller may be able to claim a refund. If the final tax due is higher than the amount withheld, the seller may need to pay the difference.

Capital gains tax for Spanish tax residents

Spanish tax residents are generally taxed on capital gains through the Spanish personal income tax system.

The tax treatment for residents is different from the non-resident system. Spanish residents may also need to consider whether any reliefs or exemptions apply, depending on their age, the type of property, whether it was their habitual residence and whether they reinvest in another qualifying main home.

These rules are fact-specific. A seller should not assume that an exemption applies automatically simply because they are resident in Spain or because they are buying another property. Resident sellers should review the position before completion, especially if the property is their main home or if they are over 65.

Main home exemption for Spanish tax residents over 65

Spanish tax residents over 65 may be exempt from capital gains tax when selling their habitual residence, if the legal requirements are met.

This can be very important for long-term residents who are selling their main home in Spain. However, the exemption depends on the property qualifying as the habitual residence and on the seller meeting the conditions.

This should be checked before completion, especially where the seller owns more than one property, has periods of absence, has moved recently, or where ownership is shared with another person who may not meet the same conditions.

Reinvestment relief for Spanish tax residents

Spanish tax residents who sell their habitual residence and reinvest in another qualifying habitual residence may be able to apply reinvestment relief, subject to conditions.

The relief is not automatic. The seller must meet the requirements, the property sold must qualify, the new property must qualify and the reinvestment must be made within the applicable rules.

If only part of the proceeds is reinvested, the relief may be partial rather than total.

Because mistakes can be costly, this should be reviewed before the sale is completed and before the new property is purchased.

Capital gains tax on inherited property

When selling inherited property in Spain, the acquisition value is usually linked to the inheritance documentation.

This may include the inheritance deed, declared inheritance value and inheritance tax documentation. If the heirs are selling shortly after inheriting, the capital gains calculation may be very different from a case where the family has owned the property for many years.

Before selling inherited property, it is important to check:

  • Whether the inheritance has been fully completed.
  • Whether the heirs are registered as owners.
  • The declared acquisition value in the inheritance.
  • Whether inheritance tax was filed correctly.
  • Whether plusvalía municipal was dealt with at inheritance.
  • Which costs can be supported with documents.

Inherited property sales can be delayed if the inheritance title is incomplete or if the heirs are not correctly registered as owners.

Capital gains tax when the property is owned by a company

If the property is owned by a company, the capital gains tax analysis may be different from a personal sale.

The company’s tax residence – so if it is a Spanish company or a foreign/non-redient company, accounting position, corporate tax obligations, purchase history, use of the property and possible VAT or IGIC treatment may all be relevant. A company-owned property sale may also require additional documents, including company registry information, proof of authority to sell, beneficial ownership information and corporate approvals. Company-owned property sales should be reviewed before signing a sale contract because both the legal documentation and tax consequences can be more complex.

Is the 3% withholding the same as capital gains tax?

No. The 3% withholding is not the same as capital gains tax.

When a non-resident sells Spanish property, the buyer normally withholds 3% of the sale price and pays it to the Spanish Tax Agency. This is a payment on account of the seller’s potential capital gains tax liability. The capital gains tax itself is calculated separately, based on the actual gain.

This means:

  • The 3% withholding may be higher than the final tax due.
  • The 3% withholding may be lower than the final tax due.
  • The 3% withholding may be approximately equal to the final tax due.

For this reason, non-resident sellers should not assume that the 3% retention is the final tax cost.

Is plusvalía municipal the same as capital gains tax?

No. Plusvalía municipal is not the same as capital gains tax.

Capital gains tax is a national tax connected with the seller’s gain for income tax purposes. Plusvalía municipal is a local town-hall tax connected with the increase in the value of urban land during the ownership period. Both may be relevant when selling property in Spain, but they are calculated differently and paid to different authorities. A seller should estimate both taxes before completion. It is a common mistake to calculate only capital gains tax and forget the municipal plusvalía.

Example of a capital gains tax calculation

The following is a simplified example.

A seller bought a property in Spain for €250,000 in 2012. At the time of purchase, they paid €25,000 in purchase taxes and costs. Later, they carried out documented improvement works costing €20,000. The adjusted acquisition value may therefore be €295,000.

The seller then sells the property for €400,000 in 2026 and pays €20,000 in estate agent and legal fees connected with the sale. The adjusted transfer value may therefore be €380,000.

In this example:

Adjusted transfer value: €380,000
Adjusted acquisition value: €295,000
Estimated capital gain: €85,000

The capital gains tax would then be calculated on the taxable gain, subject to the seller’s tax residence and applicable rules. For a non-resident this would then be 19% on €85,000 = €16,150.

This is only a simplified example. Real calculations depend on the documents, tax residence, ownership shares, acquisition method, improvements, dates, regional factors and possible reliefs.

Common mistakes when calculating capital gains tax

How SEB LEESON LEGAL GROUP can help

SEB LEESON LEGAL GROUP assists resident and non-resident sellers with capital gains tax calculations and the wider legal process of selling property in Spain.

Our service can include:

  • Reviewing the purchase and sale documents.
  • Calculating the estimated capital gain.
  • Identifying costs and improvements that may be relevant.
  • Reviewing the 3% withholding position for non-resident sellers.
  • Explaining the difference between capital gains tax and plusvalía municipal.
  • Reviewing seller contracts before signature.
  • Coordinating with estate agents, buyers, banks and Notaries.
  • Assisting with completion before the Notary.
  • Reviewing post-sale tax obligations.
  • Advising on the documents needed to support the calculation.

Our aim is to help sellers understand the likely tax result before completion, so the sale can be completed with clarity and fewer surprises.

Transfer tax in Spain

Frequently asked questions about capital gains tax in Spain