Sale of the former home after a separation: when the reinvestment exemption in personal income tax is retained

The disposal of the family home after a separation, divorce or annulment raises a recurring problem under the “IRPF”, Spain's personal income tax: can the spouse who had to leave the home continue to benefit from the exemption for reinvestment in a principal residence laid down in article 38 of Law 35/2006 of 28 November on personal income tax —the LIRPF—, when he or she sells his or her share and acquires a new dwelling? The judgment of the Third Chamber of the “Tribunal Supremo”, Spain's Supreme Court, of 27 May 2026, Second Section, cassation appeal 6833/2024, confirms and consolidates the doctrine begun by STS 553/2023 of 5 May and answers in the affirmative: the spouse who leaves the home under a court decision may satisfy the occupation requirement for the exemption where the other spouse and the couple's children have continued to live there. The key lies in a systematic interpretation of the concept of principal residence in article 41 bis of the “Reglamento del IRPF” —Spain's personal income tax regulations, the RIRPF—, approved by Royal Decree 439/2007 of 30 March, and in treating the family home as the point of reference.

1.The exemption for reinvestment in a principal residence: statutory requirements

Article 38.1 of Law 35/2006 provides that capital gains obtained on the disposal of the taxpayer's principal residence may be exempt from tax, provided that the total amount obtained on the disposal is reinvested in the acquisition of a new principal residence on the conditions laid down by regulation. Where the amount reinvested is lower than the total received, only the proportionate part of the gain corresponding to the amount reinvested is excluded from taxation. The implementing provisions are in article 41 of the RIRPF, which specifies that the reinvestment must be made, in a single act or successively, within a period of no more than two years from the date of disposal of the principal residence, and that sums obtained on the sale which are applied to paying the price of a new principal residence acquired in the two years before the disposal also give rise to the exemption. The same provision requires the taxpayer to state, in the tax return for the year in which the gain is obtained, the intention to reinvest, where the reinvestment is not made in the same year as the sale.

The concept of principal residence, for the purposes of this exemption, is defined in article 41 bis of the Regulations. Paragraph 1 provides that the taxpayer's principal residence is the building that constitutes his or her residence for a continuous period of at least three years, with exceptions where circumstances arise that necessarily require a change of home, such as marriage, marital separation, relocation for work, taking up a first job, a change of job or other similar justified circumstances. Paragraph 2 requires the dwelling to be actually and permanently occupied by the taxpayer within twelve months of its acquisition or of completion of the works, with similar exceptions. Paragraph 3, which is central to the dispute, provides that, for the sole purposes of the reinvestment exemption, the taxpayer is to be regarded as disposing of his or her principal residence where, in accordance with the provisions of that article, the building is his or her principal residence at that time or had that status up to any day within the two years preceding the date of disposal.

2.Separation, divorce and the award of the use of the family home

Where a marriage breaks down, the use of the family home is awarded in accordance with article 96 of the “Código Civil” —the Spanish Civil Code—. That provision states that, in the absence of an agreement between the spouses approved by the court, the use of the family home and of the objects for ordinary use in it is to go to the couple's minor children and to the spouse in whose company they remain, until they all reach the age of majority, with specific rules for children with disabilities and for cases where there are no children. Article 90 of the Civil Code, in setting out the minimum content of the “convenio regulador” —the court-approved separation agreement—, includes the award of the use of the home and of the household effects as one of the matters that must be agreed and submitted for judicial approval. In practice, this means that, in many cases, one of the spouses leaves the family home as required by the separation or divorce judgment, while the other spouse and the children remain there.

From a civil-law standpoint, the dwelling remains the family home, even though one of the spouses no longer lives there. From a tax standpoint, the question is whether the spouse who leaves the home automatically loses its status as a principal residence for the purposes of article 38 LIRPF and article 41 bis RIRPF, or whether he or she may still be regarded as disposing of a principal residence when, years later, the co-ownership is terminated and he or she sells his or her share, reinvesting in a new dwelling.

3.The Supreme Court's doctrine: a systematic interpretation of article 41 bis RIRPF

