Skip to content
Tax & legal glossary Tax

Main Residence (Spain)

The main residence (vivienda habitual) is the dwelling in which the taxpayer lives continuously and permanently for at least three years, as set out in Articles 41 and 41 bis of the IRPF Regulations. Its classification triggers important tax benefits: exemption of the capital gain on reinvestment (Art. 38 LIRPF), full exemption for taxpayers aged 65 or over, and the historic state deduction for acquisitions before 2013. The transfer of a main residence may also be exempt from non-resident tax for EU/EEA residents.

The main residence (vivienda habitual) is the dwelling in which the taxpayer lives continuously and permanently for at least three years, as set out in Articles 41 and 41 bis of the IRPF Regulations. Its classification triggers important tax benefits: exemption of the capital gain on reinvestment (Art. 38 LIRPF), full exemption for taxpayers aged 65 or over, and the historic state deduction for acquisitions before 2013. The transfer of a main residence may also be exempt from non-resident tax for EU/EEA residents.

In practice

What Is a Main Residence in Spain

The main residence is the dwelling in which the taxpayer actually and permanently lives. Article 41 bis of the IRPF Regulations (RD 439/2007) establishes the conditions for a property to qualify:

  1. The taxpayer must inhabit it effectively and permanently.
  2. The taxpayer must have lived in it for a continuous period of at least three years (exceptions exist for death, marriage, separation, work relocation or other circumstances that necessarily require a change of residence).
  3. It must constitute the habitual residence at the date of transfer or at any point in the two prior years.

Tax Benefits Linked to the Main Residence

Main-Residence Rollover Exemption (Art. 38 LIRPF)

The capital gain on the sale of the main residence is exempt from IRPF if the entire proceeds are reinvested in acquiring a new main residence within two years before or after the transfer.

Exemption for Taxpayers Aged 65 or Over (Art. 33.4.b LIRPF)

Taxpayers aged 65 or over who sell their main residence are fully exempt from the capital gain with no reinvestment requirement. This exemption is particularly relevant in property and estate planning.

Historical Investment Deduction

For acquisitions made before 1 January 2013, taxpayers who were already claiming this deduction retain the right to continue doing so (transitional regime). The maximum deduction base is EUR 9,040 per year, at a general rate of 15 per cent.

Main Residence in Non-Resident Tax (IRNR)

Non-residents in Spain who sell their main residence and are tax-resident in another EU or EEA Member State may benefit from the exemption under Article 24.4 of the Non-Resident Income Tax Act, on the same conditions as Spanish tax residents.

Related service

Tax & Fiscal

View service
Back to glossary

DGT Observatorio

DGT Rulings (Spanish)

Spanish Tax Authority (DGT) binding rulings are published in Spanish. View the Spanish glossary entry for this term to see applicable doctrine.

View DGT rulings in Spanish →
Email
Contact