morocco property capital gains tax foreigners : What I Wish Someone Had Told Me Before I Sold

I almost lost 60,000 dirhams because I assumed Morocco’s tax rules worked the same way they did back home.

That was my first mistake. And it nearly cost me a significant chunk of profit on a riad I sold in Marrakech after holding it for three years.

If you’re a foreigner who owns property in Morocco, or you’re thinking about buying with the intention of selling later, understanding capital gains tax here is not optional. It’s the difference between a profitable exit and a painful surprise at the notary’s office.

This guide is everything I’ve learned firsthand, plus what I’ve pieced together from Moroccan tax lawyers, notaires, and a few costly lessons.


What Is Capital Gains Tax on Property in Morocco?

Marrakech

In Morocco, the tax you pay when you sell a property at a profit is called TPI, which stands for Taxe sur les Profits Immobiliers.

It applies to everyone. Moroccan citizens, foreign residents, and non-resident foreigners all fall under this tax when they sell real estate in Morocco.

The basic idea is simple: you bought a property for X, you sold it for Y, and the difference is your taxable profit. But the way Morocco calculates that difference is where things get interesting, and where most foreigners get confused.


The TPI Rate: What Foreigners Actually Pay

The standard TPI rate is 20% of the net capital gain.

However, there is a minimum tax floor of 3% of the gross sale price, regardless of your actual profit. So even if you claim expenses and reduce your net gain down to almost nothing, you still owe at least 3% of the total sale value.

This caught me off guard the first time. I thought I could offset the gain with renovation costs I had paid over the years. And yes, you can, but only if you have proper documentation.

Here’s the rate structure in plain terms:

  • 20% tax on the calculated net profit
  • Minimum 3% of the gross sale price, whichever is higher
  • Long-term holding reduction: For every year you hold the property beyond five years, you get a 5% reduction on the taxable base, up to a maximum of 60% reduction after 17 years

That last point is something almost no article written for foreign investors mentions clearly. If you hold Moroccan property for a long time, your effective tax burden shrinks considerably.


How Morocco Calculates Your Taxable Gain

rent in marrakech

This is where the real calculation happens, and getting it wrong means overpaying.

The formula:

Net Taxable Gain = Sale Price minus (Adjusted Purchase Price + Allowable Costs)

The adjusted purchase price is not just what you paid. Morocco applies an annual inflation coefficient to your original purchase price. This coefficient is published each year by the tax authority (Direction Générale des Impôts). It gradually increases the recognized cost base of your property to account for inflation.

In practice, this means that if you bought in 2015 and sold in 2025, your original purchase price is multiplied by the applicable coefficient for those years. That reduces your taxable gain.

What costs can you deduct?

Morocco allows you to deduct certain costs from the gain:

  • Notary fees paid at purchase (the standard rate is around 1% of the purchase price)
  • Registration fees and stamp duties are paid at purchase
  • Capital improvements and major renovations, but only if you have official invoices from registered contractors
  • Real estate agency commissions are paid at the sale

You cannot deduct routine maintenance, furnishing costs, or any work done without formal receipts from registered businesses.

This is where I lost money the first time around. I had paid cash to local craftsmen for renovation work. No receipts, no registered business numbers. The tax authority rejected those costs entirely.


The Exemption Most Foreigners Don’t Know About

Here is something that surprises almost every foreign buyer I’ve spoken to.

If the property you’re selling is your primary residence in Morocco, and you’ve lived in it for at least six consecutive years, you may be fully exempt from TPI.

This exemption also applies if you have lived in the property from the date of purchase up to the date of sale, even if it’s been less than six years.

The catch for foreigners: you need to prove actual residency. This means having a carte de séjour (residency card), utility bills in your name, and a Moroccan tax identification number showing the property as your declared residence.

Many foreigners who live in Morocco part-time think they qualify. Most don’t. The Moroccan tax authority looks carefully at this, especially for high-value properties.


