Taxes when you sell a home: plusvalía and IRPF
When you sell, you pay the plusvalía municipal to the town hall where it applies, and IRPF income tax on the gain in the following year's return.
Updated on 17 October 2026 · Tax rules checked on 20 October 2026
General information, not tax or legal advice. For your case, ask a gestor or a lawyer.
What the plusvalía municipal is
The plusvalía municipal (IIVTNU) taxes the rise in value of urban land, not of the whole flat. The seller pays it, unless the contract says otherwise. It is filed with the town hall or the body that collects for it, usually within 30 working days of the deed.
Each town hall sets the rate, up to a legal cap of 30%. TRLRHL art. 107 (RDL 26/2021); coeficientes máximos del RDL 8/2023, art. 24.
Two methods, and you pay the lower one
The objective method multiplies the cadastral value of the land by a coefficient for the years owned and by the town's rate. The maximum coefficients run from 0.09 to 0.4. Your town hall can use lower figures, not higher than that maximum.
The actual gain method starts from the gain on the sale, multiplies it by the share of the cadastral value that is land and applies the same rate. You pay the smaller result. The prices are proven with the deeds. The plusvalía calculator does both sums.
No gain, no tax to pay
When you sell for less than the flat cost you, there is no rise in value to tax. You still have to file and provide the deeds. Do not wait for the town hall to guess.
The purchase costs do not count in the plusvalía comparison the way they count for IRPF. They are different taxes. Do not use the figure from one for the other.
Income tax on the gain
The capital gain is what you receive minus what the flat cost you: the price, the costs and taxes of buying and selling, and any renovations that added value. It is taxed in the savings part of IRPF (income tax), in the following year's return.
The savings scale is 19% up to €6,000, 21% up to €50,000, 23% up to €200,000, 27% up to €300,000, and 30% above that (Ley 35/2006 del IRPF, escala del ahorro (arts. 66 y 76), vigente desde 2025).
It is an estimate until you see the rest of your income. The sale costs calculator gives an approximation if you enter the purchase price.
Main residence: reinvestment and the over-65s
If the flat is your main residence and you put the money into another main residence within the legal deadline, the reinvestment exemption can keep the matching share out of IRPF. If you pay off a mortgage, count what is left after paying it.
The over-65 exemption keeps the gain out of the tax when you are 65 or over and sell your main residence. A second home does not qualify. Your gestor (administrative and tax agent) confirms the finer conditions against the IRPF law.
The year's IBI is agreed
There is no single way to split the IBI property tax for the year of the sale. The contract says who pays it, in full or pro rata. Check it before you sign the arras, not on the day at the notary's.
The bill also gives you the cadastral value of the land, which the plusvalía needs. If you have not yet separated the gain from the asking price, value your flat and then go back to the numbers with your gestor.
Frequently asked questions
Who pays the plusvalía when a flat is sold?
The seller, unless agreed otherwise. It is filed with the town hall, usually within 30 working days. There are two methods and you pay the lower one.
Do I pay plusvalía if I sell for less than I paid?
You should not, because there is no rise in value. You must still file it and prove the prices with the deeds.
Is IRPF paid on the day of signing?
No. The gain goes into the following year's income tax return, on the savings scale. On the day of signing, the price and the agreed charges are paid, and the plusvalía follows within its own deadline where it applies.
Does the over-65 exemption apply to any flat?
No. You must be 65 or over and the flat must be your main residence, under the conditions of the IRPF law. A holiday home does not qualify on its own.
Sources
- TRLRHL art. 107 (RDL 26/2021); coeficientes máximos del RDL 8/2023, art. 24
- Ley 35/2006 del IRPF, escala del ahorro (arts. 66 y 76), vigente desde 2025
- Law 35/2006 on IRPF, main residence
- IBI bill and cadastral value of the land
Don't know what your home is worth yet?
Value it for free in one minute. Porque si vas a vender, está bien saber.
An indicative estimate based on public and market data. It is not an official appraisal.
Methodology