The asking price on the listing is not what the seller receives. Two separate taxes apply to the same sale. One is collected by the town hall, the other by the State, and neither can be credited against the other. On a home bought for €200,000 and sold for €280,000 ten years later, together they take €11,785. Add the selling costs and the seller receives €259,265. That is €20,735 less than the price in the deed.
How much does it cost to sell a home in Spain?
Between 6% and 10% of the sale price, taxes and costs included, for an ordinary sale that makes a gain. The tax share depends on the size of the gain and how long you have owned the property. The cost share depends mainly on the estate agent's commission.
The most common mistake is to think there is only one tax. There are two. They are handled by different authorities, follow different rules and are paid at different times.
Item | Municipal capital gains tax | Capital gain under income tax |
|---|---|---|
Spanish name | Plusvalía municipal, or IIVTNU | Ganancia patrimonial en el IRPF |
Who collects it | The town hall where the property is located | The national tax agency (Agencia Tributaria) |
What is taxed | The increase in value of the land only | The total gain on the sale |
How it is calculated | Two methods, the taxpayer chooses | Sale price minus purchase price, after costs |
When to pay | Within thirty working days of signing | In the following year's income tax return |
The two taxes are independent. The municipal tax cannot be offset against the national one. It does, however, count as a selling cost, so it reduces the taxable gain. That is the only link between them.
Municipal capital gains tax and its two methods
Until 2021, this tax was worked out with a fixed formula that produced a bill even when the seller had made a loss. The Constitutional Court struck the system down in October 2021. Royal Decree-law 26/2021 replaced it with two calculation methods.
The taxpayer chooses the more favourable of the two. If the real method gives the lower tax base, it applies, but you have to ask the town hall for it and prove it with the deeds. And if there has been no real increase in value, no tax is due, provided you can prove it with the purchase and sale deeds.
- The objective method starts from the cadastral value of the land, not of the whole property. It applies a coefficient that depends on the number of years of ownership. The town hall then applies its rate, capped at 30%.
- The real method starts from the actual gain, the difference between the sale price and the purchase price. It only keeps the share that the land represents in the total cadastral value.
A worked example shows the gap. A home bought for €200,000 and sold for €280,000 after ten years. Total cadastral value of €100,000, of which €40,000 is the land, or 40%. Municipal rate of 29%.
Method | Tax base | Tax due |
|---|---|---|
Objective, coefficient of 0.12 at ten years | 40,000 × 0.12 = €4,800 | €1,392 |
Real, 40% of an €80,000 gain | 80,000 × 40% = €32,000 | €9,280 |
The seller opts for the objective method and pays €1,392 instead of €9,280. That is a difference of €7,888 on the same property, the same sale, the same day. Working out both methods is not optional. It is the only way to know what you owe.
On a single sale, the gap between the two calculation methods reaches €7,888. Working out only one of them is guesswork.
The scale Congress has overturned twice
The coefficient used in the objective method drives the whole result. It has also been the subject of a legislative saga that few sellers know about.
These coefficients must be updated each year by a measure with the force of law, normally the State Budget. With no new Budget passed and the previous one rolled over, the government used royal decree-laws instead. Twice in a row, Congress refused to ratify them.
The second episode deserves attention. Royal Decree-law 16/2025, published on 24 December 2025, raised the maximum coefficients from 1 January 2026, with increases of up to 40% for ownership periods of under fifteen years. Municipal rates were not affected, as each town hall sets its own. Congress refused to ratify the decree, and the repeal was published on 28 January 2026. The higher coefficients therefore only applied from 1 to 27 January 2026. Anyone who sold in that window and whose town hall applied the higher coefficients can ask a gestor or tax adviser whether a correction of their self-assessment is possible. A refund is not automatic.
The scale in force is still the one in article 24 of Royal Decree-law 8/2023. Its shape is unexpected. It does not rise with the length of ownership. It forms a valley.
This curve has a direct practical effect. Selling after seven years means a higher municipal tax bill than selling after thirteen, with the same cadastral value. And reaching twenty years of ownership takes the coefficient to more than four times its low point. If the sale date is open to negotiation, it is worth a look.
Capital gain under income tax
The second tax applies to the actual gain on the sale. It is calculated by subtracting the acquisition value from the transfer value. The result goes into the savings tax base, which has its own progressive scale.
The acquisition value includes the price paid, the purchase taxes, notary and land registry fees, and improvement works backed by invoices. The transfer value is the sale price less the estate agent's commission, the municipal capital gains tax and other selling costs. No invoice, no deduction.
Gain band | Rate |
|---|---|
Up to €6,000 | 19% |
€6,000 to €50,000 | 21% |
€50,000 to €200,000 | 23% |
€200,000 to €300,000 | 27% |
Over €300,000 | 30% |
The top rate rose from 28% to 30% on 1 January 2025, under Law 7/2024. Below €300,000 of gain, nothing changed. The scale works in bands, like ordinary income tax: a €60,000 gain is not all taxed at 23%.
Back to the same home. Purchase price €200,000 and purchase costs €20,000, giving an acquisition value of €220,000. Sale price €280,000, from which you deduct €8,400 of agent's commission, €1,392 of municipal capital gains tax and €150 for the energy performance certificate. The €400 to cancel the mortgage charge relates to the loan, not the sale: the seller still pays it, but it is not deductible.
Line | Amount |
|---|---|
Sale price | €280,000 |
Deductible selling costs | €9,942 |
Transfer value | €270,058 |
Acquisition value | €220,000 |
Taxable gain | €50,058 |
Income tax | €10,393 |
Net proceeds for the seller | €259,265 |
Out of an advertised €280,000, the seller receives €259,265. The two taxes take €11,785, or 4.2% of the price. Non-tax costs add €8,950. In all, 7.4% of the sale price goes on taxes and costs.
Improvement works increase the acquisition value and so reduce the taxable gain. A new kitchen invoiced at €15,000 saves about €3,150 in tax in the 21% band. Without an invoice in the owner's name, the tax office treats the spending as if it never happened. Routine maintenance and repairs do not count, only improvements.
The three cases where the gain is exempt from income tax
Three situations give a full exemption from the national tax on the capital gain. All of them concern your main home (vivienda habitual), never a second home or a let property.
Exemption | Condition | Scope |
|---|---|---|
Reinvestment | Buy a new main home within two years, before or after the sale | Full if everything is reinvested, proportional otherwise |
Over 65 | Sell your main home | Full, with no need to reinvest |
Dación en pago | Hand the property over to the mortgage lender, with no other sufficient assets | Full |
Two details matter. The reinvestment exemption is based on the transfer value, not the gain: reinvesting half of the sale proceeds exempts half of the gain. And over-65s selling a property that is not their main home are not automatically exempt. The exception is if they use the proceeds to buy a secured life annuity, up to a limit of €240,000.
Municipal capital gains tax works differently. There is no exemption for the over-65s. The local finance law does not provide for one, and town halls can only apply the reliefs it allows, such as reductions on inherited property. Ask the town hall which reliefs its tax ordinance applies. A national guide will not tell you.
Non-resident sellers
A seller who is not tax resident in Spain does not file under ordinary income tax but under non-resident income tax. Three rules change.
- The rate is flat, 19% on the gain, with no progressive scale. It applies in the same way to EU residents and to everyone else, despite what many guides say.
- The buyer withholds 3% of the agreed price and pays it to the tax office within a month of signing. This withholding is a payment on account, not an extra tax.
- The seller then has three months to file a return and settle up, roughly four months from the sale. If the withholding exceeds the tax due, the seller claims back the difference.
The reinvestment exemption is still available to non-residents living in the European Union, Iceland, Norway or Liechtenstein, provided they buy a new main home within that area. Since Brexit, this no longer covers residents of the United Kingdom. Selling at a loss does not remove the obligation to file: the return is how you recover the 3% withholding.
How InvestPilot reads it
Exit costs are not something to discover on the day of the sale. They are worth knowing when you buy. They shape what you would keep if you sold one day, and when a sale would cost the least in tax.
Use of the property | Affected | In practice |
|---|---|---|
Main home | Partly | Reinvesting in a new main home cancels the national tax, provided you buy again within two years. |
Second home | Yes | No exemption applies, except converting the proceeds into a life annuity after 65. Otherwise the whole gain is taxed under the savings scale. |
Long-term let | Yes | The depreciation deducted each year lowers the acquisition value used and increases the taxable gain by the same amount. |
Holiday let | Yes | Same effect as a long-term let, with higher running costs to cover. |
Renovate and resell | Yes | Municipal capital gains tax applies even to short ownership periods, and any gain is measured after both taxes. |
InvestScore factors exit costs and taxes, including the applicable municipal rate, into its analysis of every property listed on the site. You see what a sale would actually leave you with, not just the gap between two prices.
This article describes the law as at 21 August 2026 and is not tax advice. The municipal capital gains tax coefficients can be revised each year, and each town hall sets its own rate and reliefs. Before you sell, have a professional such as a gestor or tax adviser confirm your situation, and check the tax ordinance of the town hall concerned.
Sources
BOE · Real Decreto-ley 8/2023, de 27 de diciembre, artículo 24, coeficientes en vigor
BOE · Resolución de 27 de enero de 2026 del Congreso de los Diputados, derogación del Real Decreto-ley 16/2025
BOE · Resolución de 22 de enero de 2025 del Congreso de los Diputados, derogación del Real Decreto-ley 9/2024
BOE · Real Decreto-ley 26/2021, de 8 de noviembre, reforma del IIVTNU
Tribunal Constitucional · Sentencia 182/2021, de 26 de octubre
Real Decreto Legislativo 2/2004 · Ley Reguladora de las Haciendas Locales, artículos 104 a 110
Ley 35/2006 del IRPF · artículos 33 a 38 y 49
BOE · Ley 7/2024, de 20 de diciembre, disposición final séptima, escala de la base del ahorro
Real Decreto 439/2007 · Reglamento del IRPF, artículo 41 bis, vivienda habitual
Agencia Tributaria · Impuesto sobre la Renta de No Residentes, modelos 210 y 211
