property

Capital gains tax on a sale

Responsible for this content: Frank Menze

Calculate sale profit

Explanation

This is about tax residence, not nationality: anyone living in Spain for more than 183 days a year, or whose economic base is there, is a resident and is taxed on the savings scale instead of a flat rate.

Explanation

The price actually agreed in the deed. If it is below market value, the tax office uses the market value instead.

Explanation

The amount in your purchase deed. For an inherited or gifted property, the value used for inheritance or gift tax applies instead.

Explanation

Everything you bear as the seller: agency commission, lawyer, energy certificate and the plusvalía municipal you paid — the municipal tax on the increase in land value. They reduce the transfer value.

Explanation

Transfer tax (ITP) or VAT (IVA), notary, land registry (Registro) and the gestoría — a Spanish administrative office that handles the paperwork. Interest expressly does not count.

Explanation

Structural improvements with an invoice and a permit, such as an extension or a new pool. Painting, new flooring and ordinary maintenance do not count.

Explanation

What counts is the day the deed (escritura) is signed before the notary, not the day the money arrives — it decides which law applies.

Explanation

The day you acquired the property. Property acquired before 31 December 1994 falls under a transitional rule that reduces the taxable gain.

Transfer value (valor de transmisión)
€893,000.00
Acquisition value (valor de adquisición)
€577,000.00
Gain (ganancia patrimonial)
€316,000.00
Capital gains tax
Why this figure?
Non-residents pay a flat 19% on the gain, whether they live in the EU or outside it.
€60,040.00
Left after costs and tax
€832,960.00
Buyer's withholding (retención)€28,500
Still to pay with form 210€31,540

The buyer withholds 3% of the price and pays it over with form 211. That is a payment on account, not the tax itself.

Form 210 is due within three months after the one-month withholding period ends. The four months often quoted are the sum of both periods.

Three worked cases

Non-resident with a gain
Gain (ganancia patrimonial)
€316,000
Capital gains tax
€60,040
Left after costs and tax
€832,960
Resident, the same sale
Gain (ganancia patrimonial)
€316,000
Capital gains tax
€76,680
Left after costs and tax
€816,320
Sale at no gain
Gain (ganancia patrimonial)
-€108,000
Capital gains tax
€0
Left after costs and tax
€580,000

Legal status: 1 January 2025

This calculation is provided for guidance only and is not a substitute for tax or legal advice in specific cases.

How much tax is due on the profit from a sale?

If you sell a property in Mallorca at a profit, Spain taxes not the sale price but the difference between what you originally paid and what you receive now — the capital gain (ganancia patrimonial). As a non-resident, you pay a flat rate of 19%, whether you come from the EU, the EEA or a non-EU country. If you are tax-resident in Spain, the progressive rates for residents’ savings income apply instead, starting at 19% and rising to 30%. This page focuses on capital gains tax itself; for an overview of all three taxes due on a sale, see Taxes on selling property in Spain.

How the calculation works

The calculation has three steps, all based on Art. 24.4 of Real Decreto Legislativo 5/2004 (TRLIRNR, Spain’s Non-Resident Income Tax Act) and Art. 35 of Ley 35/2006 (LIRPF, Spain’s Income Tax Act). For non-residents, the taxable amount is calculated under the same rules that apply to residents.

1. Sale value (valor de transmisión). Under Art. 35.2 LIRPF, this is the actual sale price less the costs and taxes you pay as the seller — such as estate agent’s fees, legal fees, an energy performance certificate or the municipal capital gains tax (plusvalía municipal) if you pay it yourself.

2. Acquisition value (valor de adquisición). Under Art. 35.1 LIRPF, this comprises the original purchase price, the costs and taxes paid on purchase — ITP or IVA, notary fees, Land Registry fees and gestoría fees (for a Spanish office that handles tax and administrative matters) — plus capital improvements. Interest on financing is expressly excluded.

3. Gain and tax rate. Subtracting the acquisition value from the sale value gives you the gain. If the result is negative, you have a loss (see Special cases). If it is positive, it is taxed — after any transitional reduction for properties acquired long ago — at the non-resident rate or the progressive rates for residents. When a non-resident sells, the buyer also withholds 3% of the purchase price (retención — a withholding payment towards the tax due) and pays it to the Spanish tax authority (AEAT — Agencia Estatal de Administración Tributaria) using Modelo 211 (the official form the buyer uses to declare the withholding). The amount withheld is credited against the seller’s actual tax liability. For details of how this works, see The 3% withholding on property sales.

Worked examples

Below the calculator, you’ll find three worked examples calculated using the current rates and deadlines. Enter your own figures to see what you would be left with.

Special cases

Purchase before 31.12.1994

