Spain home sale tax (IRPF) calculator
The capital gain, the reinvestment and age exemptions, and the IRPF due with the 2026 savings scale.
IRPF on the sale
€13,715.00
on a gain of €64,500.00: 21.3% of the gain
- Gain of €64,500.00
- Average rate 21.3%
- Paid with the following year’s return
You sell for €280,000.00 and you pay €10,500.00 of costs: the transfer value is €269,500.00. The acquisition value, with costs and works, is €205,000.00. The capital gain is €64,500.00. That gain is taxed at 19% on €6,000.00, at 21% on €44,000.00 and at 23% on €14,500.00: €13,715.00 of IRPF.
The tax is paid with the income tax return of the year after the sale: the gain goes into the savings base and, in a sale between private individuals, the buyer withholds nothing from you (article 99 of the law). The municipal plusvalía is a different tax, the town council’s, and is deducted here as a cost of the sale.
- To leave the gain exempt you would have to buy another main residence worth at least €209,500.00 in the two years before or after the sale: it is the sale minus the outstanding mortgage (Regulation, article 41).
What happens to the gain
- You keep€50,78579%
- IRPF€13,71521%
I’m not an accountant or a financial advisor. This is an estimate, for information only. Check with a professional before you decide.
Show the detailsHide the details
| Sale price | €280,000.00 | |
|---|---|---|
| − | Sale costs and taxes you payincluding the municipal plusvalía if you have to pay it (article 35.2) | €10,500.00 |
| = | Transfer value | €269,500.00 |
| − | Acquisition valuepurchase price + purchase costs and taxes + improvement works (article 35.1) | €205,000.00 |
| = | Capital gain | €64,500.00 |
| 19% on €6,000.00 | €1,140.00 | |
| 21% on €44,000.00 | €9,240.00 | |
| 23% on €14,500.00 | €3,335.00 | |
| = | IRPF on the sale | €13,715.00 |
How it works
- The capital gain is the difference between the transfer value and the acquisition value (article 34 of the IRPF law). The transfer value is the actual sale price minus the costs and taxes of the sale paid by the seller: agency, notary and registry if you pay them, energy certificate and the municipal plusvalía. The acquisition value is the purchase price plus the costs and taxes of the purchase (notary, registry, ITP or VAT and AJD, agency, without interest) plus improvement works, minus depreciation if the home was rented out (article 35).
- There are three exemptions. If you sell your main residence at over 65, or with severe or major dependency, the gain is exempt without reinvesting (article 33.4.b). If you sell your main residence and reinvest the amount obtained in another main residence within two years, before or after the sale, the gain is exempt in proportion to what is reinvested; the amount to reinvest is the transfer value minus the capital of the mortgage that was left (articles 38.1 of the law and 41 of the regulation). And if you bought the property between 05/12/2012 and 12/31/2012, 50% of the gain is exempt (additional provision 37).
- The gain that is taxed is added to the savings tax base and pays the scale of articles 66 and 76: 19% up to €6,000, 21% from €6,000 to €50,000, 23% from €50,000 to €200,000, 27% from €200,000 to €300,000 and 30% above, each rate only on the part that falls in its bracket, stacked on top of your other savings income. The IRPF on the sale is the tax with the gain minus the tax without it.
Worked example
You sell for €280,000 and pay €10,500 of costs: the transfer value is €269,500. You bought for €180,000, with €15,000 of costs and €10,000 of works: €205,000. The gain is €64,500. With the savings scale: 6,000 × 19% = €1,140, 44,000 × 21% = €9,240 and 14,500 × 23% = €3,335, €13,715 in all (21.3% of the gain). If it is your main residence with a €60,000 outstanding mortgage and you reinvest €209,500 or more in another, you pay nothing.
Sources
- Law 35/2006 on IRPF, consolidated text: arts. 33.4.b, 34, 35, 38, 49, 66, 76 and additional provision 37 (BOE) (in Spanish)
- IRPF Regulation (Royal Decree 439/2007), arts. 41 and 41 bis: reinvestment and the main residence (BOE) (in Spanish)
- Tax Agency, Renta 2025 practical manual: general rules for calculating the capital gain or loss (in Spanish)
- Tax Agency, Renta 2025 practical manual: exemption for reinvestment in a main residence (in Spanish)
- Royal Legislative Decree 2/2004, Local Finance Law: municipal plusvalía (arts. 104 to 110) (BOE) (in Spanish)
Text checked on October 6, 2026
Good to know
- This is an estimate of the IRPF on a sale with the 2026 law for residents of Spain. The official figure comes from the Tax Agency’s tax return program, which also applies your personal and family minimum and your other income.
- The personal and family minimum (€5,550 at least) is not taken into account: it is assumed to be covered by the rest of your income. If your income for the year without this sale is low, you will pay somewhat less.
- If the home was rented out, depreciation must be subtracted from the acquisition value, at least 3% a year of the higher of the acquisition cost and the cadastral value without land. This page does not know about it.
- An inherited or donated home has another acquisition value, that of the Inheritance and Gift Tax, and another acquisition date. The page does not calculate that either.
- The municipal plusvalía (Tax on the Increase in Value of Urban Land) is set by each town council, at any rate up to 30% and with maximum coefficients that change by law: it is a different tax from IRPF and the seller is the taxpayer (articles 106 and 108). What you pay for it is deducted from the gain.
- The over-65 exemption requires that the home has been your habitual residence for at least three years in a row and that you were its full owner, even with others: with the property split between bare owner and usufructuary it does not apply. If you stopped living in it, you have two years to sell it without losing the right (Renta 2025 manual).
- If the seller does not live in Spain there are other rules (the buyer withholds 3% of the price): this page is for residents.
Frequently asked questions
How much IRPF is paid when selling a home?
The capital gain, that is, the transfer value minus the acquisition value, is taxed in the savings base: 19% up to €6,000, 21% up to €50,000, 23% up to €200,000, 27% up to €300,000 and 30% above. With no gain or with an exemption, nothing is paid.
When is the sale of a main residence exempt?
If the seller is over 65 or has severe or major dependency, or if they reinvest the amount obtained in another main residence within two years, before or after the sale. With partial reinvestment, only the proportional part is exempt.
How much do I have to reinvest if I still owe a mortgage?
The transfer value minus the capital of the mortgage still unpaid at the sale: what is used to cancel it does not count as partial reinvestment (IRPF Regulation, article 41).
What is a main residence for these exemptions?
The building that has been your residence for a continuous period of at least three years, with some exceptions for justified reasons such as a job relocation or marriage (IRPF Regulation, article 41 bis).
Is the municipal plusvalía deducted from the gain?
Yes: the plusvalía you pay as seller is a tax inherent to the transfer and is deducted from the transfer value, as the Tax Agency’s practical case shows.