STS 553/2023 of 5 May, Third Chamber, Second Section, decided this question for the first time in a case in which the taxpayer had left the family home in 2012 under a divorce judgment awarding its use to the former spouse and the couple's children, and in 2015 the co-ownership was terminated, the former spouse acquiring the whole of the property and paying financial compensation to the appellant, who reinvested the entire amount received in the acquisition of a new principal residence. The tax authorities refused the reinvestment exemption on the ground that the dwelling disposed of had ceased to be the taxpayer's principal residence more than two years before the disposal, a view upheld by the “Tribunal Económico-Administrativo Regional” —the regional tax tribunal, or TEAR— and by the “Tribunal Superior de Justicia” of Andalucía —the High Court of Justice, or TSJ—. Allowing the appeal, the Supreme Court laid down the doctrine that, in situations of separation, divorce or annulment, the requirement of actual occupation of the dwelling at the time of the disposal or in the two preceding years is treated as satisfied for the spouse who had to leave the home, provided that the dwelling has continued to be the principal residence of the spouse who remained in it.

The STS of 27 May 2026, appeal 6833/2024, confirms and consolidates that doctrine. The Chamber reasons that the concept of principal residence in article 41 bis RIRPF must be interpreted systematically, reading all its paragraphs together. Paragraphs 1 and 2 place the spouse who must leave the home because of a separation on the same footing as the one who stays, by treating marital separation as a circumstance that necessarily requires a change of home and by allowing the dwelling to keep its status as a principal residence even though the taxpayer ceases to live there for such reasons. Paragraph 3, in referring to “lo dispuesto en este artículo” (as provided in this article) in order to determine when the taxpayer is to be regarded as disposing of a principal residence, must be interpreted consistently with that equal treatment. Paragraph 3 cannot be read in isolation so as to require actual occupation by the disposing spouse in the two preceding years, disregarding the fact that the article itself recognises that the dwelling may continue to be a principal residence even though the taxpayer leaves it because of a separation.

The Court stresses that the family home is a shared reality and that the protection afforded by the reinvestment exemption cannot depend on the spouse required to leave the home formally losing the status of occupant. A restrictive reading requiring actual occupation by the disposing spouse in the two preceding years would penalise the spouse who is forced to leave the home by court order, giving rise to unequal and unjustified treatment contrary to the principles of equality in article 14 of the Constitution and of ability to pay in article 31.1. The Chamber concludes that, where the dwelling has continued to be the principal residence of the other spouse and of the couple's children, the spouse who leaves it because of a separation, divorce or annulment may still be regarded as disposing of a principal residence for the purposes of article 38 LIRPF and article 41 bis RIRPF.

4.When the dwelling retains its status as a principal residence for tax purposes

In the light of that doctrine, the dwelling retains its status as a principal residence for tax purposes for both spouses where, before the separation, it met the requirements of actual occupation and permanence in article 41 bis RIRPF and, after the separation, it continues to be the principal residence of the spouse who stays there and of the couple's children. The spouse who leaves the home is not required to go on living there; it is enough that the dwelling keeps its character as the family home and as a principal residence for the family unit. Marital separation is regarded as a circumstance that necessarily requires a change of home, so that the spouse who leaves it does not thereby lose the benefit of the exemption when, years later, he or she disposes of his or her share.

The time requirement in paragraph 3 of article 41 bis, which calls for the dwelling to be the taxpayer's principal residence at the time of the disposal or to have been so up to any day within the two preceding years, is interpreted as meaning that the dwelling must have been the principal residence of the family unit, not necessarily of the disposing spouse, up to any day within the two preceding years. If the other spouse and the children have continued to live in the dwelling until the disposal or until any day within the two preceding years, the requirement is treated as satisfied for the spouse who left it.

5.Time limits for selling and reinvesting

The time limits for selling and reinvesting are not altered by the separation. Article 41 RIRPF maintains the two-year period from the disposal for making the reinvestment, or the two years before the disposal if the new dwelling has been acquired earlier. The practical point is that, in many cases, the disposal of the former family home takes place years after the separation, when the co-ownership is terminated or the common property is wound up. The Supreme Court's doctrine allows the exemption to apply even though more than two years have passed since the spouse left the home, provided that the dwelling has continued to be a principal residence for the other spouse and the children up to any day within the two years preceding the disposal. The relevant period is that for reinvestment measured from the date of disposal, not the time elapsed since the separation.

6.Proving that the other spouse remained and that the dwelling was a principal residence

Applying the exemption calls for evidence that the dwelling has kept its status as a principal residence for the family unit. The judgment of 27 May 2026 insists on the importance of evidence, although in the case at hand the fact that the former spouse and the children had remained in the dwelling was established by the divorce judgment itself and by the documents produced. In practice, the company or the taxpayer must be able to establish, by means of the separation or divorce judgment, the court-approved “convenio regulador”, the “empadronamiento” (registration on the municipal roll of inhabitants), utility bills, correspondence and any other indication, that the other spouse and the children have continued to live in the dwelling until the disposal or until any day within the two preceding years.

