Skip to main content
playbook · 16 June 2026 6 min
Part of: The Buyer's Playbook

Capital-gains tax (TPI) for foreign sellers of Moroccan property

When a foreigner sells Moroccan property, Taxe sur le Profit Immobilier (TPI) is withheld at source by the notaire — 20% of the gain, with a minimum of 3% of the sale price. A primary-residence exemption kicks in after 6 years, but it requires conditions most foreign buyers don't meet. The TPI paper trail interlocks with the FCR repatriation file — get it wrong and capital can get stuck in dirhams.

Capital-gains tax (TPI) for foreign sellers of Moroccan property

The headline numbers

The tax on a Moroccan property sale is Taxe sur le Profit Immobilier (TPI), set in the *Code Général des Impôts* (DGI) and withheld at source by the notaire before sale proceeds reach the seller's bank account.

For a foreign individual seller, two numbers matter:

  • 20% of the profit (sale price minus acquisition cost minus deductible expenses and a defined annual inflation adjustment).
  • 3% minimum of the sale price — if 20% of the calculated gain is below 3% of the sale price, the notaire withholds 3% of the sale price instead.

In practice on a foreign sale the 3% floor often binds — because either the documented acquisition basis is thin, or the indexation hasn't been formally claimed, or the gain is real and 20% × gain exceeds 3% × price anyway. Either way, 3% of the sale price is the practical floor you should price into your model on day one.

The 6-year primary-residence exemption

The Code Général des Impôts exempts capital gains on the sale of a dwelling that has been the seller's actual main residence for at least 6 years at the date of sale. The exemption is real and meaningful — for a Moroccan-resident family it is the standard route to a tax-free sale.

For a foreign buyer who holidays in Morocco or rents the property out, the exemption is usually not available: the residence test is a *de facto* habitation test, not a paperwork formality. If you spend most of the year outside Morocco and rent the place when you're not there, you should price your model as if no exemption applies. If your circumstances genuinely change (you become a Moroccan tax resident and the property is your main home for 6+ years), confirm with a Moroccan accountant in writing before the sale.

How the withholding works in practice

On the *acte de vente*, the notaire calculates the higher of (20% × gain) and (3% × sale price), withholds it from the proceeds, remits it to the Trésor, and issues the seller a tax-clearance certificate (attestation) — without which the title transfer doesn't complete. There is no settle-up later: the notaire's withholding *is* the tax payment.

This is also why the acquisition basis matters even on day one of buying: the higher the documented acquisition cost (purchase price + transfer duties + notary fees + documented improvements), the lower the gain on which 20% is calculated, and the more likely the 3% floor takes over rather than a larger 20%-of-gain bill. Keep every invoice. File every notary receipt. Document every renovation.

How TPI interlocks with the FCR repatriation file

For a foreign seller, the tax-clearance certificate is one of the four documents the Moroccan bank submits to the Office des Changes to repatriate sale proceeds (alongside the notarised deed, the original *Bordereau de Change* from the inbound wire, and the bank's repatriation request — see the FCR playbook). Without the TPI clearance there is no repatriation: proceeds stay in dirhams.

In other words, TPI isn't only a tax cost — it's part of the legal paper trail that lets you take money out of Morocco. The notaire's withholding is what produces the clearance certificate.

The honest ledger

What this proves:

  • TPI is a real, statutory cost (20% of gain or 3% of sale price, whichever is higher) — built into your exit math from day one.
  • The withholding happens at the notaire, not later — there is no end-of-year reconciliation by the seller.
  • A documented acquisition basis materially affects whether you pay 20% × gain or the 3% floor.

What it does NOT remove:

  • The 6-year primary-residence exemption is real but rarely available to a non-resident foreign seller — do not assume it applies without written confirmation from a Moroccan tax adviser.
  • Specific deductions, the inflation/indexation table, and treatment of works carried out by the seller are technical — your notaire and accountant own the calculation, not this article.

*Editor-authored against the Moroccan Code Général des Impôts (DGI) and the FCR / Office des Changes regime; rates verified against the platform's macro-knowledge layer. The agentura researcher hit a transient rate-limit on this brief — figures here are rate-stable Moroccan tax law, not forward-looking. Analysis, not legal or tax advice — confirm specifics with your Moroccan notaire and accountant.*

What capital-gains tax does a foreign seller pay in Morocco?

Taxe sur le Profit Immobilier (TPI), set in the DGI Code Général des Impôts and withheld at source by the notaire — 20% of the profit, with a minimum of 3% of the sale price. Whichever is higher applies.

What is the 3% minimum?

If 20% × gain is below 3% × sale price, the notaire instead withholds 3% of the sale price. On thin acquisition bases or unclaimed indexation the floor often binds — price 3% of sale price into your exit model on day one.

Can I use the 6-year primary-residence exemption as a foreigner?

Usually not. The Code exempts gains on a dwelling that has been the seller's actual main residence for 6+ years. For a foreigner who holidays in Morocco or rents the property out, the de facto habitation test isn't met — assume no exemption unless your Moroccan accountant confirms otherwise in writing.

When is the tax paid?

At the notaire, before sale proceeds reach you. The notaire withholds the higher of 20% × gain and 3% × sale price, remits it to the Trésor, and issues a tax-clearance certificate. There is no later reconciliation by the seller.

Why does TPI matter for getting my money out of Morocco?

The tax-clearance certificate is one of the four documents the Moroccan bank submits to the Office des Changes to repatriate sale proceeds — alongside the notarised deed, the original Bordereau de Change from the inbound wire, and the bank's repatriation request. Without the TPI clearance, proceeds stay in dirhams.