The exemption for reinvestment in primary residence allows the capital gains obtained from the sale of the primary residence to be excluded from taxation if they are reinvested in another primary residence under the terms of the law. This issue is widely known, but in recent practice, frequent questions arise: does teleworking justify leaving the new home before three years without losing the exemption? Does converting the home into a tourist rental (Airbnb/Booking) cause it to lose its status as a primary residence? Below, we explain the legal framework, administrative doctrine and applicable case law, with guidelines on evidence and compliance.

Applicable legal framework (Spanish state legislation)

  • Personal Income Tax Law: regulates the exemption for reinvestment in the primary residence. It requires reinvesting the amount obtained in the purchase of a new primary residence ‘under the regulatory conditions’.
  • Personal Income Tax Regulations: defines primary residence (effective and permanent residence for 3 consecutive years) and provides for exceptions to this period when circumstances necessarily require a change of address.
  • Calculation and reinvestment periods (Spanish Tax Agency criteria): reinvestment must be made within 2 years and, if the new home is under construction, the work must be completed within 4 years from the start of the investment, acquiring ownership.

Recent administrative doctrine (Spanish Directorate-General for Taxation)

  1. Teleworking: the fact that a company offers optional teleworking does not, in itself, constitute a ‘circumstance that necessarily requires a change of residence’. If the taxpayer has a choice, the three-year period does not apply. A substantial change in working conditions imposed by the transfer must be justified; otherwise, the exemption would be lost and the situation would have to be regularised.
  2. Tourist rentals (Airbnb/Booking): using a property for holiday rentals is incompatible with the permanent use inherent in the concept of a habitual residence; the status of habitual residence is lost as soon as effective residence ceases.

Relevant case law (Spanish Supreme Court and unified administrative criteria)

  • Reinvestment with housing under construction (2 years): the Supreme Court (Third Chamber) has ruled that it is sufficient to reinvest within 2 years even if the property is under construction; physical delivery within that period is not necessary.
  • External financing and reinvestment (TEAC, in unification of criteria, following the Spanish Supreme Court): reinvestment financed with a loan (subrogation or new) is valid, and it is not essential to apply the entire proceeds of the sale.
  • Homeowners’ associations and tourist rentals (Spanish Horizontal Property Law): the First Chamber (Civil) admits that associations may prohibit tourist apartments when the statutes veto economic activities; tourist rentals are economic in nature. (Relevant for the viability of tourist use, distinct from the tax classification of primary residence).

Note: the classification of habitual residence is a state matter (LIRPF/RIRPF). The regulation and control of tourist use is the responsibility of the Regional Government of Andalusia and local councils, which affects the legal possibility of using the property for this purpose, but does not alter the tax concept of ‘habitual’ per se.

Time limits for exemption for reinvestment in primary residence: reinvest within 2 years and reside for 3 years

Practical summary: reinvestment within a maximum of 2 years; effective residence for 3 years unless there is a valid reason. Checklist included in the post.

Circumstances that necessarily require a change of residence: practical guide on how they affect the exemption for reinvestment in the primary residence

To be exempt from the three-year period without losing the reinvestment exemption, the need must be objective and unforeseen, unrelated to the taxpayer’s mere convenience.

Guidelines examples

Circumstances that necessarily require a change of address: practical guide on how they affect the exemption for reinvestment in your primary residence

Circumstances that necessarily require a change of address: practical guide on how they affect the exemption for reinvestment in your primary residence

Tax effects and deadlines for exemption for reinvestment in primary residence

Essential rules

  • Reinvestment: within two years of transfer (in a single transaction or successively).
  • Property under construction: reinvestment within 2 years is sufficient; completion may exceed this period, but the Spanish Tax Agency generally requires completion within 4 years from the start of the investment and acquisition of ownership.
  • Loss of habitual residence before 3 years without cause: regularisation of the exemption applied.

Compatibility with tourist rentals

  • Converting the property into a tourist accommodation (Airbnb/Booking) entails the cessation of effective residence and, therefore, loss of habitual residence status from the moment it is used for that purpose.

In addition, in Andalusia and Malaga there are specific requirements and controls (e.g. Decree 28/2016 and Decree-Law 1/2025).

Evidence checklist (to support exemption for reinvestment in primary residence if vacated before 3 years)

  1. Employment documentation: transfer letter, substantial modification, change of centre or incompatible shifts.
  2. Temporality and supervening circumstances: dates proving that the cause arose after acquiring/occupying the property.
  3. Uninhabitability/serious personal causes: technical or medical reports (if applicable).
  4. Traceability of reinvestment: deeds, payments, financing, construction milestones (if under construction).
  5. Effective use as a residence until the event giving rise to the exemption: registration, consumption, correspondence.
    (The burden of proof lies with the taxpayer; management/inspection will assess its sufficiency).

