Capital Gains Exemptions in Spain: Main Home and Over 65
Sell a property in Spain and the Agencia Tributaria usually wants a share of whatever you gained. But a Spanish tax resident who sells their main home has real ways to reduce that bill to zero. Reinvest in another main home and the gain can be fully exempt. Turn 65 and sell your main home, and there is no capital gains tax at all, no reinvestment required. There is even a third, lesser known route for residents over 65 selling any other asset, using the proceeds to buy a life annuity. All three reliefs share one condition that catches people out constantly: they are for tax residents with a genuine main home in Spain, not for a Dutch or German family with a lovely apartment on the coast that they visit twice a year.
These reliefs are for residents, not holiday home owners
Before anything else, understand who these three exemptions are actually for. All three require tax residence in Spain, meaning genuine tax residence under Spanish law, not simply owning a Spanish property and spending a few weeks there each year. Two of the three also require the property being sold to have been the seller's vivienda habitual, their genuine habitual residence, the place they actually lived day to day, not a holiday home kept spotless for the August visit.
This is exactly where things go wrong for plenty of Dutch and German second home owners. Picture a Dutch couple who bought an apartment in Torrevieja fifteen years ago, spend six or eight weeks a year there, rent it out for the rest, and think of it as their Spanish home. If they remain tax resident in the Netherlands, and the apartment was never their genuine main home under the Agencia Tributaria test, none of the three exemptions in this article apply to them at all. When they sell, they are taxed as non residents on the full gain, with no relief for reinvesting and no relief for their age. It is one of the more expensive misunderstandings in Spanish property tax, precisely because the word home gets used loosely in conversation, and Spanish tax law does not use it loosely at all.
The reinvestment exemption: selling your main home to buy another
The most commonly used of the three reliefs applies when a tax resident sells their habitual residence and reinvests the proceeds into a new one. Sell a flat in Valencia and buy a house in Alicante within two years, and the gain on the sale can be entirely exempt from capital gains tax. That two year window runs in either direction, you can buy the new home first and sell the old one after, or sell first and buy within the following two years.
What decides the size of the exemption is how much of the proceeds actually go back into the new main home. Reinvest all of it and the whole gain is exempt. Reinvest only part, say because you downsize and keep the difference, and only that proportion of the gain escapes tax, with the rest taxed as normal.
There is more flexibility on location than people expect. The new main home does not need to be in the same town or even the same country, it can be anywhere in the EU or the EEA, so a resident who sells in Marbella and reinvests in a home in Portugal or France can still qualify, provided Spain remains where they are tax resident. What the tax authority does insist on is that the new property genuinely becomes your main residence, actually lived in, not bought and left empty or rented out. And a step people forget entirely: you need to state your intention to reinvest on your tax return for the year of the sale, this is not something you can claim years later once the paperwork happens to fall into place. If a new Spanish home is part of the plan, it is worth understanding what buying property in Spain actually involves before the sale proceeds are committed, since the reinvestment window and the purchase timeline need to line up.
The over 65 exemption: no reinvestment needed at all
Once a tax resident turns 65, the rules get considerably kinder. Sell your habitual residence at 65 or older, and the entire gain is exempt from capital gains tax, full stop. There is no requirement to reinvest anywhere, in anything. Bank the money, move into a rental, move in with the children, or leave Spain altogether, none of it affects the exemption once the sale itself qualifies.
The condition that actually matters is the same one from the reinvestment relief: the property has to have genuinely been your habitual residence. The Agencia Tributaria works from continuous occupation as its test, and three years is the threshold most commonly cited as demonstrating genuine habitual use, though it is not a single rigid cut off written into one universal rule. The tax authority also recognises certain situations that end occupation early without breaking the exemption, marriage, a change of job, or needing care being the examples that come up most often.
Consider a British retiree who bought an apartment in Fuengirola years ago as a holiday place, kept their main home and their tax residence in the United Kingdom, and visits Spain for a few months each winter. At 65, they might reasonably assume the over 65 exemption will apply when they eventually sell. It will not, not even close. They are not a Spanish tax resident, and the Fuengirola apartment was never their habitual residence, it was a holiday home. When they sell, they are taxed as a non resident on the whole gain. This exemption exists for people who genuinely live in Spain and are genuinely resident there for tax, not for owners of a Spanish holiday flat who happen to have turned 65.
The lesser known relief: reinvesting in a life annuity
The two exemptions above only cover the sale of a main home. There is a third, much less well known relief that applies more broadly, and it has nothing to do with property at all. A tax resident aged 65 or over who sells any asset, shares, a second property, a business, can exempt the gain by using the proceeds to set up an insured life annuity for themselves, a renta vitalicia.
The mechanics are specific and worth getting right. The annuity has to be set up within six months of the sale, a much tighter window than the two years allowed for reinvesting in a main home. There is also a lifetime cap, the maximum amount that can be reinvested this way across all such annuities is 240,000 euros. And exactly as with the main home reinvestment relief, putting only part of the proceeds into the annuity exempts only that proportion of the gain, with the rest taxed in the normal way.
This relief tends to get overlooked because it sits outside the property conversation entirely, but for a resident over 65 selling a second home, a share portfolio, or a business built over decades, it can be a genuinely useful way to soften a tax bill that the two main home reliefs simply cannot reach.
Why non residents almost always miss out
It is worth being blunt about the biggest gap in all of this. None of the three reliefs above are available to a non resident selling a Spanish holiday home, and this is exactly where Dutch and German second home owners run into trouble. If you remain tax resident in the Netherlands or Germany, and your Spanish property was always a holiday home rather than your genuine main residence, the over 65 exemption is simply not available to you. The Agencia Tributaria has confirmed this position in its own rulings, non residents cannot use it, however old you are and however long you have owned the property.
The same trap catches German second home owners just as often. A German family who bought a villa near the Costa Blanca, spend the summer there every year, and remain tax resident in Germany the rest of the time, are in exactly the same position as the Dutch couple mentioned earlier. However attached they feel to the property, however many decades they have owned it, it was never their vivienda habitual and they were never Spanish tax residents. The exemptions in this article, all three of them, are built around Spanish tax residence and genuine habitual occupation, and a holiday property meets neither test, no matter how it feels to the owner.
The reinvestment exemption sits in slightly murkier territory. Because it derives partly from EU law on the free movement of capital, some EU and EEA residents selling a Spanish property have argued they should be able to reach the reinvestment relief even without being Spanish tax residents, on the basis that Spain should not treat a resident of another EU country selling their genuine main home worse than it treats its own residents. This is a real argument and it has had some traction, but it remains genuinely contested ground rather than a settled rule you can assume applies to you. Whether it works depends on the specifics of your situation, your country of residence, and how the case is built, and this is squarely a professional advice situation, not something to plan a sale around on the strength of a blog post.
Why these exemptions are worth understanding properly
Capital gains on a Spanish property sale are taxed as savings income under Spain's IRPF, personal income tax, at rates that climb as the gain grows. For most sellers that is a real bill, often running into tens of thousands of euros on a property that has appreciated over many years of ownership. That is exactly why these three exemptions matter so much for the people who actually qualify for them, and why it is worth understanding precisely which one might apply to your situation, rather than assuming any of them do.
Frequently asked questions
Selling your Spanish home without the tax surprises
Our modules walk you through the residency and tax questions that decide whether these exemptions actually apply to you, before you commit to a sale.
Knowing whether you count as a genuine resident with a real habitual home changes the entire tax outcome of a sale, so it is worth checking before you list the property.