The tax authorities may question the exemption if they take the view that the dwelling has ceased to be a principal residence, for example if the other spouse and the children have moved to another dwelling and the former one has been left empty or let to third parties. In such cases the burden of proof falls on the taxpayer, in accordance with article 106 of the “Ley General Tributaria” —Spain's general tax act, the LGT—, which requires the facts giving rise to the right to the exemption to be established. The Supreme Court's doctrine does not remove the need for evidence; it simply extends the concept of occupation to cover the family unit remaining in the dwelling.

7.Problems in winding up the common property and in terminating the co-ownership

The sale of the former family home usually takes place in the context of winding up the common property or terminating the co-ownership between the spouses. From a civil-law standpoint, terminating the co-ownership by allotting the dwelling to one of the spouses with financial compensation to the other may be regarded, in certain cases, as a division of jointly owned property that does not generate a capital gain, in accordance with article 33.2 a) of Law 35/2006, which provides that there is deemed to be no change in the composition of a person's assets in cases of division of jointly owned property, dissolution of the “sociedad de gananciales” —the Spanish community-property regime— or termination of the participation-in-acquisitions matrimonial property regime, and dissolution of co-ownerships of assets or withdrawal of a co-owner, and that such cases may not give rise to any revaluation of assets. However, where the allotment involves an excess allotment in favour of one of the spouses, compensated financially, there may be a capital gain for the other, and the reinvestment exemption may be relevant.

The civil and tax case law has analysed these situations in detail, distinguishing between mere winding-up transactions with no excess allotment and transactions that conceal disposals for consideration. The STS of 27 May 2026 concerns a case of termination of a co-ownership with financial compensation, in which the tax authorities took the view that there was a capital gain and refused the reinvestment exemption. Without going into the characterisation of the transaction as a disposal, the Chamber confines itself to stating that, once the existence of a capital gain is accepted, the reinvestment exemption applies if the principal-residence and reinvestment requirements are met, interpreted in accordance with its doctrine.

8.Conclusion: protection of the family home and legal certainty for the spouse who leaves it

The STS of 27 May 2026, in line with STS 553/2023 and with the Third Chamber's official report for 2025–2026, strengthens the protection of the family home in tax matters and provides legal certainty for the spouse who is forced to leave the home because of a separation, divorce or annulment. The exemption for reinvestment in a principal residence under article 38 LIRPF is not automatically lost by ceasing to live in the dwelling, where the dwelling continues to be the principal residence of the other spouse and of the couple's children. A systematic interpretation of article 41 bis RIRPF and the treatment of separation as a circumstance that necessarily requires a change of home make it possible to keep the status of principal residence for the purposes of the exemption.

At the same time, applying the exemption requires compliance with the reinvestment time limits in article 41 RIRPF and evidence that the family unit remained in the dwelling until the disposal or until any day within the two preceding years. Winding up the common property and terminating the co-ownership may raise questions of characterisation in civil and tax law, but the Supreme Court's doctrine offers a clear criterion as regards the principal residence. In short, the sale of the former home after a separation does not in itself preclude the reinvestment exemption under the IRPF, provided that the dwelling has continued to be the family home and that the amount obtained is reinvested in a new principal residence within the statutory time limits and conditions.

Alburquerque AbogadosAnna Montserrat

See all related publications

Related publications

Directors' remuneration: a company-law irregularity does not automatically render the expense non-deductible

The tax deductibility of directors' remuneration has traditionally been an area of friction between companies and the tax authorities, particularly where the remuneration does not strictly comply with the requirements of the “Ley de Sociedades de Capital” —the Spanish Companies Act, the LSC—. The judgment of the Third Chamber of the “Tribunal Supremo”, Spain's Supreme Court, of 18 May 2026 (the “Sala de lo Contencioso‑Administrativo”, the administrative-law chamber, Second Section, cassation appeal 8019/2023) consolidates the doctrine begun by STS 1053/2024 of 13 June and clarifies that a company-law irregularity, such as the failure of the general meeting to approve the maximum amount of the directors' annual remuneration, is not in itself sufficient to render the expense non-deductible under article 15.f of Law 27/2014 on corporation tax. Where the services are real, the remuneration has been paid and recorded in the accounts and there is a correlation with the business activity, the authorities may not refuse the deduction merely by invoking a formal company-law breach. The question becomes what the company must document in order to establish the reality and necessity of the expense and in which cases the authorities may still legitimately refuse it.

Read more