Capital Gains Tax for Non-Resident Foreigners: The Specific Rules

If you don’t live in Morocco at all, and you own a property there purely as an investment, the situation is slightly different in terms of process, not necessarily rate.

Non-residents are still subject to the 20% TPI rate with the 3% minimum floor.

The key practical difference is how and when you pay.

For non-residents, the TPI is typically withheld at source by the notary at the time of the sale. The notary calculates the estimated tax, deducts it from your proceeds, and pays it directly to the Moroccan tax authority. You don’t receive your full proceeds and then pay later. The tax comes out of the transaction before you see a dirham.

This is actually useful. It removes the risk of forgetting to pay or miscalculating. But it also means you need to have your documentation ready before closing, not after.

If the notary calculates the tax incorrectly, and this happens, you may need to file a correction with the DGI afterward. I have seen this take several months.


The Double Taxation Treaty Question

Riad à Marrakech

Morocco has signed double taxation agreements with several countries, including France, Spain, the United Kingdom, and others.

These treaties generally mean that if you pay capital gains tax in Morocco on a Moroccan property, your home country should give you credit for that tax paid, so you’re not taxed twice on the same gain.

However, the specific treatment depends on your country’s tax rules and the exact wording of the treaty.

For example, a French citizen selling a Moroccan property would typically report the gain in France, but receive a credit for the Moroccan TPI already paid. A British citizen should check with HMRC directly, as the UK-Morocco treaty has specific provisions around immovable property.

My strong advice: Do not rely on your home country’s accountant to understand Moroccan tax rules. And don’t rely on a Moroccan accountant to understand your home country’s rules. You need someone who understands both sides, or at minimum, a specialist in each jurisdiction who will talk to each other.


Common Mistakes Foreigners Make (That Cost Real Money)

I’ve made some of these myself, and I’ve watched others make the rest.

1. Not keeping purchase documentation

When you buy in Morocco, you receive a signed and stamped acte de vente from the notary. Keep this forever. When you sell, this document establishes your official purchase price. Losing it creates serious problems.

2. Paying for renovations in cash with no receipts

Any improvement to the property that you want to deduct from your gain must have an official receipt from a registered Moroccan business with an ICE number (business identifier). No receipt means no deduction. Period.

3. Assuming the agent handles the tax

Real estate agents in Morocco are not tax advisors. Many will tell you the notary handles everything, and while the notary does withhold tax, they are not there to minimize your liability. You need a conseiller fiscal or a tax lawyer before the sale, not during it.

4. Undervaluing the property on paper

Some sellers try to declare a lower sale price than what actually changed hands. This is tax fraud under Moroccan law, and the DGI has become significantly more sophisticated at detecting it. The penalties are severe. Don’t do it.

5. Forgetting about local property taxes owed

Before a sale completes, you must have paid all outstanding taxe d’habitation and taxe de services communaux. Any unpaid amounts will block the transaction or be deducted from proceeds. Check these well before your closing date.


Realistic Numbers: What to Expect

Let me walk through a realistic example so you can model your own situation.

Scenario:

  • You bought a property in Rabat in 2018 for 1,500,000 MAD
  • You sell it in 2025 for 2,200,000 MAD
  • You have receipts for 150,000 MAD in legitimate renovations
  • You paid 40,000 MAD in notary/registration fees at purchase

Rough calculation:

Adjusted purchase price (with inflation coefficient, roughly 1.15 for this period): 1,500,000 × 1.15 = 1,725,000 MAD

Allowable costs: 150,000 + 40,000 = 190,000 MAD

Adjusted base: 1,725,000 + 190,000 = 1,915,000 MAD

Net gain: 2,200,000 minus 1,915,000 = 285,000 MAD

Years held: 7 years. Reduction applies for years beyond 5: 2 years × 5% = 10% reduction

Taxable gain after reduction: 285,000 × 0.90 = 256,500 MAD

