Property capital gains tax in Morocco (TPI): calculation, exemptions and deadlines
Selling property in Morocco: 20% rate, 3% minimum tax, how the gain is computed, main-home exemption, inheritance, non-residents and the 30-day deadline.
Updated: October 2026
In short
When you sell a home, a plot of land or commercial premises in Morocco, the gain is subject to income tax on real-estate profits, commonly called TPI (taxe sur les profits immobiliers). The seller pays it, not the buyer. The rate is 20% of the net gain, but the tax cannot be lower than a minimum of 3% of the sale price, even if you sell without a gain or at a loss.
Several cases are exempt, in particular the sale of a main home occupied for at least 5 years and gifts within the close family. The return and payment are due within 30 days of the sale; in practice the notary almost always handles them, using part of the price held in escrow. This guide follows the 2026 edition of the General Tax Code (CGI).
Which sales are taxable?
Article 61 of the CGI covers any “disposal” of real estate located in Morocco. This includes in particular:
- the sale of a flat, villa, riad, shop or plot of land, built or not, and the transfer of real property rights;
- the sale of shares in tax-transparent property companies and in unlisted property-rich companies, meaning companies whose assets are at least 50% real estate;
- swaps (treated as two sales), contributing a property to a company, the division of jointly owned property with a balancing payment (only on the part paid for), expropriation and gifts, except those exempt between close relatives.
These rules apply to private individuals. A developer or property dealer, for whom selling is a business, falls under a different regime.
The 20% rate and the 3% minimum tax
The net gain is taxed at a single 20% rate (Article 73-II-F-6° of the CGI). The former higher rate on the first sale of undeveloped urban land was abolished by the 2023 Finance Law: land is now taxed at the same rate as a flat, whatever the holding period.
Alongside this, Article 144-II sets a minimum tax equal to 3% of the sale price, due even when there is no gain. You therefore pay the higher of 20% of the net gain and 3% of the price. In practice, whenever the net gain is below 15% of the sale price, the 3% minimum applies. The minimum tax does not apply to exempt sales, except in the specific case of a main home sold for more than 4,000,000 MAD, explained below.
How the taxable gain is calculated
Under Article 65 of the CGI, the net gain is the difference between the sale price, less selling costs, and the revalued acquisition cost. Step by step:
- Sale price: the price stated in the deed. You may deduct documented selling costs you paid: agency commission, advertising, deed costs borne by the seller, compensation paid to evict an occupant.
- Acquisition price: the price you paid, plus acquisition costs. These are set at a flat 15% of the purchase price, unless you can prove higher actual costs (registration duty, land registry, notary, brokerage).
- Investment spending: construction, extension, renovation, improvement and site works, provided you have invoices. Interest on a mortgage (or the margin on a Murabaha or Ijara financing) used for the purchase or the works is added too.
- Revaluation: the acquisition price, increased as above, is multiplied by a coefficient that depends on the year of purchase and reflects inflation. The Ministry of Finance publishes the table every year by order in the Official Bulletin; the table for the year of sale is used.
If the purchase price or the works cannot be documented, the tax office estimates them itself. It can also adjust a sale price it considers below market value. And in an ex officio assessment with no other information, the tax base is the sale price minus 20%.
Worked example (illustrative)
Purely illustrative example: a flat bought for 900,000 MAD in 2010, with 65,000 MAD of invoiced works done the same year, sold for 1,900,000 MAD in 2026. The seller pays an invoiced 2.5% agency commission. For 2010, the table published in 2026 (order of 6 February 2026, Official Bulletin no. 7486) sets the coefficient at 1.296.
- Net sale price: 1,900,000 − 47,500 commission = 1,852,500 MAD
- Acquisition cost: 900,000 + 135,000 flat-rate costs (15%) + 65,000 works = 1,100,000 MAD
- Revalued cost: 1,100,000 × 1.296 = 1,425,600 MAD
- Net gain: 1,852,500 − 1,425,600 = 426,900 MAD; tax at 20%: 85,380 MAD
- 3% minimum: 1,900,000 × 3% = 57,000 MAD. The tax due is the higher of the two: 85,380 MAD.
If the same property sold for 1,500,000 MAD, the net gain would drop to 36,900 MAD (1,462,500 − 1,425,600), or 7,380 MAD at 20%. The 3% minimum (45,000 MAD) would then apply. And if it had been the seller’s main home for more than 5 years, no tax would be due in either case. Coefficients change every year: have your notary redo the calculation with the table in force on the date of sale.
Exemptions
- Main home: the gain is exempt if the property has been your main home for at least 5 years on the day of sale (Article 63-II-B). It must not have been rented out or used for business. If you own several homes, it is the one you designate as your main residence. You have one year after moving out to sell, and the exemption also covers the land up to 5 times the built-up area. It can only be used once in any 5-year period.
- 4,000,000 MAD ceiling: if the main home sells for more than 4,000,000 MAD, a 3% minimum tax is still due on the part of the price above that threshold only. Example: a sale at 5,000,000 MAD means 3% on 1,000,000 MAD, i.e. 30,000 MAD.
- Small sales: the gain is exempt for anyone whose property sales in the calendar year total no more than 140,000 MAD.
- Social housing: the sale of social housing as defined in the CGI, occupied by its owner as a main home for at least 4 years, is exempt under the same conditions as the main home.
- Family gifts: free transfers between parents and children (any generation), between spouses and between siblings are exempt, as are those made under a kafala. A gift to a nephew, cousin or unrelated person remains taxable, on the value stated in the deed.
Also exempt: transfers between co-heirs of undivided rights in farmland outside urban boundaries. Exemptions are not automatic: you must declare them and provide supporting documents (residence certificate, water and electricity bills, deed of gift, etc.).
Inherited or gifted property
Inheriting is not itself taxed as a real-estate gain. But when you sell an inherited property, you need its acquisition value. The CGI uses the market value on the date of death, as recorded in the inventory drawn up by the heirs or, failing that, as declared by the seller, ignoring any partition deeds made after the death. The tax office can challenge it if it looks inflated.
For a property received as an exempt family gift, watch out: the starting value is not the value of the gift, but the price of the last purchase for consideration (plus works), or the value at the last inheritance if that came later, or the building cost if the donor built it. A gift does not “reset the clock”.
Return, payment and penalties
The seller must file the real-estate gain return and pay the tax within 30 days of the sale date (Articles 83 and 173), with evidence of costs and works. The notary must read these rules to you at signing and, in practice, holds back enough of the price to pay the tax before releasing the balance to you.
Since 2023 you can request a prior ruling (avis préalable) from the DGI online, within 30 days of the preliminary sale agreement (Article 234 quinquies). The answer, due within 60 days and valid for 6 months, serves as a tax computation or exemption certificate. If you then file on that basis, the gain will not be audited. Without it, you must make a provisional payment of at least 5% of the sale price (the difference between the declared tax and that 5%), unless the sale is exempt; any excess is refunded after review.
Late filing and payment penalties add up: a 5% surcharge for a return filed up to 30 days late, 15% beyond that, and 20% for an ex officio assessment (minimum 500 MAD). Late payment carries a 10% penalty (5% if no more than 30 days late), plus 5% for the first month and 0.5% for each extra month.
Moroccans abroad and non-residents
A Moroccan living abroad, or a non-resident foreigner, follows the same rules as a resident: 20% rate, 3% minimum, the same calculation and the same 30-day deadline. The CGI has no specific rate for non-residents. The sale goes through a notary, by power of attorney if you cannot travel.
Worth knowing: the law treats as a main home the property a Moroccan abroad keeps to live in during stays in Morocco, or one occupied free of charge by their spouse, parents or children. Its sale can therefore be exempt after 5 years, provided it has not been rented out and you can prove it. Finally, your country of residence (France, Spain, Belgium, etc.) may also require you to declare the gain; tax treaties generally include a mechanism to avoid double taxation. Check with your own country’s tax authority.
Practical tips before you sell
- Gather the purchase deed and the receipts for duties paid at the time: if your actual costs exceed 15%, they reduce the gain further.
- Keep every invoice for works in your name, showing the contractor’s tax ID. Without an invoice, the expense does not count.
- Keep your mortgage statements: interest paid is added to the acquisition cost.
- For a main home, prepare proof of 5 years’ occupation (residence certificate, bills, address on your national ID card).
- Ask the notary for a written tax estimate as soon as the preliminary agreement is signed, and consider the DGI prior ruling to avoid the 5% provisional payment.
- Before the sale, pay the housing tax and the municipal services tax: the notary can only sign on presentation of the payment certificate. After the sale, keep the return receipt and the tax payment receipt.
Finally, do not under-declare the price: the tax office can raise it to market value, with surcharges. To set a realistic price, compare with prices per square metre in your area, for example with HabitatMaroc’s online valuation, then have your notary check the calculation.
Frequently asked questions
› How much tax do you pay when selling a flat in Morocco?
20% of the net gain (sale price minus the revalued purchase cost, fees and works), with a minimum of 3% of the sale price, unless an exemption applies.
› Is the sale of your main home taxed?
No, if you have lived in it for at least 5 years without renting it out. Above a price of 4,000,000 MAD, 3% is still due on the part above that amount.
› Do Moroccans living abroad pay TPI when selling in Morocco?
Yes, under the same rules as a resident. However, the home kept for stays in Morocco can be exempt as a main home after 5 years.
› How is the gain on an inherited property calculated?
The acquisition value is the market value on the date of death, as recorded in the heirs’ inventory or declared by the seller. The tax office can review it.
› When must the capital gains tax be paid?
Within 30 days of the sale, together with the return. The notary usually handles it by holding the amount back from the price.
› Can you know the tax amount before selling?
Yes: within 30 days of the preliminary agreement you can request a prior ruling from the DGI online, which replies within 60 days.
Read next
General information, not legal advice: have it checked by a notary, adoul or lawyer.