Conclusion and specific actions in cases of exemption for reinvestment in primary residence

  • Voluntary teleworkingin principle, the 3-year period does not apply; if the exemption was applied and is abandoned before the end of the period without good cause, the situation must be regularised.
  • Property under construction → the exemption for reinvestment in the primary residence is maintained if the amounts are reinvested within 2 years; review the completion and acquisition of ownership in accordance with AEAT/TS criteria.
  • Tourist rentals (Airbnb/Booking)incompatible with habitual residence: the status is lost from the start of that destination.

What to do

  • Before selling: plan your reinvestment (2-year schedule; if there is construction work, set milestones and financing).
  • If you plan to leave within 3 years: gather evidence of necessity (work, health, etc.).
  • If you are considering renting out to tourists: check the community statutes (Horizontal Property Law) and Andalusia/Malaga regulations; assume that you will lose your habitual residence status for income tax purposes. Judiciary + Andalusia Regional Government +2
  • Keep all documentation (deeds, payments, certificates, business communications) for possible verification.

If you want to buy a property, business premises, building or parking, or sell a property in Malaga, and you want to avoid problems following the purchase of a property in Malaga, in the Law Firm Pérez Parras Economists and Lawyers in Málaga we are expert lawyers in the purchase and sale of properties in Malaga and Nerja, with a team of lawyers and economists bilingual English / Spanish who can advise you to avoid surprises in the purchase of your property. We have offices in the centre of Malaga and Nerja. Do not hesitate to contact us and ask us for a quote to accompany you in the process of buying or selling your property. We will prepare and review your earnest money contract after ensuring that the purchase you wish to make is viable and secure, without hidden charges of any kind, and we will help you and deal with all the taxes associated with your property purchase and sale operation in Málagaoptimising for example the IRPF to pay if the property comes from an inheritance, advising you until the end of your purchase, or sale of the property, including the tax declaration, whether you are resident or taxed as a non-resident, and any other procedure with the Administration or Land Registry. You should also know that with the purchase of your property worth at least 500,000 euros in Spain we can help you to process your Golden Visa Investor Residence Permit for you and your family members. Equally, if you have any difficulties following the sale or purchase of a property, please do not hesitate to contact us so that we can advise you and defend you in or out of court if necessary. If you are a highly qualified professional in Malaga and wish to purchase your property in Malaga, we will also advise you in every step of the purchase process, ensuring that the property you wish to buy and the investment you wish to make will not cause you any problems, protecting your interests, organising your taxes and taxation as a highly qualified professional, so that you can develop your professional career and settle your life and your future in Malaga or Nerja with all the guarantees of the best legal advice.

At Pérez Parras Economists and Lawyers, we are experts in national and international taxation for residents and non-residents, and we optimise your taxation in accordance with Spanish law.

Besides, at Pérez Parras Economists and Lawyers in Malaga and Nerja we specialise in Tourism Law, and have helped many property owners in Malaga to buy a property, business premises, building or car park, or sell a property in Malaga and, in many cases, to register the property as a tourist property. If you are going to buy a property or flat with the intention of exploiting it or renting it out as tourist accommodation, you should seek advice from lawyers who are experts in tourist flats and Communities of Neighbours, in order to buy a property in a Community of Owners that does not have prohibitions on the exploitation of new tourist accommodation, or even limitations. Furthermore, if you wish to buy a property, business premises, building or car park, or sell a property, at Pérez Parras Economists and Lawyers we are experts in the purchase and sale of properties, with a team of lawyers and economists who will be able to advise you to avoid surprises. Do not hesitate to contact us and ask us for a quote to accompany you in the process of buying or selling your home. We will prepare and review your earnest money contract after ensuring that the purchase you wish to make is viable and secure, without hidden charges, and we will help you and process all the taxes associated with your purchase and sale operation, optimising for example the IRPF to be paid if the property comes from an inheritance, advising you until the end of your purchase, or sale of the property, including the tax submission and any other procedure with the Administration or Land Registry. We are expert lawyers in Immigration Law, and specialised in obtaining Visas and Residence Permits in Spain under the Law to Support Entrepreneurs and their Internationalisation. We can help you with all the legal and ecomincal matter for the purchase or rental of your property in Malaga.