Income tax when selling a home in Spain, and when the gain is exempt
How the sale of a home is taxed in the income tax return of a Spanish resident, and the two main exemptions: reinvestment in a main home and sellers over 65.
In brief
- A Spanish resident who sells a home at a gain must declare it in the income tax (IRPF) return for the year of sale.
- The gain on a main home may be exempt if the proceeds are reinvested in another main home within two years.
- People over 65 pay no tax on the gain from selling their main home.
A seller faces two taxes on the sale of a home: plusvalía municipal, collected by the town hall, and the capital gain, declared in the income tax return. This article deals with the second, for residents in Spain.
How the gain is calculated
The gain or loss is the difference between the transfer value and the acquisition value. From the first, the costs and taxes of the sale paid by the seller are deducted; to the second are added those paid on purchase and the investments and improvements made. Keep your deeds and invoices.
The gain is declared in the income tax return for the year in which the sale takes place.
Exemption for reinvestment in a main home
If you sell your main home and reinvest the total amount obtained in buying another main home, the gain may be exempt. The essentials:
- The period for reinvesting is two years, which may be before or after the sale.
- If you reinvest only part, the exemption applies in that proportion.
- For these purposes, you are treated as selling your main home if it is your main home at that time or was so until any day in the two years before the sale.
Exemption for those over 65
Gains obtained by people over 65 on the sale of their main home are exempt, with no need to reinvest.
What counts as a main home
For tax purposes, as a general rule, it is the home in which you have lived continuously for at least three years, with the exceptions provided for in the rules.
If you are not resident in Spain
You are not taxed under IRPF but under Non-Resident Income Tax, with a 3% withholding by the buyer. See selling as a non-resident.
Before selling
Run the figures with your adviser before settling the price and the date. And do not forget the other tax: plusvalía municipal.
This article summarises general rules. Each case has nuances that a tax adviser should review.
Frequently asked questions
How is the gain calculated?
As the difference between the sale value and the acquisition value, taking into account the costs and taxes paid in each case.
How long do I have to reinvest?
Two years, which may be those after or those before the sale of the main home.
What if I am not resident in Spain?
You are taxed under Non-Resident Income Tax, and the buyer withholds 3% of the price.
Sources
This article is part of the guide Legal, tax and other useful topics.
This article provides general information as at the date shown and is not a substitute for professional advice. Every transaction is different: please review your case with a lawyer or tax adviser.
About the author
Luis Alberto Barrionuevo Pitarch
Economist, member of the Spanish Colegio de Economistas (no. 5631), and founder of GBN Real Estate | Grupo Barrionuevo. He handles property transactions on the Costa del Sol, with particular attention to legal and planning certainty.
