CasaCifras › Capital gains tax on selling a property
Capital gains tax on selling a property
Work out the capital gain and the income tax (IRPF) a Spanish tax resident pays on selling a home, with the 2026 savings scale and the main exemptions.
How it is calculated
The capital gain is the difference between what you get from the sale and what the home cost you:
- Sale value = sale price minus the costs and taxes you pay as seller (estate agent, plusvalía tax, notary if you pay it).
- Purchase value = purchase price plus the taxes and fees of the purchase and any improvements you can prove with invoices.
For Spanish tax residents, the gain is taxed in the savings band of income tax (IRPF) with this scale for 2026 (state plus regional):
| Gain | Rate |
|---|---|
| €0 – €6,000 | 19% |
| €6,000 – €50,000 | 21% |
| €50,000 – €200,000 | 23% |
| €200,000 – €300,000 | 27% |
| Over €300,000 | 30% |
Example
You bought for €150,000 with €12,000 of costs and sell for €250,000 with €9,000 of costs. The gain is 241,000 − 162,000 = €79,000. The tax is 19% of €6,000 (€1,140) + 21% of €44,000 (€9,240) + 23% of €29,000 (€6,670) = €17,050.
When you pay nothing
- If you are 65 or over and sell your main home, the gain is exempt.
- If you reinvest the proceeds in a new main home, usually within two years, the gain is exempt in proportion to the amount reinvested. If you had a mortgage, the amount to reinvest is the proceeds minus the loan you pay off.
- If you make a loss, there is no tax, and the loss can offset other savings income gains.
Non-residents
Non-residents do not pay IRPF but non-resident income tax (IRNR), and the buyer must withhold part of the price and pay it to the tax agency. This calculator does not cover that case: ask a tax adviser before you sell.
Frequently asked questions
When is the tax paid?
In the income tax return for the year of the sale, filed the following spring. A sale in 2026 goes in the 2027 return.
Is plusvalía tax deductible?
Yes. The plusvalía tax you pay as seller is a selling cost and reduces the capital gain for income tax.
What counts as a main home?
In general, a home you have lived in continuously for at least three years. There are exceptions, for example for a change of job or a separation.
Does this apply to non-residents?
No. Non-residents pay non-resident income tax instead, and the buyer withholds part of the price. This calculator does not cover that case.
Sources: Law 35/2006 on IRPF (articles 33, 35, 38, 66 and 76) and the Spanish Tax Agency income tax manual. Savings scale in force since 2025. Checked on 26 November 2026.