If you bought your property before 31.12.1994, you benefit from a transitional regime (Disposición transitoria novena Ley 35/2006, applicable to non-residents through Disposición transitoria primera TRLIRNR). The portion of the gain deemed to have arisen by 19.01.2006 is reduced by 11.11% for each full year of ownership beyond two years up to 31.12.1996. The reduction is capped: it applies only up to a cumulative disposal value of €400,000 across all sales benefiting from this relief since 01.01.2015. If you sell several properties, the cap applies to them all together. The calculator works out the time-based apportionment and cap using the method in the AEAT’s own worked example.

Purchase between May and December 2012: half the gain is tax-free

If you bought an urban plot between 12 May 2012 — the day Real Decreto-ley 18/2012 came into force — and 31 December 2012, you pay tax on only half the gain when you sell. The exemption of 50% is set out in Disposición adicional cuarta TRLIRNR and applies to non-residents without a permanent establishment. For tax residents, Disposición adicional trigésima séptima of Ley 35/2006 provides the same relief, but also requires the property to have been acquired for payment.

The exemption does not apply, however, if you bought the property from, or sell it to, your spouse or a relative in the direct line or collateral line up to the second degree. The same applies to companies connected to you or those people within the meaning of Art. 42 of the Código de Comercio. The calculator asks about this when your purchase date falls within that window. It is a rule dating from the property crisis that few people remember today, even though it can make the difference between two five-figure tax bills.

More than ten years’ ownership before 1997

The transitional regime has a cut-off that is not a matter of rounding: if you had owned the property for more than ten years as at 31.12.1996, the portion of the gain that arose by 19.01.2006 is not subject to tax at all (‘no sujeta’) under the final paragraph of Disposición transitoria novena. It is not merely reduced by a percentage eleven times over. The distinction sounds academic, but it is not: under the annual reduction schedule, eleven years gets you close to, but not quite to, a full hundred per cent. The remainder would mean paying tax on a gain that the law does not tax.

Purchase before 1995 followed by improvements

If you later made structural improvements to a property bought before 1995, the law requires two separate calculations: the purchase price and each investment have their own holding period, and the sale proceeds must be apportioned between them. This calculator does not make that apportionment. In this case, it therefore deliberately applies no reduction and flags this in the result. The figure shown is an upper limit; the actual tax will be lower. For this situation, it is worth consulting a gestoría or tax adviser.

Rented properties

If you rented out the property for a time, the law also reduces its acquisition value by at least the depreciation that could have been claimed during the rental period (minimum depreciation, Art. 35.1 a. E. LIRPF) — whether or not you actually claimed it for tax purposes. This lowers the acquisition value and increases the taxable gain. This calculator does not account for the depreciation adjustment; if you previously rented out the property, allow for an increase in the calculated tax and ask a gestoría or tax adviser to work out the exact amount.

Reinvestment in a new main home

IRPF sale exemption

Explanation

The calculator shows one route per run. Other exemptions may also be available, and the result flags a clearly better route.

Explanation

Enter the agreed price from your sale deed.

Explanation

Enter the price in your acquisition deed; for an inheritance or gift, enter the value assessed there for tax.

Explanation

Enter the full acquisition value of the new main home. Financed amounts count too, not only your own cash.

Tax with exemption
€8,398.65
Tax saved
€33,997.35
Exempt gain
€148,635.02
Sale proceeds after costs and tax
€602,601.35

Resident in Spain · Was this your main home?: Yes · Will the new home become your main home, and will you use the amount within 2 years after the sale or did you use it for a home bought within 2 years before it?: Yes, all conditions met

Legal status: 1 January 2025

This calculation is provided for guidance only and is not a substitute for tax or legal advice in specific cases.

Full calculation

If you reinvest the sale proceeds in a new main home, the gain may be exempt from tax. Contrary to what many guides say, this does not apply only to residents: the seventh additional provision of the TRLIRNR expressly extends this reinvestment exemption to non-residents who live in the EU or EEA. The AEAT lists this case in its forms directory under income codes 33 and 34.

Exemption for residents aged 65 and over

Spanish tax residents aged 65 or over pay no capital gains tax when they sell their main home, regardless of what they do with the proceeds. For other properties — such as a second home — this exemption applies only if the proceeds are used to set up a lifetime annuity.

Selling at a loss

If you sell for less than your acquisition value, there is no taxable gain, and any amounts withheld by the buyer can be refunded in full on application. Residents can also offset such a loss against other capital gains in the same or subsequent tax years.

Joint ownership

If the property belongs to several people, each share is taxed separately: the gain, tax rate and any transitional reduction are calculated for each co-owner’s share, not for the property as a whole. Each non-resident co-owner files their own Modelo 210 (the Spanish tax return for non-residents’ gains on property sales) for their share; residents instead declare their share in their own annual tax return.

Inherited property

If you inherited the property, its acquisition value is not the price the deceased originally paid, but the value used at the time for Spanish inheritance tax (Art. 36 LIRPF). This calculator assumes you bought the property; for an inherited property, enter the inheritance value on which tax was paid at the time as the acquisition price.

