Selling your Spanish main home? Learn when Spain can exempt your capital gain, including the 2-year reinvestment rule, over-65 relief and the €240,000 life-annuity option.

This is a div block with a Webflow interaction that will be triggered when the heading is in the view.
Selling your Spanish home can be free of capital gains tax, but only if you meet conditions that many British expats assume apply automatically and then miss. Spain rewards those who reinvest into another main home, and it treats owners over 65 especially generously. This article explains exactly how each relief works, the deadlines that make or break them, and why the exemption never stretches to a property back in the UK.
Most British expats selling a home in Spain assume the gain will be tax-free, because they are:
In practice, that feels reasonable. It is also where the gap starts.
Spain does offer a genuine and generous exemption on the gain from your main home. But unlike the UK, it is not automatic and it is hedged with conditions: what counts as your main home, whether and how much you reinvest, a strict deadline, your age, and the records you can produce. Meet the conditions and the gain can be entirely free of tax. Miss one and a large chunk of the profit can be taxed at up to 30%.
This article exists to explain exactly how each version of the exemption works, the deadlines that decide the outcome, and the one situation the relief will never rescue: a property you still own back in the UK.
The exemption attaches to your vivienda habitual, the Spanish term for your habitual residence. This is the home you genuinely live in, not a holiday flat, not a rental, and not a property you keep for occasional use.
Broadly, Spain expects the property to have been your continuous main home for a meaningful period, commonly understood as at least three years, and to be the address at which your life is actually based. Occupation is judged on the facts: where you are registered, where your day-to-day life happens, and whether the property is genuinely your centre of living rather than a convenient label.
For expats this matters because lifestyles can be fluid. Someone who splits time between two homes, or who let the property for a period, may find the habitual-residence test is not as clear-cut as they assumed. Establishing the status honestly, before a sale, is far easier than defending it afterwards.
There is also a practical trap in the gap between buying and moving in. Spain generally expects you to have occupied the home within a reasonable period of acquiring it and to have stayed continuously. A property bought, left empty for a year, then lived in, may start its qualifying clock later than the owner assumes. If your occupation history is anything other than straightforward, it is worth checking where you stand before you rely on the exemption.
To see the value of the exemption, it helps to know the charge it removes. In Spain, a capital gain on property is taxed as savings income, on a rising scale that applies uniformly across the country.
The gain is broadly the difference between your acquisition cost and the sale price, adjusted for allowable purchase and selling costs and evidenced improvements. On a long-held home that has risen substantially in value, the gain can easily reach the upper bands, so the exemption is not a technicality. It can be the difference between keeping the whole proceeds and handing tens of thousands of euros to Hacienda.
That is why qualifying for the exemption, rather than assuming it, is worth real attention before you sell.
It is worth stressing that these are savings-income bands, uniform across every region of Spain. Unlike general income tax, where your region can push the rate up or down, the capital gains scale is the same whether you live in Madrid, Malaga or Barcelona. So the exemption, not your postcode, is the lever that changes the bill on a property sale.
{{INSET-CTA-1}}
The most widely used version of the exemption is reinvestment relief. If you sell your vivienda habitual and reinvest the proceeds into another main home, the gain can be exempt. The logic is that you have not cashed out, you have simply moved from one home to another.
The new property must itself become your main home, not a second property or an investment. In effect Spain is exempting people who are genuinely rehousing, not those extracting value from the property market.
This is the route most working-age expats rely on, and it is where rolling the proceeds into a new main home within the rules turns a large potential bill into no bill at all. But it comes with two conditions that decide everything: how much you reinvest, and how quickly.
It is also worth being clear that the new home has to become your genuine main residence within a reasonable time. Buying a property with the intention of letting it, or holding it as a second home, does not qualify, even if the money moves within the deadline. The relief follows the purpose of the purchase, not merely the transfer of funds.
The first condition is timing. You generally have two years to reinvest the proceeds into your new main home. The window is measured around the sale, so a purchase shortly before or, more commonly, within two years after the sale can qualify. Miss the window and the relief is lost, however genuine your intention to buy again.
The second condition is proportionality. The exemption matches the share of the proceeds you actually reinvest.
An example makes it concrete. If you sell for EUR 400,000, realise a gain, and reinvest only EUR 300,000 into your next home, roughly three-quarters of the gain is exempt and the remaining quarter is taxed. Reinvest the full EUR 400,000 and the gain disappears from the charge entirely. The lesson is simple: partial reinvestment gives partial relief, and the two-year clock is unforgiving.
One nuance catches people who sell before they buy. The proceeds you are expected to reinvest are the net sale proceeds, and where a mortgage was repaid on the sale, the amount treated as available to reinvest is affected. If you are downsizing and taking cash out deliberately, that is a choice with a tax consequence attached, and it is better made with the numbers in front of you than discovered afterwards.
Spain treats older homeowners far more generously, and this is where many retired British expats have an advantage they do not realise they hold. If you are over 65 and sell your vivienda habitual, the gain is fully exempt, with no requirement to reinvest anything at all.
The usual condition is that the property has genuinely been your main home, typically for at least three years. Beyond that, there is no need to buy another property, no two-year window to manage, and no proportional calculation. The gain simply falls out of the charge.
For a retired couple selling a long-held Spanish home to downsize or move closer to family, this can turn a potentially large capital gains bill into nothing, provided the habitual-residence conditions are properly met. Age, in this one respect, is a genuine tax advantage.
A word of caution on the age line. The exemption depends on your age at the time of the disposal, so selling a few months before a sixty-fifth birthday can forfeit a relief that would have applied shortly afterwards. Where a sale is discretionary and a birthday is close, the order of events is worth a second look, because the difference can be the entire capital gains bill.
There is a second, less well-known relief for the over-65s, and it is not limited to property. If you are over 65 and sell any asset, a second property, an investment portfolio, shares, you can exempt the gain by reinvesting the proceeds into a life annuity.
The conditions are specific and the deadline is short.
This route is powerful for older expats sitting on gains outside their main home, for example a rental flat or a share portfolio, who want a secure income rather than a lump sum. The six-month deadline is tight and the annuity structure needs to be right, so it is a planning decision rather than a spur-of-the-moment one. The exact treatment and the annuity mechanics are the kind of detail to confirm with a specialist before committing, because getting the structure wrong forfeits the relief.
The appeal is easy to see. An older expat sitting on a long-held share portfolio or a second flat can convert a taxable gain into a stream of secure lifetime income, and shelter the gain in the process, up to the EUR 240,000 reinvestment ceiling. What it asks in return is discipline on the deadline and care on the structure, which is why it belongs in a planning conversation well before the asset is sold, not afterwards.
Numbers make the proportional rule easier to feel than to describe. Take a couple who bought their Spanish home for EUR 250,000 and sell it for EUR 550,000, a gain of EUR 300,000, having lived there as their vivienda habitual for many years.
If they are both under 65 and reinvest the entire EUR 550,000 into a new main home within two years, the whole EUR 300,000 gain is exempt. They pay nothing in capital gains tax on the sale.
Now change one figure. Suppose they reinvest only EUR 412,500, keeping the rest as cash, roughly three-quarters of the proceeds. The exemption is proportional, so about three-quarters of the gain is exempt and the remaining quarter, around EUR 75,000, becomes taxable as savings income. Running that through the bands produces a real bill of several thousand euros that simply would not have arisen had they reinvested in full.
Now suppose instead that both owners are over 65 and the property was their main home for well over three years. In that case the full EUR 300,000 gain is exempt with no reinvestment at all, and they are free to keep every euro of the proceeds. Same house, same gain, and yet three very different outcomes driven only by age and reinvestment. That is the whole point of qualifying deliberately rather than hoping.
Every relief described here shares one hard limit. The main-home exemption applies only to your habitual residence in Spain. It does nothing for a property you still own in the UK.
This catches British expats who assume that because a house was once their home, or is still their only property besides their Spanish one, some form of main-home relief will shelter it. Once you are Spanish tax resident, Spain taxes the worldwide gain on a UK sale, and the vivienda habitual exemption simply does not reach across the border.
If you are contemplating selling a former UK home from Spain, that is a very different calculation, one where UK non-resident capital gains tax, UK Private Residence Relief and treaty credit all come into play, and where the Spanish reliefs offer no help at all. It deserves its own planning.
An exemption you qualify for but cannot evidence is an exemption at risk. Spanish reliefs are generous, but they are claimed on the facts, and the burden of showing those facts sits with you.
For the habitual-residence condition, that means being able to show the property really was your main home. Registration on the local padron, utility usage consistent with living there, and the absence of another competing main residence all help build the picture.
The reinvestment reliefs add a second evidential layer: proof that the money went where it needed to go, and within the deadline. A clean file assembled at the time is worth far more than a reconstructed one produced under query, and it is the difference between a relief that holds and one that is challenged.
None of this is burdensome if it is done as you go. The expat who keeps the completion deeds, the improvement invoices, the padron certificate and, where relevant, the new purchase or annuity paperwork in one place has effectively pre-answered any question Hacienda might raise. The exemption then becomes a matter of record rather than a matter of argument.
{{INSET-CTA-2}}
Because Spain has no split-year treatment, the year in which a sale falls is decided across the whole calendar year, and timing can quietly change the outcome of even a well-qualified exemption.
A few sequencing points recur for expats.
None of these are exotic. They are ordinary decisions, made in the wrong order or a few months too early, and they are exactly the kind of thing that timing a disposal across two tax years is meant to address. The reliefs reward patience and sequence, and they penalise haste.
The reliefs here are generous but conditional, and the value of advice is in qualifying cleanly rather than hoping the exemption simply appears.
The aim is a decision made in the right order, with the paperwork already in place, rather than a relief claimed in hope after the sale has completed.
If you are reading this and thinking:
then the useful next step is a short conversation before you list the property, not after you complete. Most of these questions have clear answers once someone looks at your dates, your age and your reinvestment plans together.
The reliefs are there to be used. They are simply easier to secure early than to rescue late.
Spain's main-home exemption is not about:
It is about:
The gain on your Spanish home really can be free of tax. Whether it is comes down to a handful of conditions and deadlines you can plan around comfortably, provided you look at them before you sell rather than after.
No. Unlike the UK, the exemption is conditional. The gain on your Spanish vivienda habitual can be fully exempt if you reinvest the proceeds into another main home within two years, or if you are over 65 and meet the conditions. Otherwise the gain is taxed as savings income at 19% to 30%.
If you sell your Spanish main home and reinvest the proceeds into a new main home within two years, the gain is exempt in proportion to the amount reinvested. Reinvest 100% and the whole gain is exempt; reinvest less and the unreinvested share of the gain remains taxable.
Generally not on your main home. If you are over 65 and sell your vivienda habitual, having usually lived there at least three years, the gain is fully exempt with no need to reinvest. Over-65s can also exempt gains on other assets by reinvesting up to EUR 240,000 into a life annuity within six months.
No. The main-home exemption applies only to your habitual residence in Spain. A UK property is treated as any other asset, and once you are Spanish tax resident, Spain taxes the worldwide gain on its sale. UK non-resident CGT, Private Residence Relief and treaty credit apply on the UK side instead.
You must reinvest the proceeds into a qualifying life annuity within six months of the sale, and the exemption applies to reinvestment of up to EUR 240,000. The annuity structure and exact treatment should be confirmed with a specialist before you commit, because errors can forfeit the relief.
Keep evidence that the property was your genuine main home, such as padron registration and utility records, along with your purchase and sale documents, improvement invoices, and, for reinvestment reliefs, proof of the new purchase or annuity and its timing. A clean file assembled at the time protects the relief if it is queried.
Peter works with expatriates and internationally mobile clients whose financial lives span more than one country and require careful coordination. With over a decade of experience, he helps clients bring structure and clarity to complex international arrangements, ensuring their long-term plans remain robust, compliant, and aligned with their wider family and lifestyle goals.
This article is for information purposes only and does not constitute financial advice. Financial planning outcomes depend on individual circumstances, residency, tax status, and objectives. Professional advice should always be sought before making financial decisions.


Ordered list
Unordered list
Ordered list
Unordered list