TPI at 20%: 51,300 MAD

Check against minimum (3% of 2,200,000): 66,000 MAD

You pay the higher: 66,000 MAD

This is why that 3% minimum floor matters. Even when your net gain calculation suggests a lower tax, the floor kicks in.


Conseils d'initiés que la plupart des articles ne mentionnent pas

Tip 1: The agréé designation matters

Always work with a notary who is officially agréé (licensed) and familiar with international transactions. Some notaries in tourist areas have far more experience with foreign sellers. Ask directly how many international property sales they handle per year.

Tip 2: Repatriating your proceeds requires a paper trail from day one

If you want to take your sale proceeds out of Morocco and back to your home country, you need to prove that the original purchase funds came in through official banking channels. Morocco requires what’s called an attestation de transfert from your bank at the time of purchase. If you don’t have this from when you bought, repatriating proceeds becomes extremely complicated. This is not a tax issue per se, but it affects how useful your gain actually is.

Tip 3: Timing your sale matters

If you’re approaching a milestone holding period, like five or ten years, it can be worth waiting a bit longer to benefit from the annual 5% reduction on your taxable base. Run the numbers with a tax adviser before setting your sale date.

Tip 4: Exchange rate risk is real

Your gain in MAD might look good on paper. But if the dirham has moved unfavorably against your home currency since you bought, your real-world profit is smaller than the numbers suggest. Factor this in when evaluating whether a sale makes sense.


Before You Sell: A Practical Checklist

  • Locate your original acte de vente and all related purchase documents
  • Gather official receipts for any renovations or improvements
  • Confirm your taxe d’habitation and taxe de services communaux are fully paid
  • Obtain your Moroccan tax identification number if you don’t have one
  • Get a preliminary TPI calculation from a Moroccan conseiller fiscal
  • Check your home country’s tax treaty position with Morocco
  • Confirm your original funds transfer documentation with your Moroccan bank
  • Choose a notary experienced with international sales

Conclusion: Don’t Let the Tax Eat Your Profit

Selling property in Morocco as a foreigner is absolutely doable, and many people make solid returns doing it.

But the Morocco property capital gains tax system has enough nuance that going in unprepared costs real money.

The 20% TPI rate is manageable. The 3% minimum floor is the part that surprises people. The inflation adjustment and long-term holding reductions work in your favor if you plan ahead. And the exemption for primary residence is genuinely valuable if you genuinely live there.

Get the paperwork right from day one. Keep every official receipt. Hire local expertise before you need it, not during a crisis. And if you’re planning a sale in the next year or two, start the preparation now.

The profit is there. The tax is real. Knowing both clearly puts you in control.


FAQ: Morocco Capital Gains Tax for Foreign Property Owners

Do I pay capital gains tax in Morocco if I’m not a resident? Yes. Non-residents are subject to TPI on Moroccan property sales at the same rates as residents. The notary typically withholds the tax directly from sale proceeds.

Can I deduct renovation costs from my taxable gain? Yes, but only if you have official invoices from registered Moroccan businesses. Cash payments without proper documentation are not accepted by the tax authority.

Is there any way to be exempt from TPI as a foreigner? The main exemption is for your primary residence, held for at least six consecutive years. Foreigners with legal residency in Morocco and documented primary residence may qualify.

How long does the TPI payment process take? The notary handles withholding at closing. If there are disputes or corrections needed afterward, resolution with the DGI can take several months.

Will I be taxed again in my home country on the same gain? It depends on your country and the applicable tax treaty with Morocco. Most treaties provide a credit for foreign tax paid, but you need to verify the specifics with a qualified adviser in your home country.

What happens if I sell below the declared purchase price? If there is no gain, there is no TPI. However, the 3% minimum floor still applies based on gross sale price even in low-gain scenarios. A loss does not eliminate this minimum entirely in all cases, so get specific advice before assuming you owe nothing.

Articles similaires

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont marqués d'un *