Ladrillómetro
ES
✎

Capital gains on selling a rented flat in Spain: income tax and plusvalía municipal

The two taxes on selling a flat you have let: income tax on the gain, with depreciation subtracted, and the plusvalía municipal, with the 2026 coefficients.

TAX · 11 MIN READ

Capital gains tax on selling a rented flat in Spain is really two taxes: income tax (IRPF) on the capital gain, worked out by subtracting from the acquisition value the depreciation that applied while the flat was let, and the plusvalía municipal, which the town hall charges on the land. The seller pays both. In our example, a flat bought for €150,000 and sold ten years later for €182,849 leaves a gain of €28,606.55, with €5,887.38 of income tax and €1,350 of plusvalía municipal.

For the municipal part of your case, use the plusvalía municipal calculator, which applies each town hall’s rate and coefficients; to see whether selling beats keeping the flat let, the rental yield calculator. Below: how much you pay, how each tax is worked out and who pays it.

How much tax do you pay when selling a flat?

It depends on how much the flat has gained, how much depreciation you have had and your town hall. With Ladrillómetro’s reference flat (€150,000 price, €15,000 of purchase costs and €5,000 of refurbishment), let for ten years and sold for €182,849 (2% more each year, the scenario in the IRR and NPV guide), the figures are:

ItemSale up to 30/11/2026Sale from 1/12/2026
Plusvalía municipal (30% rate)€1,350€2,475
Capital gain for income tax€28,606.55€27,481.55
Income tax on the gain€5,887.38€5,651.13
Total tax on the sale€7,237.38€8,126.13

The plusvalía municipal rises by €1,125 if you sell from 1 December, because the maximum coefficients change; since it is subtracted for income tax, the total cost rises by €888.75. After tax and 5% selling costs you keep €166,469.17; if you still owe the €72,102 mortgage of the IRR example, €94,367.17 in hand.

How do you calculate the gain on selling a rented flat?

For income tax, the capital gain is the difference between the transfer value and the acquisition value (article 35 of the Income Tax Act):

Gain = (sale price − selling costs and taxes) − (purchase price + purchase costs and taxes + improvements − depreciation)

  • Transfer value: the price in the deed, as long as it is not below market value, minus the selling costs and taxes you pay. The Tax Agency manual, in its worked case, subtracts the plusvalía municipal paid by the seller.
  • Acquisition value: the purchase price plus purchase costs and taxes (ITP transfer tax, notary, registry, no interest) and improvements, minus depreciation.

For the reference flat, sold before 1 December:

StepAmount
Sale price€182,849
− Selling costs (5%: agent, certificates…)−€9,142.45
− Plusvalía municipal−€1,350
= Transfer value€172,356.55
Price + purchase costs + refurbishment€170,000
− Depreciation over 10 years (€2,625 a year)−€26,250
= Acquisition value€143,750
Capital gain€28,606.55
Waterfall of the gain on the reference flat: sale price €182,849, minus €9,142 of costs and €1,350 of plusvalía municipal, transfer value €172,357, minus €170,000 of acquisition value, plus €26,250 of depreciation, gain of €28,607
From sale price to capital gain, with accumulated depreciation; income tax with and without subtracting it, and plusvalía municipal before and after 1/12/2026. Original Ladrillómetro chart with the assumptions in the box below.

Without depreciation, the gain would be just €2,356.55. That is the costliest mistake when selling a flat you have let.

Why does depreciation increase the gain?

Because while you rented it out you deducted the flat’s depreciation each year against rental income (3% of the building cost, excluding land, under article 14 of the Income Tax Regulation), and on sale the law takes it off the acquisition value. Article 40 of the Regulation adds that the minimum depreciation is counted «in all cases», whether or not you deducted it. For a let flat, the Tax Agency sets it at 3% a year since 2003 in its general calculation rules.

In the example: 3% of a building assumed at 50% of €165,000 (€82,500) is €2,475 a year, the figure in the deductible rental expenses guide. There we left the refurbishment out for simplicity, but if it was an improvement it is also depreciated (€150 a year) and it counts on sale: €2,625 a year and €26,250 over ten years.

Is it worth it? With the 50% reduction and an assumed 30% marginal rate, that depreciation saved you about €3,937.50 of income tax over ten years, and on sale it raises the tax by €5,439.64. It is not a way to pay less: it is a deferral you partly pay back. One nuance: the Supreme Court (judgment of 20 November 2025, appeal 7361/2023, cited by the Tax Agency itself) accepts a minimum depreciation below 3% in certain cases where the 1998 tables were used; if that is yours, ask an adviser.

How much income tax is due on the gain in 2026?

The gain on a sale goes to the savings base (article 46) and is taxed with the state and regional scales of articles 66 and 76, unchanged since Ley 7/2024, which raised the top band to 30% in 2025:

Savings baseTotal rate
Up to €6,00019%
€6,000 to €50,00021%
€50,000 to €200,00023%
€200,000 to €300,00027%
Over €300,00030%

