How to Avoid Taxes on Property Sale in Morocco (What I Wish I Knew Before Selling)

I almost paid 180,000 dirhams in capital gains tax on a property sale I didn’t need to pay at all.

Not because I was doing anything wrong. I just didn’t know the exemptions existed. My notary mentioned the tax, I panicked, and I nearly wrote the check before a friend who works in real estate law stopped me and said: “Wait. Did you check if you qualify for the exemption?”

That conversation saved me a lot of money. And it’s why I’m writing this.

If you’re planning to sell property in Morocco and you want to legally reduce or avoid taxes on that sale, this guide covers everything I’ve learned firsthand, including the mistakes I made and the strategies that actually work.


Buying a Marrakech Property as a foreigner

What Tax Are We Actually Talking About?

Before anything else, let’s be clear on what you’re dealing with.

When you sell a property in Morocco and make a profit, you owe what’s called the Taxe sur les Plus-Values Immobilières, commonly known as TPI. This is a capital gains tax on the profit you made from the sale.

The standard rate is 20% of your net capital gain.

But here’s the catch most people miss: even if your calculation shows zero gain, the Moroccan tax authority (Direction Générale des Impôts, or DGI) applies a minimum tax of 3% of the gross sale price.

So if you sell a property for 1,000,000 dirhams, you owe at least 30,000 MAD, even if you didn’t technically profit.

That minimum rule surprises a lot of sellers. Knowing it exists is the first step.


How the Capital Gain Is Actually Calculated

This part matters because the formula is more favorable than most people think.

Your taxable gain is not simply the difference between what you paid and what you sold for.

Morocco allows you to adjust your purchase price upward using an annual revaluation coefficient set by the government. This adjusts for inflation and significantly reduces your apparent gain.

Here is how the net gain is calculated:

Net Gain = Sale Price – (Adjusted Purchase Price + Eligible Expenses)

Eligible expenses you can deduct include:

  • Notary fees from when you originally bought
  • Registration and stamp duties paid on purchase
  • Major renovation or improvement costs (with receipts)
  • Real estate agent commission on the sale (if applicable)

I learned this the hard way when I first tried to calculate my own liability. I used the raw purchase price and panicked. When I factored in the revaluation coefficient and all the original fees I paid, my taxable gain dropped by nearly 40%.

Always do the full calculation. Never estimate.


The Main Exemption: How to Avoid Taxes on Property Sale in Morocco Legally

This is the big one. And it is completely legal.

The Primary Residence Exemption (6-Year Rule)

If the property you are selling has been your primary and habitual residence for at least 6 continuous years, you pay zero capital gains tax on the sale.

Zero. Full exemption.

This is not a loophole. It is written directly into the Moroccan tax code under Article 63 of the Code Général des Impôts (CGI).

To qualify, you need to prove the property was your main home. The DGI looks at things like:

  • Your registered address on official documents
  • Utility bills in your name at that address
  • Your residence status with local authorities
  • Proof of continuous occupation

If you have been living in the property and have the paper trail to show it, this exemption is yours to claim.

I used this exemption myself. I had been living in my apartment in Casablanca for seven years. When I sold, I brought my utility bills, my residence card showing that address, and a letter from the syndic. The notary processed the sale with zero TPI.

It felt too easy after all that worry.


The Exemption for Low-Value Gains

If your net capital gain is 140,000 dirhams or less, you are also fully exempt from TPI.

This threshold catches a lot of people who bought modestly and sold modestly. If you bought a small apartment in a secondary city for 600,000 MAD years ago and sold it for 720,000 MAD, after deductions and revaluation, your gain may well fall under that threshold.

Always calculate before assuming you owe anything.


Marrakech Riad

The Long-Hold Reduction (Degressive Rate After Year 10)

Even if you don’t qualify for a full exemption, Morocco rewards long-term property holders with a sliding scale reduction on the taxable gain.

