Agente Inmobiliario Colegiado API
Seller Taxation

Main Home Reinvestment Exemption: A Seller’s Guide

A seller-focused explanation of Spain’s main-home reinvestment exemption, including the three-year residence and 12-month occupancy tests, financing, construction, deadlines, intent and late correction.

Pedro Ochoa
Pedro Ochoa Director y Fundador
2 August 2026
19 min read
Two sets of home keys, a property deed and moving boxes between two lived-in homes

Photo by OpenAI on Unsplash

Selling one home and buying another can look like a single move. For Spanish personal income tax, it is a sequence of tests. The home you sell must qualify as your main home, the replacement must become your main home, the amount reinvested must match the statutory measure, and the dates have to line up. The relief applies only when the file supports each step.

This guide is for an individual Spanish tax resident selling a qualifying main home and moving to another home in Spain, including a sale in Barcelona. It explains the reinvestment exemption itself. It does not calculate the general IRPF gain, savings rates or a full return. For that broader question, use the separate Barcelona home-sale IRPF guide. Confirm your facts with a tax adviser before filing; a rented period, shared ownership, separation or an unusual construction contract can change the result.

Warning

The practical rule: treat reinvestment as a documented tax position, not as a promise to buy something later. Put the sale date, the two-year window, the intended amount and the 12-month occupancy date on one timeline before you sign.

The short answer: a conditional exemption, not a sale-price discount

The AEAT’s main-home reinvestment guidance describes a possible exemption for the capital gain from selling a main home when the amount obtained is reinvested in another main home or in qualifying rehabilitation. Article 38 of the Personal Income Tax Act supplies the statutory basis and says that a lower reinvested amount produces only a proportional exclusion. See article 38 in the BOE for the proportional rule.

For a seller, the rule is: you may exclude all of the qualifying gain if the full relevant amount is reinvested on time and both homes meet the habitual-home rules; otherwise, only the permitted proportion is excluded, or the relief is lost. The rule does not erase the sale price, cancel the mortgage, or decide whether a particular renovation is a good investment. It addresses the gain after the statutory conditions are met.

There are four dates to write down at the start:

Date or figureWhy it matters
Date the old home is transferredStarts the usual two-year after-sale window and identifies the tax year of the gain.
Date of a replacement purchase or qualifying paymentShows whether the reinvestment falls within the two-year before-or-after period.
Date the replacement is first occupiedThe new home normally has to be occupied effectively and permanently within 12 months.
Net transfer value less qualifying outstanding principalThe special measure used when the home sold was bought with external financing; net transfer value is the transfer price less allowable transfer expenses.

Those entries come from different rules, which is why one bank statement or one deed cannot prove the whole exemption. Keep the deed, payment evidence, mortgage principal certificate and occupancy evidence together. The AEAT return instructions also distinguish the amount already reinvested from the amount you commit to reinvest after the sale.

Check the old home first: the three-year and two-year tests

For this relief, the AEAT explanation of habitual home status applies the regulation’s three-year residence rule. The BOE text of article 41 bis of the IRPF Regulation defines the dwelling as habitual when it is the taxpayer’s residence for at least three continuous years, subject to the exceptions in the same provision.

That three-year period is a residence test, not simply the age of the deed or the length of the mortgage. You need evidence that the dwelling was your effective and permanent home. In a straightforward Barcelona sale, the file might include the purchase deed, municipal registration, utility history, insurance correspondence and the date you moved to another address. No single item settles the question; what matters is a coherent record of actual residence.

The regulation recognises situations where a taxpayer leaves before three years because circumstances necessarily require a change of home. AEAT lists examples such as marriage, marital separation, a work transfer, obtaining a first job or changing jobs, and comparable justified circumstances. Death is also an express exception. The exception is not a general “I changed my mind” waiver. Keep the document showing why remaining in the property was no longer reasonably possible.

There is a separate two-year look-back for the sale itself. The old dwelling can be your main home on the transfer date, or it can have held that status on any day in the two years before the transfer. The regulation’s two-year look-back matters when a seller moves into the replacement home shortly before selling the old one. It does not turn a long-term rental or an investment flat into a main home simply because the owner plans to sell it.

Ownership history deserves care. The current AEAT page discusses the requirement that the transferred dwelling meet the habitual-home definition, and its guidance has also incorporated the Supreme Court’s full-ownership interpretation for the relevant period. A bare ownership interest, a life interest, a usufruct and a jointly owned share are not interchangeable labels. If your title changed during the three-year period, have the ownership documents reviewed rather than assuming the residence test alone settles the exemption.

The old home checklist is short enough to use before marketing:

  • Confirm the dates of acquisition, move-in and transfer.
  • Mark when you moved out and the date the replacement became your residence.
  • Explain any early departure with dated evidence of the necessary circumstance.
  • Check whether the property was rented, used for business or occupied by another household member.
  • Reconcile the ownership percentage in the deed with the person claiming the gain.

The documents checklist for selling an apartment in Barcelona can organise the deed and sale file, but it does not replace proof of habitual residence. That proof belongs in the tax folder.

Check the replacement home: occupy it within 12 months

The replacement dwelling has its own test. Under article 41 bis of the IRPF Regulation, it must be inhabited effectively and permanently by the taxpayer within 12 months of acquisition or completion of the works. The AEAT manual then counts the three-year habitual period from the acquisition or works-completion date when the 12-month move-in requirement was met.

The practical trap is treating completion as occupation. A deed date, key handover and first night in the home may be close, but they are not the same evidence. If a new-build apartment is handed over in November, record when it was actually made your permanent residence. If construction delays the move, preserve the completion certificate, utility activation, registration and any correspondence that explains the calendar.

The regulation keeps the replacement from losing its status in limited situations, including the taxpayer’s death or circumstances that necessarily prevent occupation. It also addresses a taxpayer who has a home supplied because of a job; in that case the 12-month clock can start when that employment arrangement ends if the acquired home was not used. These are narrow factual exceptions, not permission to leave the replacement empty while it is rented or held for a later sale.

Do not confuse the 12-month occupancy clock with the two-year reinvestment window. The money can be invested on one timetable and the home can have an occupancy obligation on another. A purchase made in month 22 may be within the reinvestment window, but the replacement still needs to become your effective and permanent home within 12 months of its acquisition or works completion.

For evidence, keep the purchase or new-build deed, completion certificate, utility contracts, municipal registration, insurance address and a note of the date you moved personal belongings. The AEAT’s definition of habitual home and its reinvestment page are the primary references for the two tests.

Measure the two-year window by actual dates

The AEAT reinvestment page says the reinvestment can happen in one payment or successively within no more than two years, counted date to date. The IRPF Regulation also recognises amounts used to pay for a new main home acquired in the two years before the old home is transferred. The window is wider than “the next two calendar tax returns” and narrower than “whenever I eventually buy”.

Build the timeline around the transfer deed and payment dates:

SituationWhat to put in the timeline
Replacement bought before saleAcquisition date, each payment and the old-home transfer date. The acquisition must fall within the two years before transfer.
Replacement bought after saleTransfer date, each payment and acquisition or completion date. Payments need to fit the two-year period after transfer.
New home paid in stagesIdentify every qualifying payment, not only the final deed. The payment trail must show what was actually invested inside the window.
Sale price paid in instalmentsMatch each instalment received with the period in which it is applied to the permitted purpose.

When the sale is for an instalment or deferred price, AEAT treats the reinvestment as on time when the instalments are dedicated to the permitted purpose in the tax period in which they are received. That is a cash-flow rule, not a reason to ignore the deed and payment dates. Use a spreadsheet with columns for date received, amount, destination, account and supporting document.

If the replacement purchase will not be completed until a later tax year, the return for the year of the gain must record the intention to reinvest. The AEAT filing instructions identify the amount already reinvested and the amount committed for the next two years. This declaration is not a substitute for the later purchase. It is the contemporaneous statement that lets the return reflect a relief whose timing has not finished yet.

The safest practice is to decide the intended amount before preparing the return. If you later change the property, amount or schedule, keep the reason and update the working file. A reservation contract may show the plan, but the deed, bank transfers and completion documents show whether the plan became a qualifying reinvestment.

What counts as reinvestment: purchase, financing, construction or rehabilitation

The AEAT manual treats acquisition of another main home as the ordinary route. It also recognises qualifying rehabilitation and payments toward a new home under construction, including self-promotion. The current AEAT reinvestment page treats rehabilitation as acquisition through either a qualifying subsidised or protected rehabilitation action, or a structural-reconstruction route. Under the second route, the global cost must exceed 25% of the acquisition price when the home was acquired within the two years immediately before the works began, or 25% of the home’s market value at the start of the works in other cases; in either case, exclude the proportional land value from the base. Article 41 of the IRPF Regulation supplies the legal framework.

That 25% test is not a licence to count every kitchen, paint job or change of furniture as rehabilitation. The statutory category is tied to the type of work and the cost threshold. Ask the architect, contractor and tax adviser to classify the project before signing. Keep the licence, technical project, invoices, proof of payment, completion certificate and the calculation that separates the building from the land.

For a home already under construction, two clocks can apply. The qualifying amount must be invested within the two-year reinvestment period, and the construction normally needs to be completed within four years from the start of the investment under the construction rules referenced by AEAT. If a self-build or other qualifying construction is completed before the old home is sold, the sale must take place within two years after the new home’s acquisition or completion date. If construction follows the sale, payments need to fall within the two-year post-sale window, and the four-year completion clock runs from the first qualifying construction payment. The current AEAT reinvestment guidance requires proof of both the payments and the completion date. If a deadline extension is relevant, it must come from the applicable regulation, not from a private agreement with the builder.

Self-promotion needs an especially clean record. When the taxpayer builds directly, AEAT treats acquisition as occurring when the works are completed; if the completion date cannot be proved, the deed declaring the new work may be used. That can make the works certificate as important as the title deed. Keep dated professional certificates, invoices and permits rather than relying on the date you first slept in the house.

Financing does not disqualify a purchase. The AEAT guidance on total and partial reinvestment says the whole acquisition value of the new home is considered, whether paid from sale proceeds or financed by a third party, including a subrogated loan. The question is whether the acquisition value, dates and habitual-home conditions fit the rule.

If sale proceeds sit in a deposit while a mortgage is arranged, map the legal acquisition date and payments before reporting the amount; a mortgage offer or reservation payment alone may not prove acquisition.

Outstanding mortgage: use the statutory amount

The mortgage adjustment is easy to misread. Where external finance was used to acquire the home sold, AEAT says that, for this exemption only, the amount obtained is the net transfer value (the transfer price less allowable transfer expenses) minus the principal of the acquisition loan still outstanding. The Renta 2025 Modelo 100 guidance labels the transfer value as the transfer amount less transfer expenses and separately records the outstanding principal. The Renta 2025 explanation and the filing instructions also flag the outstanding principal field.

Suppose a qualifying home has a net transfer value of €420,000: the transfer price is already stated after allowable transfer expenses, and this hypothetical includes no other expenses. The bank confirms that €145,000 of principal remains on the acquisition loan at completion. For the reinvestment comparison, the relevant amount is €275,000, before checking the precise inputs in the return. If €145,000 is paid directly to the bank from the sale, that payment does not by itself turn the case into partial reinvestment. It is the principal adjustment the AEAT rule already makes.

Use the bank’s principal figure, not a payoff quote that includes interest or fees. Keep the certificate and payoff statement; the outstanding-mortgage guide covers completion mechanics, not the tax rule.

Apply the adjustment only to principal of the acquisition loan for the transferred home; a consumer, renovation or other secured loan needs separate analysis.

Total versus partial reinvestment: make the proportion visible

Article 38 of the IRPF Act states the core result: when the amount reinvested is less than the total obtained, only the corresponding proportion of the gain is excluded. The AEAT requirements page explains that the full acquisition value is used when the new home is financed, and that the comparison determines total or partial reinvestment.

Use this planning formula, labelled as a hypothetical rather than a tax calculation:

Exempt proportion = qualifying amount reinvested ÷ net amount obtained from the old-home transfer after the outstanding-principal adjustment

If the relevant amount after the outstanding-principal adjustment is €275,000 and the qualifying acquisition value of the replacement is €220,000, the proportion is 80%. If the gain calculated under the general IRPF rules were €100,000, the reinvestment relief would apply to €80,000 and the remaining €20,000 would stay in the taxable calculation, subject to the rest of the return. This example does not determine your gain, tax rate or municipal tax. It only shows why “I bought another home” is not the same as “I reinvested the full amount”.

Partial reinvestment is a decision point, not necessarily a mistake. A seller may deliberately retain cash for a smaller replacement, debt reduction or a different housing plan. The result is that the retained amount does not receive the same exemption. Reserve for the non-exempt gain before spending the sale proceeds.

There is a second distinction for a financed replacement. If a new home costs €220,000 and €170,000 is financed, the acquisition value considered for the reinvestment test can still be €220,000. The financing does not make it a €50,000 reinvestment. But the home must still be acquired within the period, and the taxpayer must occupy it as a main home within 12 months. Keep the deed and mortgage documents together so the full acquisition value is not confused with the cash paid at completion.

The AEAT filing page asks for the total amount obtained, the gain, the amount reinvested and, where relevant, the amount committed for the following two years. Treat those fields as a reconciliation exercise. Every reported amount should tie to a deed, a dated payment, the principal certificate or a construction document.

Declare the intention and build a document trail

When the replacement purchase or qualifying reinvestment is planned for a later tax year and is not completed in the year of sale, the AEAT manual states that the taxpayer must declare the intention to reinvest. The return instructions describe the committed amount after the sale. This is a reporting step, not an optional note to add if the tax office asks later.

The same current AEAT requirements guidance records the Tax Appeals Board (TEAC) doctrine of 31 March 2025 (Resolution 00-06769-2024): reporting the intention in Annex C.2 is a formal duty, but it is not, by itself, a substantive or mandatory condition for the exemption when no contrary circumstance appears in the return for that year or in later returns. The page frames this doctrine for homes acquired from 1 January 2013; an earlier acquisition may interact with transitional deduction rules and needs a year-specific review. Report the intention when the timing rules call for it, while keeping the purchase, amount, timing and main-home conditions documented.

The file should answer five questions without reconstructing the transaction:

  1. What was the transfer date and the legally relevant transfer value?
  2. What principal was still outstanding on the loan used to acquire the old home?
  3. Which purchase, construction or rehabilitation payments fall within two years before or after the transfer?
  4. When was the replacement acquired or completed, and when did effective permanent occupation begin?
  5. What amount was reinvested, what amount was committed, and where is each number reported?

Keep these documents together and easy to retrieve:

  • old-home acquisition and sale deeds;
  • bank principal certificate and completion payoff statement;
  • replacement deed, mortgage deed or subrogation documents;
  • bank transfers, staged payment certificates and receipts;
  • construction licence, works invoices and completion evidence where relevant;
  • occupancy evidence for the replacement home;
  • the filed return showing the reinvestment intention and committed amount.

The sale-document checklist organises the transaction folder; keep dated proof that the replacement became your home in the tax file.

If you miss a deadline or condition, correct the original gain

Missing the two-year window, failing to occupy the replacement as required, or breaching another condition can reduce or remove the relief. The AEAT conditions page says the non-exempt part is attributed to the year in which the gain was obtained. For a 2025 return, the current AEAT guidance directs the taxpayer to file an autoliquidación rectificativa (corrective self-assessment), while late-payment interest is liquidated by the tax-management authorities; see AEAT Renta 2025 guidance and article 41(5).

The filing period runs from the breach, not a later sale date. For a 2025 corrective return, AEAT says the filing window runs from the breach date to the end of the regulatory filing period for the tax year in which the breach occurs. For tax periods before 2024, AEAT directs taxpayers to the applicable year’s manual; the earlier system used supplementary returns, as AEAT’s procedure note explains. Do not copy the 2025 form into an older year. If the problem is the reinvested amount rather than the entire transaction, the amount that was correctly reinvested can keep its proportional relief; the non-exempt balance is the part to regularise.

Record the breach event, recalculate the proportion using the original sale year, preserve qualifying documents and ask an adviser to confirm the year-specific interest and filing route.

If a declared reinvestment never happens, correct the gain in the original sale year; this is not a fresh claim in a later year.

Keep Barcelona’s municipal tax and the sale file separate

The reinvestment exemption concerns resident IRPF. Barcelona’s IIVTNU, commonly called municipal capital-gains tax, is a separate local process with its own taxpayer, calculation and filing route. The AEAT property-sale overview sets out the national tax context, while the Barcelona City Council IIVTNU procedure identifies the municipal route. The Barcelona municipal tax guide explains that boundary. Paying or challenging IIVTNU does not itself prove that the IRPF reinvestment conditions were met.

Likewise, a mortgage payoff statement is a completion document, not a reinvestment certificate. Use the outstanding-mortgage sale guide for bank and notary mechanics, and the documents guide for the wider sale folder. Keep those files alongside the tax timeline; they do not replace it.

This article does not cover the general IRPF gain calculation, savings rates, age-over-65 relief or the non-resident regime. For the broader resident sale-tax map, read the Barcelona home-sale IRPF hub. If you are not a Spanish tax resident, do not apply this guide: AEAT places non-resident property gains under IRNR, with different filing and withholding rules.

Frequently asked questions

Can I reinvest in a new home before selling my old main home?

Yes. The qualifying reinvestment window can include a purchase made in the two years before the sale, counted date to date. Keep the purchase deed and payment trail, and check that the old dwelling still meets the main-home rule when it is sold or was your main home within the permitted previous period. See AEAT’s timing guidance and article 41 of the IRPF Regulation.

Does an outstanding mortgage change the amount I must reinvest?

Yes, for this exemption only. If borrowed money was used to buy the home sold, use the net transfer value (the transfer price less allowable transfer expenses) minus the principal still outstanding. Paying that principal at completion is not treated as partial reinvestment; the remaining amount is the figure to compare with the replacement-home investment. Check the current AEAT Modelo 100 fields.

Can I finance the new main home and still claim the exemption?

Yes. AEAT counts the replacement home’s full acquisition value whether it is paid with sale proceeds, a new loan or a subrogated loan, as long as the home and timing requirements are met. Financing does not remove the need to occupy the home within 12 months. The AEAT financed-purchase guidance and habitual-home definition should be checked against the deed.

What happens if I reinvest only part of the eligible amount?

The relief is proportional. The part of the gain excluded from tax follows the ratio between the amount effectively reinvested and the amount obtained from the sale after the applicable outstanding-principal adjustment. The rest of the gain remains taxable. Compare article 38 of the IRPF Act with AEAT’s partial-reinvestment explanation.

What if I miss the deadline or fail another condition?

The non-exempt part of the gain is brought back into the year in which you obtained it. For a 2025 return, AEAT directs you to file a corrective self-assessment (autoliquidación rectificativa) between the breach date and the end of the filing period for the year in which the breach occurs; the tax-management authorities liquidate late-payment interest. For tax periods before 2024, AEAT directs you to the manual for that year, where the earlier system used a supplementary return. Check the procedure for the affected tax year. Read AEAT’s current loss-of-exemption guidance, the pre-2024 procedure note and the regulation’s article 41(5).

Sources

  1. AEAT: Reinvestment exemption for a main home (Renta 2025 manual) Agencia Estatal de Administración Tributaria · 2026-03-16 · Primary source
  2. AEAT: Main-home sale with reinvestment Agencia Estatal de Administración Tributaria · 2026-08-02 · Primary source
  3. AEAT: Reinvestment exemption requirements and conditions Agencia Estatal de Administración Tributaria · 2026-03-16 · Primary source
  4. AEAT: Meaning of a main home for the exemption Agencia Estatal de Administración Tributaria · 2026-03-16 · Primary source
  5. AEAT: Renta 2025 Modelo 100 reinvestment fields and net transfer value Agencia Estatal de Administración Tributaria · 2026-03-16 · Primary source
  6. AEAT: Renta 2025 reinvestment exemption, rehabilitation and outstanding loan Agencia Estatal de Administración Tributaria · 2026-08-02 · Primary source
  7. AEAT: Loss of reinvestment exemption and corrective return (Renta 2025) Agencia Estatal de Administración Tributaria · 2026-08-02 · Primary source
  8. AEAT: Corrective returns and pre-2024 tax periods (Renta 2025) Agencia Estatal de Administración Tributaria · 2026-08-02 · Primary source
  9. AEAT: What happens when a property is sold Agencia Estatal de Administración Tributaria · 2026-03-27 · Primary source
  10. Barcelona City Council: IIVTNU procedure Ajuntament de Barcelona · 2026-08-02 · Primary source
  11. AEAT: Capital gains for non-resident property sellers Agencia Estatal de Administración Tributaria · 2026-08-02 · Primary source
  12. BOE: Personal Income Tax Act, article 38 Boletín Oficial del Estado · consolidated text accessed 2026-08-02 · Primary source
  13. BOE: Personal Income Tax Regulation, articles 41 and 41 bis Boletín Oficial del Estado · consolidated text accessed 2026-08-02 · Primary source
Tags:
main home reinvestment exemption Spainreinvestment relief when selling a homeSpanish property sale taxhabitual home SpainBarcelona seller tax guidemortgage principal reinvestment
Pedro Ochoa

Pedro Ochoa

Director y Fundador

Fundador de Pedro Ochoa Inmobiliaria con más de 27 años de experiencia en el mercado inmobiliario de Barcelona. Experto en inversión y asesoramiento patrimonial.

Can we help you find your next property?

Our team of experts in the Barcelona real estate market is ready to advise you. Find the perfect home with us.