With a €28,606.55 gain and no other savings income: €6,000 at 19% (€1,140) plus €22,606.55 at 21% (€4,747.38) gives €5,887.38, a 20.6% effective rate. Without subtracting depreciation it would be €447.74. It goes in the tax return for the year of the sale (the 2026 return is filed in 2027), so set the money aside when you are paid.

Three things that do not help on a let flat: the reinvestment exemption and the over-65 exemption are only for your main home, and the new exemption for selling to public bodies under Royal Decree-law 29/2026 requires the home to have been empty for the previous two years. If you sell at a loss, it is offset against other gains and losses of the year and, up to 25%, against savings income, with any remainder carried forward four years (article 49). For tax on the rent while you let, see the rental income tax guide.

How is the plusvalía municipal calculated?

The tax on the increase in value of urban land (IIVTNU) taxes only the land and is governed by articles 104 to 110 of the Local Finance Act. There are two methods and you pay the lower:

  • Objective (article 107): cadastral land value (on the IBI bill) × a coefficient for the full years you owned the flat × the town hall rate, at most 30% (article 108).
  • Real (article 107.5): sale price minus purchase price, without costs, times the share of the cadastral value that is land × the rate.

If you sell for no more than you paid, there is no increase and nothing to pay, although you must file it with both deeds (article 104.5). The maximum coefficients change this month: for sales up to 30/11/2026 those of Royal Decree-law 8/2023 apply (0.12 for 10 years) and from 1/12/2026 those of Royal Decree-law 29/2026, already ratified (0.22 for 10 years). If your town hall’s bylaw has a higher one, the maximum applies.

In the example (cadastral value €75,000, €37,500 of land; bought on 15/10/2016):

MethodSale on 27/11/2026Sale on 14/12/2026
Objective: €37,500 × coefficient × 30%€4,500 base → €1,350€8,250 base → €2,475
Real: €32,849 × 50% × 30%€16,424.50 base → €4,927.35€16,424.50 base → €4,927.35

Open this example in the calculator

The link fills in prices, dates and cadastral values with «Another municipality» and the 30% rate. You will see €1,350 under the objective method; change the sale date to 14/12/2026 and you will see €2,475. Choose your municipality to use its rate and coefficients.

It must be filed with the town hall within 30 working days of the sale (article 110). The home selling costs calculator adds up plusvalía, income tax and mortgage cancellation, but does not subtract depreciation: on a let flat, add it to the gain yourself.

Who pays the plusvalía: the buyer or the seller?

The seller. In a sale, the taxpayer for the plusvalía municipal is whoever transfers the property (article 106.1.b), and the income tax gain is theirs. Two nuances:

  • Non-resident seller: the buyer becomes the substitute taxpayer (article 106.2) and answers to the town hall; in practice, they withhold it from the price.
  • Clause in the contract: you can agree that the buyer pays it, but that agreement has no effect before the tax authorities (article 17.5 of the General Tax Act): if they do not pay, the town hall claims it from you. And since you did not pay it, you cannot subtract it from the transfer value for income tax (article 35.2).

Methodology: guide written by the Ladrillómetro team from the BOE legislation and the Tax Agency manual cited. It is a tax topic and has not been reviewed by an outside adviser: check your case with your adviser or the Tax Agency. Figures recalculated on 23/11/2026 with our own script and the plusvalía calculator’s engine.

Run your own numbers

Pick your municipality, enter your dates, prices and cadastral values and see how much plusvalía municipal you pay. Free, no sign-up.

Open the plusvalía municipal calculator

For information only; this is not financial or tax advice.

FREQUENT QUESTIONS

Frequently asked questions

How much tax do you pay when selling a flat in Spain?

Two taxes: income tax on the gain (19% to 30% depending on the band) and the plusvalía municipal. In our example, a flat let for ten years and sold for €182,849 pays €5,887.38 of income tax and €1,350 of plusvalía municipal if sold before 1 December 2026.

Who pays the plusvalía: the buyer or the seller?

The seller (article 106 of the Local Finance Act). If the seller is not resident, the buyer is the substitute taxpayer and answers to the town hall. You can agree that the buyer pays it, but the agreement has no effect before the authorities (article 17.5 of the General Tax Act).

Do I have to subtract depreciation even if I did not deduct it?

Yes. Article 40 of the Income Tax Regulation requires the minimum depreciation to be counted «in all cases», whether or not you deducted it. For a let flat, the Tax Agency sets it at 3% a year since 2003.

Do I pay plusvalía municipal if I sell at a loss?

No. If the sale price is not above the purchase price, there is no increase and the sale is not taxed (article 104.5 of the Local Finance Act), but you must file it with the town hall with the purchase and sale deeds.

Can I deduct the plusvalía municipal on my tax return?

Yes, if you pay it as the seller: it is a tax on the sale that is subtracted from the transfer value (article 35.2 of the Income Tax Act), as the Tax Agency does in its manual’s worked case. In the example, paying €1,125 more plusvalía municipal only makes the sale €888.75 dearer.

More guides