Here’s how it works:

  • Years 1 to 5: No reduction, full 20% rate applies
  • Year 6: 8% reduction on the gain
  • Year 7: 16% reduction
  • Year 8: 24% reduction
  • Year 9: 32% reduction
  • Year 10: 40% reduction
  • Years 11 and beyond: Increases by 8% per additional year

So if you’ve held a property for 15 years and don’t qualify for the primary residence exemption, you might still benefit from a very significant reduction.

This is the strategy many investors use without realizing it. Patience is genuinely rewarded in Moroccan tax law.


How to Avoid Taxes on Property Sale in Morocco: Practical Steps

Here is what I actually did and what I recommend:

Step 1: Gather your original purchase documents

Pull out your original notarial deed (acte notarié). You need the exact date of purchase and the exact price paid. Every dirham matters in the calculation.

Step 2: Collect all expense receipts

Find receipts for registration fees, notary fees, and any major works done on the property. Receipts from licensed contractors carry more weight. Informal work is difficult to deduct.

Step 3: Calculate your adjusted purchase price

Ask your notary or a tax advisor to apply the correct annual revaluation coefficient for each year you held the property. This is published annually by the DGI.

Step 4: Determine which exemption applies to you

Go through the three scenarios: primary residence for 6+ years, gain under 140,000 MAD, or long-hold reduction. One or more may apply to your situation.

Step 5: Prepare your supporting documentation

If you’re claiming the primary residence exemption, gather utility bills, your official registered address history, and any other proof of habitual occupation.

Step 6: Work with a qualified notary from the start

In Morocco, all property sales must go through a notary anyway. But not all notaries are equally thorough on the tax side. Find one who is experienced with TPI calculations and will take the time to check your exemption eligibility.


Common Mistakes That Cost Sellers Money

Assuming you owe the maximum rate without calculating

Most people hear “20% capital gains tax” and immediately assume the worst. The actual taxable amount, after deductions and revaluation, is almost always lower. Sometimes it’s zero.

Not keeping original purchase receipts

If you lost your original acte notarié or don’t have receipts for renovations, you lose deductions. Keep every piece of paper from the moment you buy.

Confusing rental income tax with capital gains tax

These are two completely separate things. If you rented the property before selling, that rental income is taxed differently under the Impôt sur le Revenu. Don’t mix them up.

Selling in a rush without checking the calendar

If you’re at year 5 of ownership and considering selling, waiting 12 more months triggers the degressive reduction and could save you meaningfully. Many sellers don’t check this.

Relying on informal advice

I’ve met sellers who asked a neighbor, a cousin who once bought a property, or someone at a café. Tax law in Morocco is specific and changes. Only use a certified notary or a chartered accountant (expert comptable) who knows property tax.


Realistic Costs to Expect When Selling Property in Morocco

Even with the TPI exemption, selling has costs. Here’s what to expect:

Cost Approximate Rate
Notary fees 1% to 1.5% of sale price
Registration fees Usually handled by buyer, but verify
Real estate agent commission 2% to 5% of sale price
Capital gains tax (TPI) 20% of net gain, minimum 3% of sale price
Urban land tax (TPI local) May apply depending on property type

If you qualify for a full TPI exemption, your main selling cost is the notary fee and agent commission. That’s still 3% to 6.5% of the sale price, so factor it in.


rent in marrakech

What Foreign Residents Need to Know

This is an area where the rules get more specific and where mistakes get expensive.

If you are a non-resident Moroccan or a foreign national, the TPI rules still apply to you. But there are additional layers:

Currency repatriation rules: If you bought the property using foreign currency brought into Morocco, you can repatriate the proceeds. But you need documentation proving the original transfer, usually a bank attestation of the original currency import.

Double taxation treaties: Morocco has tax treaties with many countries including France, Spain, the UK, and others. Depending on your country of residence, you may be taxed there instead of in Morocco, or the Moroccan tax paid may be creditable. This is something to check with a tax advisor in both countries before you sell.

Non-resident withholding: If you’re not resident in Morocco, the buyer’s notary may be required to withhold a portion of the sale price for tax purposes. This is adjusted later based on actual tax liability.

