Buying & selling · · 23 min read
What to do with the home in a divorce or separation in Madrid in 2026: selling, buying out the other’s share, community property, use of the family home, mortgage and taxes
When a couple separates, the home is often the most valuable thing they share and also the hardest thing to decide about. As of 5 November 2026 we explain, calmly and without jargon, the four possible routes (sell and split, one keeps the other’s share, stay co-owners or let it out), what changes between community property (gananciales) and separate property (separación de bienes), how the use of the family home that a judge can grant works, what happens to the mortgage, which taxes apply in the Madrid region and the steps in order, from the separation agreement (convenio regulador) to the Land Registry.

Separating forces you to make many decisions at once, often with little energy left. The home is usually at the centre: it is the children’s home, it holds a good part of the savings and it often carries a mortgage signed by both of you. There is no single best solution for everyone, but knowing what options exist and what each one requires helps you decide calmly.
We go through the four routes, the difference between community property and separate property, the use of the family home (article 96 of the Spanish Civil Code, amended by Law 8/2021), the mortgage, the taxes in the Madrid region and the steps in order. What applies to a marriage does not always apply to an unmarried couple (pareja de hecho): we point it out where it matters.
The essentials in one minute
- There are four routes: sell to a third party and split the money, one of you keeps the other’s share, you stay co-owners, or you let the home. They can be combined: for example, keeping it for a few years and selling later.
- Under community property (gananciales), a home bought during the marriage is shared out when the community is wound up. Under separate property (separación de bienes), each of you owns your percentage and, if one keeps the home, you sign an extinción de condominio (ending of co-ownership).
- With minor children, the judge will in principle grant the use of the home to the children and the parent they stay with, even if the home belongs to both of you. Selling it then requires the consent of both or a court authorisation.
- Changing who owns the home does not change who owes the mortgage: to release the one who leaves, the bank has to agree.
- In Madrid, winding up community property is exempt from ITP (property transfer tax) and AJD; ending co-ownership usually pays AJD (general rate 0.75%) on the share acquired; and there is no plusvalía municipal (municipal land value tax) on transfers between spouses under a separation or divorce ruling.
- For IRPF (Spanish income tax), sharing out according to each person’s share does not generally create a gain, but a cash compensation may be taxed if the home has gone up in value.
The four routes at a glance
If you agree, you can choose the one that suits you best. If not, the judge will decide on the use of the home and, if either of you asks, on dividing it.
| Option | What it is | When it usually fits | Mortgage | What to watch most |
|---|---|---|---|---|
| Sell to a third party and split | The home is sold, the mortgage is paid off at the notary and each takes their share | When neither can or wants to stay, or you need the money to start again | Paid off with the price | Both must sign; the use, if granted; each person’s IRPF and plusvalía |
| One keeps the other’s share | Allocation when winding up community property, or ending of co-ownership | When one wants to stay, often for the children, and can pay the other and the mortgage | The bank must agree that the one leaving stops being a borrower | A fair value; the bank’s approval; AJD or ITP |
| Stay co-owners | The home remains jointly owned, each with their percentage | With young children and the use granted to one parent, or when selling now does not make sense | Both remain borrowers | Putting in writing who pays what and what happens later |
| Let it | The home is let and the rent is split according to ownership | When nobody will live there and you prefer not to sell yet | Both remain borrowers | Who manages it, how costs and income are split and when it will be sold |
Guidance summary based on the laws and official information cited in this article.
The starting point: community property or separate property?
The first thing is to know who really owns the home. According to the Madrid Notarial Association, if you did not sign a marriage settlement (capitulaciones matrimoniales, the deed before a notary in which the regime is agreed), community property applies in Madrid; in other regions, such as Catalonia, the default is separate property. If you married abroad, a different law may apply.
- Under community property, what is bought during the marriage generally belongs to the marital community. On divorce it must be wound up: an inventory of what you own and owe, a valuation and an allocation to each person of what is theirs. The home can go to one of you, compensating the other with other assets or with money.
- Under separate property, each owns their own. If you bought half each, you each own 50% in co-ownership (proindiviso), and for one to keep it all you sign an extinción de condominio, also called dissolution of the co-ownership.
- A home bought before the marriage by one person alone is, in principle, theirs. But if the mortgage was partly paid with community money, the Directorate-General for Taxation explains that the part paid that way would be community property (ruling V0717-18, of 16 March 2018).
- For an unmarried couple there is no community property to wind up: if the home belongs to both, the usual route is ending the co-ownership.
The purchase deed and an up-to-date nota simple (the Land Registry summary that shows who owns the home, in what percentage and what charges it carries) make clear whether the home is recorded as community property, as one person’s separate property or in both names.
Use of the family home: article 96 of the Civil Code
Ownership is one thing; who lives in the home after the break-up is another. If there is no agreement, the judge decides under article 96 of the Civil Code, as worded by Law 8/2021 of 2 June:
- With minor children, the use of the home and its everyday contents belongs to the couple’s minor children and the spouse they stay with, until they come of age. If a child has a disability that makes it advisable to stay in the home afterwards, the judge sets the duration.
- If the children are split between the parents, the judge decides. Once they are adults, their housing needs are governed by the rules on maintenance between relatives.
- Without children, the judge may grant the use to the spouse who is not the owner for a reasonable period, if their interest is the one most in need of protection.
According to INE, custody was shared in 50.8% of divorces of couples with children in 2025. In those cases the use is decided case by case: it is worth agreeing in the separation agreement who lives in the home, until when and who pays each cost.
The use matters a great deal when selling. Section 3 of article 96 requires the consent of both spouses or a court authorisation to dispose of a home whose use has been granted, and that restriction is entered in the Land Registry. The Directorate-General for Legal Certainty and Public Faith has explained that the right of use is a family right with financial content, that it can be registered and that, without minor children, it cannot be granted indefinitely (resolution of 29 January 2024).
What if one wants to sell and the other has the use? The Supreme Court explained in its judgment of 3 December 2008 that either co-owner can ask for the home to be divided, but that the use granted remains and any sale at auction must respect it. That is why, if you decide to sell, the usual step is to agree first on what happens to the use.
Option 1: sell to a third party and split
It is the cleanest route when neither of you can take on the home and the mortgage alone. It is sold like any other home, with arras (the reservation contract with a deposit) and a deed before a notary, but with a few particular points:
- Both owners sign, in person or through a notarial power of attorney, and, if the use has been granted, with the consent of the person who holds it or the judge’s authorisation.
- The mortgage is paid off at the signing with part of the price and the rest is split according to ownership or what was agreed. We explain it in “Selling a Flat with a Mortgage in Spain in 2026: Paying It Off at the Notary, Subrogation, Fees and Costs in Madrid”.
- Each of you declares your gain or loss in your tax return and pays plusvalía municipal for your share, with whatever exemptions apply: it is all in “Taxes When Selling a Flat in Spain in 2026: Plusvalía Municipal in Madrid, Income Tax (IRPF) and Exemptions”.
Before you start, put in writing the minimum price, who approves offers and how costs are split until the signing.
Option 2: one keeps the other’s share
This is common when one wants to stay in the home, often for the children. The one who stays pays the other their share and takes on the mortgage. Under community property it is done in the winding-up: the home is allocated to one and the other receives other assets or money. Under separate property or in an unmarried couple, through an extinción de condominio: one transfers their percentage to the other in exchange for compensation.
The most delicate point is the value. An independent valuation, or the bank’s valuation if a new mortgage is needed, helps you settle on a figure you both accept (more in “Property valuation (tasación) in 2026 when buying or selling in Madrid: who pays, how long it lasts, what happens if it comes in below the price and the latest appraised value”). To work out what the one leaving receives, you start from that value and take into account what is left on the mortgage, which the one staying takes on. And the bank has to accept that the one staying pays alone, as we explain below.
Option 3: stay co-owners for a while
Sometimes selling does not make sense and neither can buy the other out: for example, with young children, the use is granted to one parent and the home remains jointly owned until they grow up. That works if it is properly tied up: agree who pays the mortgage, IBI (council tax on property), the community fees, insurance and derramas (special levies agreed by the residents’ association), and what will happen when the use ends. Nobody is obliged to stay in co-ownership forever: either of you can ask for a division later, although the use granted is respected. And you both still owe the mortgage: if one stops paying, the bank can claim from the other.
Option 4: let it
If nobody will live in the home and you prefer not to sell yet, letting it brings in income for the mortgage, but you need to agree on who chooses the tenant, who handles problems and how income and costs will be split. Each owner declares their share of the rent in their tax return. If you later want to sell with the tenant in place, we explain it in “Selling a Rented Flat with a Tenant in Spain in 2026: Right of First Refusal (Tanteo y Retracto), Price and Options”.
The mortgage: how to release the one who leaves
The separation agreement may say that one keeps the home and pays the mortgage, but that does not bind the bank. The Bank of Spain explains that changing the holder of a loan requires the lender’s authorisation, express or tacit. Until then, you both remain borrowers. The usual routes are:
- Novation (novación): the loan is changed so that only one holder remains, sometimes changing the term or the rate too. According to the Bank of Spain, the lender assesses the economic viability and whether the security is maintained, and may accept it or not. It is signed as a public deed and entered in the Land Registry.
- Subrogation of the borrower: the one staying takes on the debt instead of both of you, also with the lender’s authorisation.
- A new mortgage: if the bank does not agree, the one staying can ask another lender for a loan to pay off the old one and pay the other their share.
The Bank of Spain notes that a novation may carry a fee, that the fee for extending the term cannot exceed 0.1% of the outstanding capital and that AJD is exempt when the interest rate or the term is changed; for other changes, ask the bank and the notary what is payable. Talk to the bank before signing the separation agreement, so that what you agree is actually possible.
Taxes in the Madrid region: what is paid and what is not
| Transaction | ITP or AJD | IRPF | Plusvalía municipal |
|---|---|---|---|
| Home allocated to one spouse when winding up community property | Exempt as far as each person’s share goes; excess allocations are not covered | No gain if each receives their share; original purchase dates and values are kept | Not subject |
| Ending co-ownership between spouses under separate property | AJD on the share acquired; general rate 0.75% | Generally no gain; the compensation may be taxed if the home has gained value | Not subject if done to comply with the separation or divorce ruling |
| Handing over half the home as compensation or payment | May be subject to ITP, as a transfer | There may be a gain for the person handing it over | Check your own case |
| Sale to a third party | Paid by the buyer | Each seller declares their gain or loss | Each seller pays for their share |
Sources: consolidated ITP and AJD Act, art. 45.I.B.3; Supreme Court, 30-4-2010; Community of Madrid (CTE 06-22/T and AJD page, 23-4-2026); Directorate-General for Taxation (V0717-18, V2985-19 and V0875-26); Tax Agency, 2025 Income Tax Manual.
ITP and AJD: community property exempt, co-ownership with AJD
Article 45.I.B.3 of the consolidated ITP and AJD Act exempts contributions to the marital community, the allocations made when it is wound up and transfers to the spouses in payment of their share of the community property. If the home is allocated to one of you when winding up community property, in principle neither ITP nor AJD is paid. With two nuances: according to the Directorate-General for Taxation, excess allocations that are not a necessary consequence of the division are not exempt (V0717-18); and, according to the Supreme Court, the exemption does not apply to separate property (judgment of 30 April 2010).
Under separate property, ending co-ownership by notarial deed is generally taxed under the graduated AJD charge, whose general rate in Madrid is 0.75%. The Directorate-General for Taxation of the Community of Madrid applied it to a judicial separation in which the husband kept the home: the base was the share he acquired, 50% of the value, and he could apply the 95% relief for large families acquiring their main home (CTE 06-22/T, which cites the Supreme Court judgment of 20 March 2019). An example of our own: with a home valued at €300,000, half is €150,000 and AJD at 0.75% would be €1,125, before any relief.
IRPF: when there is no gain and when there may be one
According to the Tax Agency’s 2025 Income Tax Manual, there is no gain or loss when dividing jointly owned property, winding up the marital community or dissolving a co-ownership, provided that what is allocated to each person matches their share. Values are not updated either: the home keeps its original purchase dates and values for a future sale.
If one person is allocated more than their share, there is a change in the other’s assets. And the manual sets out the Supreme Court’s doctrine (judgments of 10 October 2022 and 5 December 2023): the compensation received by the co-owner who does not keep the property is a capital gain when its value has been updated since purchase and the difference is positive. In other words, if the home is worth more today than when you bought it, the one who leaves may have to declare a gain.
Plusvalía municipal: not subject because of the divorce
Article 104.3 of the consolidated Local Finance Act takes contributions to the marital community and allocations in payment of the shared assets outside plusvalía municipal, and adds:
“Nor shall the tax apply in the case of transfers of real estate between spouses or in favour of the children as a consequence of complying with rulings in cases of marital annulment, separation or divorce, whatever the matrimonial property regime.”
Consolidated Local Finance Act, art. 104.3, reproduced in ruling V0875-26 of the Directorate-General for Taxation (21 April 2026); our translation
Not subject does not mean the tax is forgotten: it is deferred. In that ruling, someone who received the home in 2006 when winding up community property on divorce and sold it in January 2026 had to calculate plusvalía from 2002, when the marital community bought it. The rule speaks of spouses and of rulings: if you are an unmarried couple or the divorce is before a notary, ask your town hall or your adviser how it applies.
The main-home deduction from before 2013
If you bought the home before 2013 and were already claiming the main-home deduction, the Tax Agency explains three situations after a break-up:
- If you keep paying for what was your main home and your children and the other parent live there, you can keep claiming; if you buy another main home, the maximum base is shared between the two: €9,040 a year.
- If a divorce ruling obliges you to pay the whole loan signed by both of you, and both of you were claiming before 2013, you can claim for everything you pay even if you own 50%.
- If since 2013 you have come to own 100% through ending the co-ownership after divorce, you can claim for 100%, up to a base of €9,040, if you had claimed for your share before 2013, you do not exceed what the other could have claimed and the other had not used up their deduction.
Compensatory maintenance, only if it touches the home
According to INE, compensatory maintenance (pensión compensatoria) was set in 6.4% of divorces between spouses of different sex in 2025. It is usually paid in money, but it is sometimes agreed to pay it by handing over a share of the home or its use. Then the taxes of both of you change, as in the warning above: have the lawyer and the adviser review it before signing.
The steps, in order
- Gather the paperwork: purchase deed, nota simple, marriage settlement if any, IBI receipt and outstanding mortgage balance.
- Agree on a value for the home with an independent valuation or a bank valuation.
- If one of you will keep the mortgage, ask the bank whether it accepts the novation or subrogation, and on what terms, before signing anything.
- Sign the separation agreement (convenio regulador) with your lawyers: children, use of the home, maintenance and winding up of the property regime. According to the Notariado, if it is by mutual agreement and there are no minor children who are not emancipated and no children with a disability who depend on you, you can divorce before a notary, with a lawyer and with the agreement already drafted; otherwise, the judge approves it.
- Formalise the division: winding up community property or ending co-ownership, by notarial deed or in the agreement approved by the judge, as your lawyer advises; or, if you sell, arras and a deed of sale.
- File the taxes: AJD or ITP with the Community of Madrid, even if exempt, and whatever applies for plusvalía with the town hall, within their deadlines.
- Register the new ownership in the Land Registry and, if granted, the use.
- In the following year’s tax return, declare any gain and the main-home deduction, if you keep it.
How we do it at Llavely
If you decide to sell, you contact us, or both of you do, and we take care of everything. We sell homes throughout the Madrid region, we have more than 35 years in the property sector and specialist lawyers, and we review every home in under 24 hours. The valuation, photos, video, floor plan and virtual tour are included, and a clear valuation helps you both start from the same figure. We prepare the paperwork and coordinate with your family lawyers and the notary. If you prefer, we are a single point of contact for both of you: we tell each of you the same thing and nobody has to act as messenger.
Before showing the home we talk to each buyer to find out what they are looking for and how they would pay, and we check their ID before the viewing. We carry out the viewings, so neither of you has to be there if you would rather not. Our specialist lawyers review the nota simple, the charges, the use of the home and any debts, calculate the taxes that apply, draft the arras, review the deed and go with you to the notary, where the mortgage is paid off and the price is split. All payments are made by ordinary bank transfer or OMF (orden de movimiento de fondos, an interbank funds transfer order), never in cash.
You pay 2.5% + VAT of the price, in total, only if the home sells and on the day of the notary signing. We do not promise timescales or prices: every separation has its own pace. If you prefer to let, at Llavely landlords list for free in Madrid and Barcelona and see verified candidates. And if you want to know what the home is worth so you can start talking with real figures, ask for your free valuation: we give you a range straight away, then call you, see the home and fine-tune the price.
Frequently asked questions
What happens to the home in a divorce if we are under community property?
If it was bought during the marriage, it generally belongs to the marital community. On divorce the community is wound up: an inventory is made, everything is valued and each person is allocated their share. The home can be sold or allocated to one of you, compensating the other. That allocation is exempt from ITP and AJD and pays no plusvalía municipal.
How do I keep my ex-partner’s share of the home?
Under community property, through the allocation when winding it up. Under separate property or as an unmarried couple, through an extinción de condominio before a notary. In both cases you pay the other their share and, if there is a mortgage, the bank must agree that the other stops being a borrower.
How much does ending co-ownership cost in Madrid in a divorce?
Under separate property it is usually taxed under AJD on the value of the share you acquire, at a general rate of 0.75%, plus notary and Land Registry fees. There may be reliefs, such as the 95% relief for large families acquiring their main home.
Can I sell the home if the judge has granted its use to my ex-partner?
You need the consent of both of you or a court authorisation (article 96.3 of the Civil Code). Either co-owner can ask for a division, but according to the Supreme Court the use granted remains and any sale at auction must respect it.
How long does the use of the family home last?
If it is granted to the minor children and the parent they stay with, until the children come of age, except in cases of disability where the judge sets the duration. Without children, it may be granted to the non-owner spouse for a reasonable period, not indefinitely.
If I keep the home, does my ex-partner stop owing the mortgage?
Not automatically. The separation agreement binds the two of you, not the bank: you both remain borrowers until the lender accepts a novation or a subrogation, or until the loan is paid off with another mortgage or by selling.
Do we have to pay plusvalía municipal when sharing out the home in a divorce?
Not on allocations when winding up community property, nor on transfers between spouses to comply with an annulment, separation or divorce ruling, whatever the regime. On the next sale it will be calculated from the original purchase date.
Is the money I receive for my share of the home taxed in IRPF?
If each person receives what corresponds to them, there is generally no gain. But according to the Supreme Court, the compensation received by the co-owner who does not keep the property is a capital gain when the home has gained value since it was bought.
Sources
- Law 8/2021 of 2 June reforming civil and procedural legislation to support people with disabilities in exercising their legal capacity: article two, section eleven, new wording of article 96 of the Civil Code (BOE, consulted on 5 November 2026)
- Royal Legislative Decree 1/1993 of 24 September, consolidated text of the Property Transfer Tax and Stamp Duty Act: articles 31.2 and 45.I.B.3 (BOE, consulted on 5 November 2026)
- Judgment of 30 April 2010 of the Third Chamber of the Supreme Court: the exemption in article 45.I.B.3 does not apply to separate property (BOE no. 153, 24 June 2010)
- Resolution of 29 January 2024 of the Directorate-General for Legal Certainty and Public Faith on registering the use of a home granted in a divorce judgment (BOE no. 60, 8 March 2024)
- 2025 Income Tax practical manual: existence of a change in the taxpayer’s assets (Tax Agency, updated on 17 March 2026)
- 2025 Income Tax: main-home investment deduction, purchase, renovation and extension (Tax Agency, updated on 16 March 2026)
- Stamp duty on documented legal acts (AJD): rates and reliefs (Community of Madrid, updated on 23 April 2026)
- Ruling CTE 06-22/T of the Directorate-General for Taxation of the Community of Madrid: ending co-ownership of the main home after a judicial separation and relief for large families (Community of Madrid, 2022)
- Novation or change in the terms of the mortgage (Bank of Spain, Bank Customer Portal, consulted on 5 November 2026)
- Divorce before a notary (General Council of Notaries, consulted on 5 November 2026)
- Marriage and matrimonial property regime (Madrid Notarial Association, consulted on 5 November 2026)
- Statistics on Annulments, Separations and Divorces (ENSD). Year 2025 (INE, press release, 23 July 2026)
- Binding ruling V0717-18 of the Directorate-General for Taxation, 16 March 2018: winding up community property, separately owned home and excess allocations (reproduced by El Notario del Siglo XXI)
- Binding ruling V2985-19 of the Directorate-General for Taxation, 25 October 2019: half of the family home handed over as compensation for work in a divorce (reproduced by El Notario del Siglo XXI)
- Binding ruling V0875-26 of the Directorate-General for Taxation, 21 April 2026: plusvalía municipal on the sale of a home allocated when winding up community property on divorce (reproduced by CEF Fiscal Impuestos)
- Supreme Court, Civil Chamber, judgment of 3 December 2008: division of the jointly owned home and survival of the right of use (reproduced by El Notario del Siglo XXI)