MoroccoROI

Real estate capital gains tax in Morocco 2026: TPI calculation, rates and exemptions

Selling property in Morocco in 2026: how the TPI works (20% of the gain, 3% of the price minimum), deductible costs, exemptions and a step-by-step example.

HY

Hamza Yerrou

Updated: 2026-06-20 6 min

Calculating the real estate profits tax (TPI) when selling property in Morocco.

What you pay when you resell property in Morocco

When you sell an apartment, a villa or a plot of land in Morocco, the profit you make is subject to the Real Estate Profits Tax (Taxe sur les Profits Immobiliers, TPI). The seller pays it, at the time of sale, and the amount depends on your capital gain, not on the sale price alone.

Many investors focus on rental yield and forget the exit. TPI can reach tens of thousands of MAD on a resale. Knowing it in advance changes your net sale price, and so your real return across the full investment cycle.

This guide covers the exact calculation, the rate, the minimum contribution, the exemptions and the filing procedure, with a worked example in Casablanca.

The legal framework: what the General Tax Code says

TPI is governed by articles 61 to 65 of the General Tax Code (CGI). It applies to the profit recorded on the sale, for value, of a property or a real property right located in Morocco.

The principle is clear: the taxable profit is the difference between the sale price and the acquisition price, adjusted for certain costs and a revaluation coefficient. Article 65 sets the calculation rules, including the 15% flat allowance for unjustified acquisition costs.

TPI is part of income tax, in the property profits category. The seller files and pays it spontaneously, usually through the notary who draws up the deed.

How the taxable gain is calculated

The net taxable profit follows this logic: sale price minus (revalued acquisition price + acquisition costs + investment expenses + loan interest). Each item lowers your taxable base, and so your tax.

The acquisition price is revalued with an indexation coefficient published every year by the DGI, based on the number of years you held the property. The longer you hold it, the higher the coefficient, which raises the acquisition price used and reduces the taxable gain.

Acquisition costs (registration duties, notary fees, land registry) are assessed at a flat 15% of the acquisition price, unless you justify a higher amount with invoices. Improvement works and interest on the loan that financed the purchase are also deductible, provided they are documented.

The 20% rate and the 3% minimum contribution

The TPI rate is 20% applied to the net gain. This is the general rule for most sales of residential property or land held by individuals.

A minimum contribution sits on top of this rule: the tax can never be lower than 3% of the sale price, even if your profit is small or nil. You pay the higher of the two amounts, between 20% of the gain and 3% of the sale price.

This mechanism surprises many sellers. On a modest gain, the 3% minimum almost always applies, which makes the tax proportional to the sale price rather than to the actual profit.

Step by step: a sale in Casablanca

Take an apartment bought in Casablanca in 2016 for 1,200,000 MAD and resold in 2026 for 1,800,000 MAD. You carried out 80,000 MAD of works backed by invoices.

Step 1: the acquisition price is revalued. With an illustrative coefficient of 1.10 for about ten years of holding, it rises to 1,320,000 MAD. Step 2: add the 15% flat acquisition costs (180,000 MAD) and the works (80,000 MAD). Total deductible reaches 1,580,000 MAD.

Step 3: the net gain is 1,800,000 − 1,580,000 = 220,000 MAD. TPI at 20% gives 44,000 MAD. Step 4: compare with the 3% minimum on the sale price, that is 54,000 MAD. You pay the higher amount: 54,000 MAD. The minimum wins here, which is why you must always check both calculations.

The exact coefficient depends on the holding year and is published by the DGI: use the official figure for the year of sale to get a precise number.

Exemptions: principal residence, gifts, small sales

Several cases are fully exempt from TPI. The best known is the principal residence: selling the home you occupy as your main residence is exempt once the occupation period reaches the threshold set by the CGI, generally six years under the current administrative interpretation.

Also exempt are transfers between close relatives (gifts to ascendants, descendants, spouses, brothers and sisters) and low-value sales whose annual total stays under the ceiling set by the CGI.

These thresholds and durations change with the finance law. Before relying on an exemption, have your exact situation confirmed by the DGI or your notary: a single missing year of occupation can turn an exempt sale into a taxable one.

Filing: the 30-day deadline and the notary's role

TPI is filed and paid spontaneously. The seller files the return with the tax administration within 30 days of the sale date, together with the payment.

In practice, the notary who prepares the deed calculates the tax, withholds it from the price and pays it to the administration. Always check that calculation, especially the choice between the 20% and the 3% minimum, because any error is at your cost.

Since the latest reforms, you can also ask the administration for a prior opinion on the TPI amount before signing. This consultation secures your transaction and avoids adjustments after the sale.

Common pitfalls and legal optimization

First pitfall: throwing away your works invoices. Without proof, you lose a deduction that directly reduces your taxable gain. Keep invoices, contracts and payment records from the moment you buy.

Second pitfall: forgetting the revaluation of the acquisition price. Over a long holding period, the indexation coefficient makes a real difference. Third pitfall: selling just before reaching the principal-residence exemption period, when a few months of patience would have been enough.

Legal optimization means planning the exit from the start: keep every supporting document, build the TPI into your target sale price, and simulate your after-tax return with our rental income tax calculator and the ROI simulator.

FAQ + sources on TPI in Morocco 2026

  • Is TPI calculated on the sale price or on the gain? On the gain (the net capital gain at 20%), with a 3% minimum of the sale price that applies if it is higher.
  • Who pays TPI, the buyer or the seller? The seller. The notary usually withholds it from the price at signing.
  • Is my principal residence exempt? Yes, if you occupied it as your main home for the period set by the CGI (often six years). Confirm the exact duration with the DGI.
  • What if I sell at a loss? The 3% minimum on the sale price is still due, except in cases of exemption.
  • What is the filing deadline? Within 30 days of the sale, with spontaneous payment.

Useful sources

Use our Morocco rental profitability calculator

Gratuit · Résultats en 2 minutes

here →

Related guides