Spanish income tax treats two homes very differently even when they look alike: the one where you live and the one you visit. The difference is not about size, value or how long you have owned it. It is about where you actually live, and it determines whether the gain on a sale can be exempt.

The legal definition of main residence
Article 41 bis of the Income Tax Regulation (Royal Decree 439/2007) defines the main residence, for the purposes of the reinvestment and over-65 exemptions, as the building that has been the taxpayer's residence for a continuous period of at least three years. It must be occupied "de manera efectiva y con carácter permanente" by the taxpayer, starting within twelve months of the purchase or completion of the works. A shorter period is accepted only when the taxpayer dies or circumstances necessarily require a change of home: marriage, separation, job transfer, first job, change of job or other similar justified reasons.
Everything else is, for tax purposes, a second home or a property let to others, however much you use it.
Only one home can qualify
A person has a single main residence at any given time. If you own a flat in Madrid where you work and live, a beach apartment in Estepona and a house in your home country, only one of them is your main residence. The Tax Agency looks at the facts: where you sleep most nights, where your utility consumption is, where your children go to school, where you receive post and where you are registered in the padrón. A town hall registration on its own does not prove residence, and an empty flat with minimal consumption will not pass as a main home.
Exemptions on sale that only the main residence enjoys
| On sale | Main residence | Second home |
|---|---|---|
| Reinvestment exemption (art. 38 Income Tax Act) | Yes, full or proportional, if reinvested within two years before or after | No |
| Over-65 exemption (art. 33.4.b) | Yes, with no need to reinvest | No |
| Over-65 reinvestment in a life annuity (art. 38.3) | Yes | Yes: up to €240,000 invested within six months in an insured life annuity |
| Tax on the gain | Only the non-exempt part | Whole gain, at 19 % to 30 % on the savings scale |
The life annuity relief of article 38.3 applies to any asset, not only the home, which is why it appears in both columns.
While you own it: deemed income on second homes
A main residence produces no taxable income while you live in it. A second home that is neither let nor your main residence does: Spanish law attributes a deemed income. Up to the 2026 tax year it is 2 % of the cadastral value, or 1.1 % if a general valuation in the municipality came into force on or after 1 January 2012. From 2027 a scale applies to the sum of the cadastral values of these properties: 1.1 % up to €100,000, 1.5 % up to €500,000, 2 % up to €1,000,000 and 3 % above (article 85, as amended by Royal Decree-law 29/2026). Residents add it to their general income. Non-residents declare it on Modelo 210 and pay 24 %, or 19 % if they live in the EU or the EEA. If the property is let, the rent is taxed instead, with expenses deductible under the rules that apply to your situation.
The typical cases of foreign owners
- Resident in Spain with a holiday flat on the coast. The city home where you live is the main residence; the coastal flat is taxed on deemed income and its sale is fully taxable.
- Non-resident with a holiday home in Spain. It has never been a main residence. Its sale is taxed at 19 % on the gain, the buyer withholds 3 % of the price, and the reinvestment exemption does not apply.
- Former resident who moved to another EU country. If you lived in the Spanish home as your main residence and sell it within two years after leaving, article 41 bis.3 still treats it as your main residence, and the seventh additional provision of the Non-Residents' Income Tax Act allows the reinvestment exemption.
- A second home that becomes the main residence. If you move into it permanently, it can become the main residence, but the three years start when you start living there.
Worked example: a retiree selling a beach apartment
Pilar, 67 and resident in Spain, sold her main residence five years ago. She now sells her apartment in Marbella, which she used in summer, with a gain of €90,000. The over-65 exemption does not apply, because it was not her main residence. The tax is 19 % on €6,000, 21 % on €44,000 and 23 % on €40,000: €1,140 + €9,240 + €9,200 = €19,580. If she invested the proceeds within six months in an insured life annuity, article 38.3 would exempt the gain on up to €240,000 invested.
Plan before you sell
If you have two homes and intend to sell one, decide which one is truly your main residence and whether you meet the three years. If you are thinking of moving to the second home and selling the first, timing matters: the old home stays eligible if it is sold while it is still your main residence or within two years after you leave it (with exceptions for divorce and for over-65s or dependent people who move to a care centre or a relative's home, since 8 October 2026).
Jacob Salama can look at your homes and plans in English or Spanish. Contact us, or read the Spanish article on vivienda habitual y segunda residencia.
Questions about main residence and second homes
Can I have two main residences in Spain?
No. For income tax purposes a person has only one main residence: the home where he or she actually and permanently lives. Any other property is a second home or a rental property.
I am over 65. Is the sale of my beach flat exempt?
No. The over-65 exemption of article 33.4.b of the Income Tax Act applies only to the main residence. A second home sold by someone over 65 is taxed like any other gain.
I am a non-resident with a holiday home in Spain. Can I use the reinvestment exemption when I sell it?
Not if it was only a holiday home. The exemption for EU and EEA residents covers the sale of what was their main residence in Spain, which requires having actually lived there as a main home.
Does registering at the town hall make a home my main residence?
Not on its own. The padrón is evidence, but what counts is actual, continuous residence, which the Tax Agency checks with utility consumption, bank records and other data.
Last reviewed: 22 November 2026. General information on Spanish law in force; it does not replace advice on your specific case.
Further reading
