Skip to content

The two-year window

I bought the new home before selling the old one: does it count?

Yes: what you obtain on the sale can pay for a home bought in the two previous years, but you have to prove where the money went and the dates.

Carmen Vidal, a nurse in Murcia, found the house she was looking for in Molina de Segura in October 2025 and did not want to risk losing it while waiting to sell her flat in El Carmen, a district of Murcia. She bought it on 10 October for 240,000 €, plus 18,000 € of costs. She paid for it with 30,000 € of savings, a 150,000 € bridging loan the bank gave her for twelve months and a 78,000 € mortgage. She moved in in November. On 20 May 2026 she sold the flat: 205,000 € net of costs, with no mortgage outstanding and a gain of 85,000 €. With the money she paid off the bridging loan and repaid part of the mortgage. Her question is whether all of this counts as reinvestment, when the new house had already been bought seven months earlier.

The rule almost nobody applies

Article 41.3 of the Regulations on IRPF (Spanish personal income tax), in its last paragraph, says that the exemption also covers "the amounts obtained on the disposal that are used to pay the price of a new main home that was acquired within the two years before the transfer". Reinvestment, therefore, does not require you to sell first. Someone who buys first and pays afterwards with what they obtain on the sale can claim it all the same.

It is the case most often missed, because intuition says the opposite: if the new house has already been bought, it seems that the sale money "is no longer being reinvested in anything". The rule does not see it that way. What it requires is that what was obtained is used to pay the price of that home bought earlier, and that is exactly where the difficulty lies.

What has to be proved

For Carmen to be able to apply the exemption, four facts have to be present, and provable:

  1. That she bought the house in Molina within the two years before the sale. Between 10 October 2025 and 20 May 2026 there are a little over seven months: she meets it.
  2. That the house in Molina is her new main home: she has lived in it since November 2025, within the twelve months of article 41 bis.2, and she will have to go on living in it for three years.
  3. That the flat in El Carmen was her main home when she sold it or had been in the two years before the sale.
  4. That the sale money was applied to paying the price of the new house.

The first three are a matter of dates and proof of residence, which we deal with in the guide on how to prove your main home. The fourth is the one that causes disputes.

The order of the moves matters

Someone who buys before selling spends a period with two homes. Carmen left the flat in November 2025, so on the day of the sale she was no longer living there. The exemption is not lost because of that: article 41 bis.3 of the Regulations treats the transfer as a transfer of the main home if it was the main home "until any day in the two previous years" before the sale. Carmen sold six months after moving and is covered.

The problem arises when the sale is delayed. If the old house takes more than two years to sell from when you left, it is no longer regarded as your main home and there is no exemption to save, even if the new one is still yours and you have paid its price with the sale. And if you let the old one while you wait for a buyer, be clear that the rental does not interrupt the count of the two years, but it does produce income that has to be declared.

Where the money went: this is where the nuance lies

The rule speaks of amounts used to "pay the price". When the buyer still owes part of the price to the seller, for example a deferred payment, it fits without effort. But the usual situation is Carmen's: the seller in Molina was paid everything in October, with money from a loan, and the sale money is then used to repay that loan to the bank.

How the new house was paid forWhat is done with the saleWhat it helps to be able to prove
Part of the price deferred with the sellerThat deferred amount is paidPurchase contract and proof of payment
Bridging loan linked to the purchaseThe loan is paid offThat the loan financed that purchase and was paid off with funds from the sale
Mortgage on the new homeIt is partly repaidWhat the mortgage was for and the movement of funds
All with own savingsNothing is outstandingThe most debatable case: there is no price left to pay

That paying off a loan that financed the purchase is equivalent to paying the price is a reasonable reading, and it is the one we put forward when the chain of money can be seen clearly, but it is not beyond dispute and we do not guarantee that Hacienda, as the Spanish tax office is commonly called, will share it. The more direct the link between loan, purchase and repayment, the better defended it is.

Do not pay off the loan with other money before selling

If Carmen had repaid the bridging loan with an inheritance in March 2026, by May there would have been nothing of the price left to pay with the sale. The exemption would be seriously compromised even if the new house remained her main home. Until the sale is signed, the prudent course is not to repay the financing of the new home with funds that do not come from the sale.

Carmen's figures

Carmen obtained 205,000 € and her gain was 85,000 €. Let us look at the possible readings:

  1. If everything she applied to financing the new house is accepted as reinvestment (150,000 € of bridging loan and 55,000 € of mortgage repayment), she has reinvested 205,000 €. The gain is fully exempt.
  2. If only the repayment of the bridging loan were accepted, the reinvestment would be 150,000 €. The exempt part would be 85,000 × 150,000 ÷ 205,000 = 62,195.12 €, and 22,804.88 € would be taxed.
  3. If Hacienda considered that the price had been paid in full in October and nothing afterwards is reinvestment, the whole exemption would be disputed.

The first reading is the one with most support in the purpose of the rule; the third, the strictest. The 30,000 € of savings Carmen put in in October do not count as reinvestment of this sale, because they do not come from it. Do I have to reinvest the gain or the whole price? explains why the figure to be covered is the amount obtained and not the gain.

As Carmen applied the money in 2026, the same year as the sale, she does not have to record any intention to reinvest: the reinvestment has already been made when she files her 2026 return. If she had received the sale money in December and paid off the loan in January, she would have to tick it.

To review the paperwork for a purchase made before the sale, the reinvestment form lets you send us both deeds, the loan agreement and the bank statements for the period.

How to prepare the file

Someone about to buy before selling can make things much easier. It helps to ask the bank to set up the bridging loan expressly to finance the purchase of that home, to have the sale paid into an account from which that loan is paid off directly, and to keep the certificate of repayment. It also helps to register on the padrón (the town hall's register of residents) at the new home as soon as you live in it, to change your tax address and to put the utilities in your name.

None of this guarantees the outcome, but it turns the proof into a document rather than a story. The exact time limits backwards and forwards are in the two years: from when and until when, and the general requirements in the guide on the requirements for the reinvestment exemption.

The earlier purchase, the chain of payments and the return for the year of the sale are studied as part of the Salama Tax service for selling your main home, which also describes the paperwork we ask for in each case.

Leave your reinvesting in a new home to us

You see the numbers before anything is sent anywhere.

Start here
Book a callWhatsApp