What the statute says
Article 38.1 of the Spanish income tax act exempts the capital gain arising on the transfer of your main home, provided the total amount obtained is reinvested in acquiring a new main home. The detail sits in article 41 of the implementing regulations.
Put plainly: sell the place you live in, buy another to live in, and the gain is not taxed. But four conditions have to be met, and each of them has to be capable of being proved years later.
| Requirement | What it means |
|---|---|
| The property sold was your main home | Continuous residence for at least three years, unless circumstances necessarily required the move, and actually occupied within twelve months of buying or finishing the works |
| The new one becomes your main home too | Same test, applied to the new property |
| You reinvest the amount obtained | Not the gain: the whole sale proceeds, reduced by any outstanding mortgage cancelled out of them |
| Within two years | Before or after the sale. The two years run backwards as well as forwards |
Reinvestment may take place in the two years before the sale or the two years after it. Anyone who bought first and sold afterwards still qualifies, and that is forgotten often enough to be worth saying twice.
The calculation, and the mortgage trap
What has to be reinvested is the amount obtained on the sale — but that amount is reduced by the outstanding principal of any loan cancelled out of the price. This is the point that generates more assessments than any other, because people reinvest what actually reached their bank account and assume the relief is complete.
| Item | Example |
|---|---|
| Sale price | 300,000 € |
| Outstanding mortgage cancelled | −120,000 € |
| Amount to be reinvested | 180,000 € |
| Acquisition value of the old home | 200,000 € |
| Capital gain | 100,000 € |
Reinvest 180,000 € or more and the whole gain is exempt. Reinvest less and the relief is proportionate: put 90,000 € of the 180,000 € into the new home and half the gain — 50,000 € — is exempt, with the other half taxed in the savings base.
What else counts as reinvestment
- Rehabilitation of the property that is to become your main home, where the works fall within the regulatory definition of rehabilitation. Not every refurbishment does.
- Construction, with its own completion deadlines.
- Extension of the home that already is your main one, in defined circumstances.
- Payments on account made inside the window, even where the deed comes later.
Paying down the mortgage on a home you bought years ago is not reinvestment: the reinvestment has to occur inside the two-year window. Nor does buying a property that is not going to be your main home, however residential it is. A holiday flat is not a main home, and neither is one bought to let.
Three situations that change the answer
You are over 65
If you are over 65, the gain on the transfer of your main home is exempt without any need to reinvest. It is a separate and much simpler relief, and it is worth establishing which of the two applies before organising anything, because the planning is entirely different.
You are not resident in Spain
Residents of the European Union, Iceland, Norway and Liechtenstein can claim the reinvestment exemption in respect of what was their main home in Spain, on the same conditions. The difficulty is evidential: you have to show that the Spanish property really was your main home, which means assembling the proof — municipal registration, utility consumption, tax address — well before the sale rather than after it. This is declared through form 210 on the sale.
Divorce, a job move, a change in care needs
The three-year requirement falls away where circumstances necessarily require the change of address. That word is doing the work: it is not enough that moving was sensible or convenient. There is a large body of administrative doctrine on what is accepted and what is not, and it is the ground on which these cases are most often fought.
How it is claimed
The relief is claimed in the return for the year in which you sell:
- The full capital gain is declared.
- Where reinvestment has not yet happened, you tick the intention to reinvest and state the amount you are committing.
- If in the end you do not reinvest, or reinvest less, you correct the position by filing an amended return for the year of sale, with interest.
Failing to record the intention to reinvest in the return for the year of sale. If it is not stated, the administration takes the gain to be taxable, and putting that right afterwards requires a procedure that does not always succeed. It is declared properly the first year or it becomes very difficult.
Your case, in two minutes
Your main-home rollover: your map of obligations
The form for this service asks only what matters here. At the end you have your map of obligations, the deadlines running against you and a fixed price.
What your main-home rollover costs
| Work | Price |
|---|---|
| Consultation: we review your case and tell you whether you qualify and what is missing | 92 € |
| Written opinion: full analysis, with the calculation, the deadlines and the doctrine | 370 € |
| Reflecting it in your income tax return | Fixed quote |
| Answering a query from the tax office about the reinvestment | from 290 € |
Taxes included. The consultation is credited against the written opinion if you go ahead with it.
The evidence file, which is built before the sale
Every requirement in this relief is a question of fact, and facts are proved with documents that existed at the time. What we ask for, and what a review will ask for, is broadly the same list: the municipal registration history showing who lived there and from when; utility bills showing real consumption rather than a standing charge; the tax address declared in those years; the deeds of both properties; and, where the three-year rule is being disapplied, the documentation of the circumstance that required the move — the court order, the employment contract, the medical or care assessment.
The weak point is almost always the new property. Claiming the relief commits you to making the new home your main one within twelve months and living in it, and that has to remain true afterwards. Buying a property, claiming the relief and letting it out is the fact pattern that produces the assessments, and it produces them several years later, when the letting has been reported by someone else.
Where this sits alongside everything else
Selling a home sets off more than one tax. The gain is income tax, and this relief is about that. The town hall separately taxes the increase in the land value, which is dealt with on its own page and is not affected by this exemption at all. And if you are not resident here, the sale is declared on form 210 and 3 % of the price will have been withheld by the buyer. People who plan for the relief and forget the municipal tax are surprised by a bill that the exemption does nothing to remove.
Questions we are asked about your main-home rollover
Does the time I lived there before marrying count? What counts is continuous habitual residence for three years in the property being sold, whatever your personal circumstances were. What has to be provable is actual residence: municipal registration, utility bills, tax address.
I bought the new one before selling the old one. Does that work? Yes. Reinvestment may occur in the two years before the transfer. It is the limb of the relief that goes to waste most often.
Do I reinvest the gain or the whole price? The amount obtained on the sale, reduced by the mortgage cancelled out of it. Not the gain. That distinction decides whether the relief is full or partial.
I am renting for a few months between the two homes. That does not defeat the relief, provided the new property becomes your main home within twelve months of its acquisition and the reinvestment deadline is met.
And if I end up not reinvesting? You correct the year of sale by amended return, with late payment interest. Doing it on your own initiative avoids a penalty, as we explain on filing late.