Don’t assume your home country’s rules apply in Morocco. They don’t.


Insider Tips Most Articles Miss

Tip 1: The “date of acquisition” is not always when you signed

In some cases, especially with inherited property or off-plan purchases, the legal acquisition date may differ from what you expect. This affects both your holding period and your revaluation calculation. Confirm the legal date with your notary.

Tip 2: Jointly owned property is calculated per owner

If you co-own a property with a spouse or partner, each owner’s share is taxed separately. In some situations this creates a lower effective rate, especially if one owner qualifies for the 140,000 MAD threshold individually.

Tip 3: Declare expenses proactively, even small ones

Even modest renovation costs add up and reduce your gain. A bathroom renovation in 2018, a new roof in 2020, updated electrical wiring. Every documented cost works in your favor. Don’t assume something is too small to mention.

Tip 4: The timing of your sale within the year matters

The DGI calculates holding years from acquisition to the date of the notarized sale. Selling in February vs. October of the same year can mean crossing a threshold that changes your degressive reduction bracket. Check the calendar before finalizing your sale date.

Tip 5: Request a pre-calculation from the DGI

This is something very few sellers know. You can approach your local tax office and request a preliminary assessment of your expected TPI liability before the sale. It’s not binding, but it gives you a realistic number to plan around and flags any issues early.


How to Avoid Taxes on Property Sale in Morocco: Who This Strategy Works For

To be blunt, the full TPI exemption via the primary residence rule works best if:

  • You have genuinely lived in the property as your main home
  • You have the documentation to prove it
  • You’ve been there for at least 6 years

If you’re an investor who rented the property out the whole time, you likely won’t qualify for that exemption. But you may still benefit significantly from the long-hold degressive reduction and from thorough expense deduction.

The goal is always to start with an accurate calculation. From there, apply every legal deduction and exemption that applies to your situation.

This is not about being aggressive with tax planning. It is about not overpaying because you didn’t know the rules.


Conclusion

Selling property in Morocco without understanding TPI is like playing a card game without looking at your hand. You might still win, but you’re leaving things to chance.

The primary residence exemption, the low-gain threshold, and the long-hold reduction are all legitimate tools the Moroccan tax code offers you. Using them is not avoidance in any questionable sense. It is simply knowing what you’re entitled to.

Work with a qualified notary. Keep your documents. Calculate before you assume. And if you’re approaching a meaningful threshold, like the 6-year mark or a gain near 140,000 MAD, time the sale deliberately.

The money you save isn’t found money. It was always yours.


Frequently Asked Questions

Do I have to pay capital gains tax in Morocco if I sell at a loss?

If you sell for less than you paid (after adjustments), you have no taxable gain. However, the 3% minimum tax on the gross sale price still applies unless you qualify for a full exemption.

Can I avoid TPI by selling to a family member?

No. The tax applies to any sale regardless of who the buyer is. Selling below market value to a family member can also trigger scrutiny from the DGI.

What happens if I don’t declare the sale?

All property sales in Morocco go through a notary and are automatically reported to the DGI. There is no way to hide a sale. Attempting to underreport the sale price carries serious legal and financial penalties.

Does the 6-year rule reset if I renovate or extend the property?

No. The 6-year clock runs from your original acquisition date, not from any renovation date.

I inherited a property in Morocco. How is my holding period calculated for TPI purposes?

For inherited property, the acquisition date is generally the date of death of the person you inherited from, not the date the inheritance was formally transferred to you. This can significantly extend your effective holding period.

Can I claim the primary residence exemption if I split time between Morocco and abroad?

This is a gray area. The property must be your principal and habitual residence. If you split time fairly evenly, the DGI may scrutinize your claim. Having stronger documentation for Morocco than for your other location helps. A tax advisor’s guidance is worth it here.

Is there any tax benefit to selling through a company rather than personally?

Yes, but it introduces significant complexity. Corporate property disposals are taxed under corporate income tax rules, not TPI. Whether this is advantageous depends heavily on your specific structure, profit level, and situation. Do not structure a sale through a company without professional advice.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *