Capital gains tax on sale
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
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: January 1, 2025
Sources
- Real Decreto Legislativo 5/2004, texto refundido de la Ley del IRNR (consolidado) (boe.es)
- AEAT — Manual de Tributación de No Residentes: ganancias patrimoniales derivadas de la venta de inmuebles (sede.agenciatributaria.gob.es)
- AEAT — Instrucciones modelo 151, ejercicio 2023 y siguientes: escala del ahorro (sede.agenciatributaria.gob.es)
- Ley 35/2006, del IRPF (consolidado) (boe.es)
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 sales profit?
If you sell a property in Mallorca at a profit, Spain doesn't tax the sale price, but rather the difference between what you once paid and what you now receive — the capital gain (ganancia patrimonial). As a non-resident, you pay a flat rate on this, regardless of whether you come from the EU, the EEA or a third country. If you are tax-resident in Spain, the residents' savings-income scale applies instead, which starts at 19% and reaches up to 19% Diese... 30%Taxes on property sales in Spain.
How it's calculated
The calculation follows three steps, all of which derive from Art. 24.4 of Real Decreto Legislativo 5/2004 (TRLIRNR, Spanish Non-Resident Income Tax Act) and Art. 35 of Ley 35/2006 (LIRPF, Spanish Income Tax Act) — for non-residents, the tax base is determined according to the same rules that apply to residents.
1. Transfer value (valor de transmisión). According to Art. 35.2 LIRPF, this is the actual sale price achieved, reduced by the costs and taxes borne by you as the seller — such as estate agent's commission, lawyer's fees, energy performance certificate, or the municipal capital gains tax (plusvalía municipal) you paid yourself (plusvalía municipal).
2. Acquisition value (valor de adquisición). According to Art. 35.1 LIRPF, this comprises the original purchase price, the costs and taxes of acquisition — ITP or IVA, notary, land registry, gestoría (Spanish administrative office for tax and official matters) — as well as value-enhancing investments and improvements. Interest on financing is explicitly excluded.
3. Profit and tax rate. Transfer value minus acquisition value gives the profit. If it is negative, a loss has occurred (see special cases). If it is positive, it is taxed — after applying any transitional reduction for very old acquisitions — at the non-resident rate or the resident scale. In the case of a sale by a non-resident, the buyer additionally withholds 3% of the purchase price (retención — the withheld tax advance payment) and remits it via Modelo 211 (the official form used by the buyer to declare the withholding) to the Spanish tax authority (AEAT — Agencia Estatal de Administración Tributaria); this withholding is credited against the actual tax liability. How this withholding works in detail is explained on the page The 3% withholding on property sales.
Worked examples
Below the calculator you'll find three worked examples calculated live using the current rates and deadlines — enter your own figures to see what remains in your case.
Special cases
Purchase before 31.12.1994
Anyone who bought their property before 31.12.1994 benefits from a transitional regime (Disposición transitoria novena Ley 35/2006, applicable to non-residents via the Disposición transitoria primera TRLIRNR). The portion of the gain that is calculated to have arisen up to 19.01.2006 is reduced by 11.11% for each full year of the holding period that goes beyond two years up to 31.12.1996. The reduction is capped: it only applies up to a cumulative transfer value of €400,000 across all sales benefiting in this way since 01.01.2015 — if you sell several properties, the cap applies to all of them together. The calculator reflects this time-apportionment and cap calculation using the method that AEAT itself uses in its own worked example.
Purchase between May and December 2012: half remains tax-free
Anyone who acquired an urban plot of land between 12 May 2012 — the day the Real Decreto-ley 18/2012 came into force — and 31 December 2012 only pays tax on half the gain when selling. The exemption of 50% is set out in the Disposición adicional cuarta TRLIRNR and applies to non-residents without a permanent establishment; for tax residents, the Disposición adicional trigésima séptima of the Ley 35/2006 governs the same matter, there with the additional requirement of an acquisition for consideration.
However, it does not apply if the property was acquired from, or is sold to, the spouse or relatives in the direct or collateral line up to the second degree — the same applies to companies connected with you or these persons within the meaning of Art. 42 of the Código de Comercio. The calculator asks about this as soon as the purchase date falls within this window. It is a rule from the property crisis that hardly anyone has on their radar today, even though it can make the difference between two five-figure amounts.
More than ten years of ownership before 1997
Within the transitional regime there is a limit that is not merely a rounding effect: if the holding period as at 31.12.1996 exceeded ten years, the portion of the gain arising up to 19.01.2006 is, under the last paragraph of the Disposición transitoria novena, not subject to tax at all ("no sujeta") — not merely reduced eleven times over by a percentage. The difference sounds academic, but it isn't: over the annual scale, eleven years add up to just short of, but not quite, the full hundred percent — and the remainder would be tax on a gain that the law does not capture at all.
Purchase before 1995 combined with investments
If you later made structural improvements to a property bought before 1995, the law requires two separate calculations: the purchase price and each investment each have their own holding period, and the sale proceeds must be apportioned between both components. This calculator does not apportion. In this case, it therefore deliberately grants no reduction and states this clearly — the result shown is then the upper limit, and the actual tax due is lower than that. In this situation, it is worth consulting a gestoría or tax advisor.
Rented properties
If you have rented out the property at any point, the law additionally reduces the acquisition value by the depreciation that could at least have been applied during the rental period (amortización mínima, Art. 35.1 a. E. LIRPF) — regardless of whether you actually claimed it for tax purposes. This lowers the acquisition value and thereby increases the taxable gain. This calculator does not model the depreciation correction; if the property was previously rented out, factor in a surcharge on the calculated result and have the exact amount determined by a Gestoría or tax adviser.
Reinvestment in your own main residence
Anyone who reinvests the sale proceeds in a new main residence can have the gain exempted from tax. Contrary to what many guides state, this does not apply only to residents: the Disposición adicional séptima TRLIRNR expressly extends this reinvestment exemption to non-residents living in the EU or EEA as well. The AEAT lists this case in its form directory under income codes 33 and 34.
Exemption from age 65 for residents
Persons tax-resident in Spain aged 65 or over pay no capital gains tax at all when selling their main residence, regardless of what happens to the proceeds. For other properties — such as a second home — this exemption only applies if the proceeds are used to set up a life annuity.
Sale at a loss
If you sell below your own acquisition value, no taxable gain arises, and the amounts withheld by the buyer are refunded in full upon request. Residents can also offset such a loss against other capital gains from the same or subsequent tax years.
Co-ownership
If the property belongs to several people, each share is taxed individually: the gain, tax rate and, where applicable, the transitional reduction are each calculated in relation to the co-ownership share, not the property as a whole. Each non-resident co-owner submits their own Modelo 210 (the Spanish tax return for non-residents' capital gains) for their share; residents, on the other hand, declare their share in their own annual tax return.
Inherited property
If you inherited the property, the acquisition value is not the original purchase price paid by the deceased, but the value on which Spanish inheritance tax was based at the time (Art. 36 LIRPF). This calculator assumes a purchase transaction; for an inherited property, enter the inheritance value that was taxed at the time as the acquisition price.
Deadlines and forms
When selling, two separate deadlines apply for two different forms, which are often confused:
- Modelo 211 (buyer, one month): If the seller is a non-resident, the buyer must pay the withheld amount within one month of the signing of the escritura (escritura — the notarial deed of sale) to the AEAT and hand a copy to the seller.
- Modelo 210 (seller, three months after this period ends): The non-resident seller declares the gain themselves via the Modelo 210 — within three months after the deadline for the Modelo 211 has expired. In practice you often read "four months from the sale" for this; that isn't a separate statutory deadline, but simply the sum of the one month for the Modelo 211 plus the three months that follow it.
Regardless of residency, a third, municipal deadline applies: The plusvalía municipal — the municipal capital gains tax on the increase in land value — must be declared within 30 days of the notarisation at the relevant town hall; it is independent of the profit tax dealt with here and is calculated separately.
If you are tax resident in Spain, you don't declare the sale gain via a Modelo 210, but as part of your regular annual tax return, the Modelo 100 (IRPF — Impuesto sobre la Renta de las Personas Físicas, the Spanish personal income tax for individuals), which must be filed the following year between April and the end of June.
Legal basis and status
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, the Spanish Non-Resident Income Tax Act): Tax rate for non-residents on capital gains. Full text: boe.es, BOE-A-2004-4527.
- Art. 24.4 TRLIRNR: Tax base of the ganancia patrimonial according to the rules of the IRPF (Spanish personal income tax for individuals). 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 value. Full text: boe.es, BOE-A-2006-20764.
- Disposición transitoria novena LIRPF, in conjunction with Disposición transitoria primera TRLIRNR: Transitional regime for properties acquired before 31.12.1994. Both full texts as above.
- Art. 5.a) of Orden EHA/3316/2010: Deadline for filing the Modelo 210 by non-resident sellers. Full text: boe.es, BOE-A-2010-19707.
The AEAT is responsible for the ongoing administration of the forms and their deadlines; you can find their forms and completion guidance at sede.agenciatributaria.gob.es.
Related calculators
The acquisition value in this calculation includes the incidental costs of your original purchase — what you paid for ITP, notary and land registry at the time of purchase reduces your profit today. How high these incidental costs typically turn out, the calculator on the page shows you at Purchase incidental costs in Mallorca. If you use a property in Spain yourself, without renting it out, and also have to file a Modelo 210 for it, you'll find the appropriate calculation on the page about the Self-use tax Modelo 210. A general overview of the entire sales process is provided in the guide Selling property in Mallorca.