When selling you may have to pay income tax on the gain. But there are exemptions that can save you that tax. We explain them.
Taxation · Updated October 2026 · 6 min read
When you sell a home for more than it cost, a capital gain is generated that is taxed in income tax (IRPF). But there are important exemptions.
Broadly: sale value − acquisition value (including the costs and taxes of each transaction and improvements). The IRPF savings scale is applied to that gain.
If you sell your primary home and reinvest the amount in another primary home within the legal period (generally two years), the gain may be exempt for the reinvested part.
The sale of the primary home by people over 65 is usually exempt from income tax. There are also specific rules for life annuities.
Do not confuse this state income tax with the municipal capital gains tax or the other costs of selling. We calculate and plan it for you.
Mainly when you reinvest the proceeds of your primary home in another primary home within the period, or when the seller is over 65 and it is their primary home.
No. The capital gain is taxed in income tax (a state tax) and the municipal capital gains tax is a Council tax. They are different taxes that can coincide in one sale.
It is the difference between the transfer value, i.e. the price minus the sale's costs and taxes, and the acquisition value, the price plus costs, taxes and improvements. The savings scale applies to that gain.
Yes, the gain from selling your primary residence is exempt if you reinvest the amount in another primary residence within two years. Partial reinvestment exempts proportionally.
The sale of the primary residence by people over 65 is exempt. For other homes it may be exempt if the amount is used for a life annuity subject to requirements.
We calculate your capital gain and the applicable exemptions so you don't overpay.