B2B electronic invoicing and VERI*FACTU: two distinct obligations that businesses must not confuse

The Spanish system of compulsory electronic invoicing between businesses and professionals and the regime governing VERIFACTU invoicing systems share the same actors –companies, invoices and the “Agencia Tributaria” (the AEAT, Spain's tax authority)– but they respond to different logics and rest on different rules. Royal Decree 238/2026 has defined the framework for B2B electronic invoicing, implementing article 12 of Law 18/2022 of 28 September on the creation and growth of companies, while Royal Decree 1007/2023 of 5 December, and its amendment by Royal Decree‑Law 15/2025 of 2 December, govern the requirements applicable to invoicing systems and software and the standardisation of invoicing-record formats, including the VERIFACTU system. These are two obligations that overlap in time and in the persons they bind, but they must not be confused: one concerns how invoices are issued, sent and received between businesses and professionals; the other, how invoicing data is generated, recorded and, where applicable, transmitted to the AEAT.

Read more

Can the tax authorities use a mortgage valuation to raise the tax value of a property?

The use by the tax authorities of the mortgage valuation incorporated into the deed in order to raise the tax value of a property has been the subject of intense debate in academic commentary and in the case law. The judgments of the Third Chamber of the “Tribunal Supremo”, Spain's Supreme Court, of 23 and 27 February 2026, in line with the Chamber's official case‑law report for the 2025–2026 two‑year period, confirm that, in cases where a “comprobación de valores” —a review of declared values— is available, the tax authorities may have recourse to the mortgage valuation figure where there is a material difference from the value declared, without any need to establish fraud or concealment beforehand. That valuation does not, however, become an irrebuttable presumption: the taxpayer may contest it by means of expert evidence and, where appropriate, through the “tasación pericial contradictoria”, the adversarial expert valuation provided for in the “Ley General Tributaria”, Spain's General Tax Act —the LGT—. This mechanism must be clearly distinguished from the cadastral reference value, which operates as a direct taxable base in the “Impuesto sobre Transmisiones Patrimoniales y Actos Jurídicos Documentados”, Spain's transfer tax and stamp duty, and in the “Impuesto sobre Sucesiones y Donaciones”, its inheritance and gift tax.

Read more

Holograph wills and inheritance tax: recording the will in the notarial protocol does not stop the tax time limit

The “testamento ológrafo” —the holograph will— is a classic institution of civil law which, in order to take full effect, requires a subsequent procedure of authentication and recording in the notarial protocol. In practice, many heirs have understood that this procedure “suspends” or postpones the moment at which the obligation to declare and pay the “Impuesto sobre Sucesiones y Donaciones”, Spain's inheritance and gift tax, arises. The judgment of the Third Chamber of the “Tribunal Supremo”, Spain's Supreme Court, of 27 January 2026, Second Section, cassation appeal 1845/2024, clearly corrects that perception: where the recording of a holograph will is dealt with as non-contentious proceedings and does not become contentious, the tax accrues on the death of the deceased and the subsequent recording does not of itself postpone the start of the six-month period for filing the self-assessment. The decision has significant practical consequences in terms of surcharges, late-payment interest and limitation, and makes it necessary to distinguish between the mere handling of a non-contentious matter before a notary or a court and a genuine judicial dispute with suspensive effect on the time limits.

Read more

Chronicle of an executorship for the realisation of an estate: bequeathing what you do not own

There are wills that are carried out by signing a public deed of acceptance of the estate and dividing up what there is. And there are others that, in order to be carried out at all, first require the deceased's corporate structure to be dismantled and the assets he had left to third parties without owning them to be taken out of it. This is the second kind. The firm acted as universal executor for the realisation of the estate —the “albacea universal de realización de herencia”— and completed the task in little more than eleven months, well within the time limit the testator had set. But the work that made that result possible did not begin with the death of the deceased, but years earlier, on the day he was helped to draw up his will.

Read more

The price of a company cannot always be fixed at signing: locked box, completion accounts and earn-outs

In the sale and purchase of companies, the price is rarely a static figure fixed once and for all at the moment of signing. The initial financial valuation, based on assumptions as to debt, cash, working capital and results, does not always match the amount that the buyer must ultimately pay. To manage this uncertainty, practice uses various contractual mechanisms for determining and adjusting the price, chief among them locked box structures, adjustments by means of completion accounts and earn-outs. What is apparently a financial question becomes a central part of the contractual architecture of the transaction, with direct implications for the allocation of risk, for the definition of economic concepts and for the potential for subsequent litigation.

Read more
See all related publications