Selling your main residence in Morocco: the conditions for exemption
The sale of a dwelling occupied as a main residence may be exempt from tax on the real estate gain. The exemption is, however, subject to precise conditions laid down by Article 63 of the General Tax Code.
The principle
The gain made on the sale of a dwelling occupied as a main residence is exempt where the owner has occupied it as such for at least five years at the date of sale.
The conditions to check
- Duration: at least five years of occupation, assessed on the day of the sale. Years spent in the dwelling under an Ijara Mountahia Bitamlik contract count.
- Use: the dwelling must not be let or used for a business activity.
- Frequency: the exemption can be claimed only once in any five-year period.
- Land: the area of land surrounding the building is exempt only up to five times the built-up area.
- Timing: if you have already moved out of the dwelling, the sale must take place within the following year.
Other exemptions
If the main residence exemption does not apply, other cases provided for by the same article can be examined: total annual sales remaining below the 140,000-dirham threshold, social housing occupied for at least four years, or a transfer without consideration within the family circle referred to in the text, detailed in the article on gifting real estate. The real estate taxation page sets out all these rules.
If the exemption does not apply
The sale is then taxed on the net gain at 20% (Articles 65 and 73), without the tax falling below a floor of 3% of the sale price, subject to the terms of Article 144. The seller has thirty days after the sale to file and pay (Articles 83 and 173).
Supporting documents to gather
- the deed of acquisition and the land title;
- documents showing occupation at the dwelling's address during the required period;
- evidence of works and acquisition costs;
- the date on which the dwelling was vacated, where applicable.
Getting advice on your situation
This article presents general rules. For a specific case, see the real estate taxation page or consult the firm.
Published on 23 November 2026. Texts cited: General Tax Code, 2026 edition published by the Directorate General of Taxes (Articles 63, 65, 73, 83, 144 and 173).
A question about your case?
Present your request using the form below or write to the firm on WhatsApp to arrange a meeting at the firm, in central Casablanca. No documents are sent through the form.
Contact the firm on WhatsAppYour request
This form needs JavaScript to be sent. You can contact the firm directly on WhatsApp.
Contact the firm on WhatsApp