The exemption from Taxe sur le Profit Immobilier (TPI) on the main residence is one of the most important mechanisms in real estate taxation in Morocco. Understanding it properly helps you prepare the sale of your home, secure the notarial process and optimise your net real estate capital gain in full compliance with the law.

1. Reminder: TPI and real estate capital gain

TPI (real estate capital gains tax) is due when you sell a property for a price that is higher than its acquisition cost.

In general:

  • the real estate capital gain is the difference between the sale price and the cost price (purchase price, acquisition costs, eligible renovation works, etc.);
  • this net gain is, in principle, taxed at a rate of 20% (subject to the current Finance Law).

The sale of the main residence may, however, benefit from a TPI exemption, under certain conditions.

2. When is a property considered a main residence?

To qualify for the exemption, the property must be recognised as the owner’s principal home by the Moroccan tax authorities. In practice, this is the dwelling:

  • where the owner lives on a regular and effective basis;
  • where they receive mail and manage their day‑to‑day life;
  • which is neither a secondary home nor a purely rental investment.

The exact rules (minimum occupation period, special cases, etc.) are set by the Finance Law and may evolve. It is therefore essential to check the conditions applicable at the time of the sale.

 

3. General conditions for TPI exemption on the main residence

Without going into figures that may change, the underlying logic is stable:

  1. Real and continuous occupation
    The exemption targets the seller’s actual home, not a property held purely for speculation. Discontinuous occupation or predominantly rental use can jeopardise the tax advantage.
     
  2. Minimum occupation / holding period
    The law requires a minimum occupation period of the property as a main residence. Once this threshold is met, the gain realised on the sale of the main residence may be exempt from TPI, subject to the other legal conditions.
     
  3. Only one main residence
    An owner may hold several properties, but only one main residence can benefit from the exemption. In the event of an audit, you must be able to prove that the property sold is the one where you actually lived.
     

4. Documents to prepare for the tax authorities

The TPI exemption on the main residence is not automatic. The tax administration may request concrete evidence, such as:

  • national identity card or residence permit showing the address of the property;
  • water, electricity, internet or phone bills in the owner’s name;
  • residence certificate issued by the local authority or commune;
  • bank documents, receipts and correspondence sent to this address.

Keeping these documents for several years strengthens your file in the event of a review by the Direction Générale des Impôts.

5. Common mistakes that lead to loss of the exemption

Several situations can result in refusal of the TPI exemption on the main residence:

  • Renting out the property (fully or almost fully) shortly before the sale, while presenting it as a main residence;
  • being unable to prove the minimum occupation period required by law;
  • having official documents (ID card, bills, certificates) showing a different main address;
  • confusing the purchase date with the actual move‑in date (long renovations, delayed occupation, etc.), which may reduce the recognised occupation period.

Support from a notary or tax adviser generally helps anticipate and avoid these pitfalls.

6. Special cases: expatriates, MRE and foreign owners

For Moroccans Residing Abroad (MRE), dual nationals or foreign owners in Morocco, the key question is the same: proving that the property sold is indeed a main residence in Morocco.

In practice:

  • a home used only for holidays will hardly be recognised as a main residence;
  • a property where the owner stays regularly and for extended periods, with consistent documentary proof, may be treated as a main residence, subject to the applicable legal conditions.

For these profiles, it is strongly recommended to seek a tailored opinion before putting the property on the market.

7. Role of the notary and best practices

The notary plays a central role in the application of TPI:

  • checking eligibility for exemption as a main residence;
  • collecting supporting documents to be provided to the tax authorities;
  • preparing the TPI declaration or the exemption clause in the deed of sale.

To secure your transaction:

  • address the main residence issue several months before the sale;
  • have your situation reviewed by a professional (notary, chartered accountant, tax adviser) in light of the latest Moroccan tax legislation;
  • ensure consistency between your actual use of the property, your official documents and what you declare.

A clear understanding of the TPI exemption on the main residence in Morocco will help you maximise your net real estate capital gain while fully complying with Moroccan real estate tax rules.