Two years sounds like a comfortable deadline until someone asks when it starts, whether payments made before anything was signed count, and what happens when the new home is still being built. Article 41.3 of the IRPF Regulations (the Reglamento that develops Spanish personal income tax) answers the first question in one sentence and leaves the rest to interpretation. This guide sets out the whole time window, including the situations that fall outside the ordinary case.
The basic window: two years back and two years forward
The reinvestment may be made in one go or in stages, over a period of no more than two years, before or after the date of the sale. Put another way: around the date of the sale there is a band four years wide, two on each side, and any amount put towards the new main home within that band counts.
| Timing | Does it count? | Detail |
|---|---|---|
| Purchase 30 months before the sale | No | Outside the window by six months |
| Purchase 18 months before the sale | Yes | Early reinvestment, fully valid |
| Purchase on the same day, at the same notary | Yes | The cleanest case of all |
| Purchase 22 months after | Yes | Within the deadline, with the tax return already filed |
| Purchase 25 months after | No | Outside, even if only by a few weeks |
Deadlines are counted from date to date, under the civil-law rule for periods expressed in months in article 5 of the Spanish Civil Code: a period that starts on 14 March ends on 14 March of the second following year. It is not twenty-four calendar months counted loosely, nor "two tax years", and that confusion has cost more than one exemption.
For income tax purposes a sale takes place when there is both a title and delivery, and in practice that means the date of the public deed of sale (the escritura signed before a notary), which is when possession is handed over. A private contract signed in December and formalised before the notary in February transfers the property in February, unless an earlier delivery can be proved. It is a detail that moves the transaction from one tax year to another and, with it, the whole window.
Early reinvestment: buying before selling
This is more common than people think, and perfectly valid. Someone who buys the new house in March of one year and sells the old one in October of the next is inside the window, even though the proceeds of the sale arrived after the purchase had been paid for. What is compared is amounts and dates, not the traceability of the bank transfers.
That said, early reinvestment has a condition that later reinvestment does not. The home bought first must have become your main home, with actual occupation within twelve months and three years of continuous residence. And the old home had to remain your main home (or have been so within the two years before the sale) for the sale to fit article 38.1 of the IRPF Act. When the purchase is brought forward a long way, those two conditions begin to pull in opposite directions: nobody can live permanently in two places at once.
| Pattern | Risk worth flagging |
|---|---|
| I buy in January, move in February, sell in September of the following year | Low: the old home was the main home within the two years before the sale |
| I buy in January, keep living in the old one, sell two years less a day later | The new home was not occupied within twelve months. We need to see whether a justified cause applies |
| I buy, let the new one for a year and then move in | High: actual and permanent occupation within twelve months is compromised |
Payments on account and off-plan purchases
The reinvestment can be made in stages: a single payment is not required. Amounts paid on account to the developer, the arras (the deposit paid on signing the reservation contract), stage payments during construction and the final payment on the deed each count on their own date. What matters is that every euro went into the new home within the two-year band.
That is where the situation that raises the most doubts appears: buying off-plan with delivery later on. The tax authorities have tended to require the reinvestment to materialise within the deadline, understood as the payment of the amounts, and to treat that as a separate question from when the home is legally acquired. It is an area where there have been court rulings and administrative positions that have not always pointed the same way, and we are not going to sum it up here with a closed rule that later fails to hold. The honest thing is to say it as it is: if your reinvestment goes through a home under construction, the case needs looking at beforehand, not afterwards, and the analysis has to start from the actual contract and the payment schedule.
When the money is used to build on your own land or to renovate, the legal fit is different, and the deadlines specific to those cases (the ones for completion of the works) are laid on top of the two years of the reinvestment. A delay by the builder can leave outside a transaction that was well planned. It is one of the scenarios in which it pays to have the analysis in writing before you start, and even then the outcome of a review cannot be guaranteed.
Sales in instalments or with deferred price
The Regulations expressly deal with a sale whose price is not collected all at once: the reinvestment is treated as made within the deadline when the instalments are put towards the new home within the tax year in which they are received. It is a generous rule, because it moves the clock at the pace of collection instead of anchoring it to the date of the deed.
The price of that generosity is administrative: each instalment collected opens its own obligation to reinvest within that same year, and you have to document how what was received matches what was applied. Someone who sells with the price deferred over three years and reinvests everything in the first year does not automatically fit the rule; someone who collects and reinvests year by year does.
The deadline running alongside: the twelve months to move in
On top of the two years for reinvesting there is a second clock that almost nobody writes in the diary: the actual and permanent occupation of the new home, which has to happen within twelve months of the purchase or the completion of the works. The two deadlines are independent and are met, or missed, separately.
| Clock | Starts from | Length | What happens if it is missed |
|---|---|---|---|
| Reinvestment | Date of the sale | Two years, before or after | Proportional exemption on what was reinvested in time |
| Moving into the new home | Purchase or completion of the works | Twelve months | The property is not a main home and the exemption falls away |
| Staying in the new home | Actual occupation | Three continuous years | The same, unless a circumstance requires the move |
The three clocks run together. A reinvestment made perfectly in time can fail on the second, and a case that is flawless on the first two can get complicated on the third if there is a job move eighteen months in. For the staying period the Regulations provide the same circumstances that release you from the three-year period in the home you sold, and those circumstances are explained in how to prove it was your main home.
The deadline when an inheritance or a divorce is involved
Two situations throw the calendar out more than people expect. The first is an inherited home: the date of acquisition for income tax purposes is the date of death of the person who left it, not the date of the deed accepting the inheritance or of its registration, and the twelve months to move in and the three years of residence run from then. Someone who takes eighteen months to accept the inheritance and sign the deed has already used up the first of those deadlines without knowing it.
The second is the ending of co-ownership or the award of the home in a divorce. When one spouse buys the other's half, the half being bought has its own acquisition date for the buyer, which sits alongside the date of the original half. If the whole house is sold later, there are two acquisitions with two different holding periods, and the main home analysis has to be done on the whole. It is not an insurmountable obstacle, but it is one more layer of work that nobody anticipates when signing the separation agreement.
What to do if the deadline is about to run out
- Look at the calendar six months ahead, not six weeks ahead. A property purchase with a mortgage rarely closes in under two months, and the deadline cannot be extended.
- Remember that partial reinvestment counts. If you cannot reach the full amount, reinvesting whatever you can within the deadline exempts its proportional share. Letting the time run out exempts nothing.
- Do not confuse reserving with paying. A deposit paid within the deadline counts for its amount; a reservation signed without any payment does not.
- Record the date of every payment. Bank transfers with a clear reference, not cash.
When the deadline passes without reinvestment, the failure has its own procedure and its own timetable for putting things right, which we cover in how to claim it, and what happens if something fails. Getting ahead of that correction changes the cost: it is the difference between a surcharge and a penalty, as we explain in surcharge, interest and penalty.
If you have a sale behind you and the clock is running, tell us through the reinvestment form with the dates and the figures: the first thing we do is draw the actual timetable for your case and tell you how much margin is left. That assessment does not promise a result, but it stops the deadline being used up while you decide. The overall picture is on the page on main home reinvestment.