Deadlines and forms

A sale triggers two separate deadlines for two different forms that are often confused:

  • Modelo 211 (buyer, one month): If the seller is a non-resident, the buyer must pay the amount withheld within one month of the signing of the deed (escritura — the notarised deed of sale) to the AEAT and give the seller a copy.
  • Modelo 210 (seller, three months after the end of that month): The non-resident seller declares the gain themselves using Modelo 210 — within three months after the deadline for Modelo 211 has passed. In practice, this is often described as ‘four months from the sale’; this is not a separate statutory deadline, but simply the one month for Modelo 211 plus the three months that follow.

Regardless of where you live, there is a third, municipal deadline: plusvalía municipal — the municipal tax on the increase in land value — must be declared to the relevant town hall within 30 working days of the deed being notarised; it is separate from the capital gains tax discussed here and is calculated separately.

If you are tax-resident in Spain, you do not declare the gain from the sale using Modelo 210. Instead, you include it in your regular annual tax return, Modelo 100 (IRPF — Impuesto sobre la Renta de las Personas Físicas, Spain’s personal income tax), which must be filed between April and the end of June of the following year.

The calculation is based on the following provisions:

  • Art. 25.1.f).3º of Real Decreto Legislativo 5/2004 (TRLIRNR — Texto Refundido de la Ley del Impuesto sobre la Renta de no Residentes, Spain’s Non-Resident Income Tax Act): tax rate on capital gains for non-residents. Full text: boe.es, BOE-A-2004-4527.
  • Art. 24.4 TRLIRNR: the tax base for a ganancia patrimonial under the IRPF rules (Spain’s personal income tax). The same full text.
  • Art. 35 of Ley 35/2006 (LIRPF — Ley del Impuesto sobre la Renta de las Personas Físicas): definition of acquisition and disposal values. Full text: boe.es, BOE-A-2006-20764.
  • Disposición transitoria novena LIRPF, in conjunction with Disposición transitoria primera TRLIRNR: transitional rules for properties acquired before 31.12.1994. Both full texts as above.
  • Art. 5.a) of Orden EHA/3316/2010: deadline for non-resident sellers to file Modelo 210. Full text: boe.es, BOE-A-2010-19707.

The AEAT administers the forms and their deadlines; you can find the forms and instructions for completing them at sede.agenciatributaria.gob.es.

The acquisition value in this calculation includes the costs associated with your original purchase — the ITP, notary and Land Registry fees you paid when you bought the property reduce your gain now. To see what these costs typically amount to, use the calculator on the Property purchase costs in Mallorca page. If you use a property in Spain yourself without renting it out and also need to file a Modelo 210 for it, you’ll find the relevant calculation on the page about Self-use tax Modelo 210. For a general overview of the entire sales process, see the guide Selling a property in Mallorca.

Selling a finca rústica: What tax applies to the gain?

Selling a finca rústica in Mallorca can also result in a taxable capital gain. What matters is not the total sale price, but the difference between the sale value and the acquisition value, as described above. How much tax is due depends in particular on whether you are tax-resident in Spain and the size of the gain. However, plusvalía municipal does not apply to land classified exclusively as rural: this municipal tax applies to urban land. The municipal filing deadline mentioned above therefore does not apply in this case.

Note: This information does not constitute legal or tax advice.

Do I have to pay tax as a non-resident even if I’m from the EU?
Yes. The tax rate on the gain from the sale is the same for all non-residents, whether they’re from the EU, the EEA or a non-EU country. The calculator shows you the current rate.
What happens to the amount withheld by the buyer?
The buyer pays part of the purchase price directly to the Spanish tax authority, and that amount is credited against your actual tax liability. If your tax liability is lower than the amount withheld, you’ll receive a refund of the difference; if it’s higher, you’ll have to pay the balance. The calculator shows you both outcomes.
Can I include renovation costs in the acquisition cost?
Only investments and improvements that increase the property’s value count; routine maintenance does not. Enter only expenses that have genuinely increased the value of the property.
Does the transitional regime for older acquisitions apply to me?
That depends on the exact date you bought your property. If it was before the relevant cut-off date, the calculator automatically displays the appropriate input field and factors the reduction into the calculation.
As a resident, do I also need to file a separate form for the sale?
No. If you’re tax-resident in Spain, you declare the gain from the sale alongside your other income on your regular annual tax return, not on a separate form for property sales.
Can I split the calculation between several co-owners?
The calculator works out the gain for the property as a whole. If the property is jointly owned, each co-owner calculates their share separately based on their ownership stake and files their own form.
What’s the difference between this tax and the plusvalía municipal?
These are two separate taxes with different deadlines and recipients: the tax calculated here goes to the national tax authority and applies to your personal gain, while the plusvalía municipal goes to the local council and applies to the increase in the land’s value. Both are payable on almost every sale.

We use cookies to provide you with the best possible experience on our website. Learn more in our Privacy Policy