How to Avoid TPI Tax in Morocco: The 6-Year Principal Residence Exemption

From above of white retro lightbox with TAXES inscription placed on pile of USA dollar bills on white surface

How to avoid TPI tax in Morocco has one honest answer.

You can only remove or reduce it when a legal exemption or deduction genuinely applies to your sale.

TPI is short for taxe sur les profits immobiliers, the Moroccan tax on the gain you make when you sell a property.

The standard rate is 20% of the net gain, with a minimum contribution of 3% of the sale price.

However, several exemptions exist, and the best known one covers a home you occupied as your principal residence for at least five years.

Eligibility is never automatic, so a Moroccan notary or a qualified tax adviser should confirm your position before you sign anything.

Rules also change with each Finance Law, therefore every figure below should be checked against the current Code Général des Impôts.

If you live abroad and want someone to handle these filings, see when a foreign owner needs a tax representative.

At a glance: TPI in Morocco

  • TPI is the seller’s tax on the profit from a Moroccan property sale, governed by articles 61 to 65 of the Code Général des Impôts.
  • The rate is 20% of the net gain, and a minimum contribution of 3% of the sale price applies when that figure is higher.
  • Article 63 exempts a home occupied as a principal residence for at least five years at the date of sale.
  • Above a sale price of four million dirhams, a 3% contribution can still apply to the portion above that ceiling.
  • Property sales whose total value stays under 140,000 dirhams in one calendar year are also exempt.
  • Gifts between spouses, parents and children, and brothers and sisters fall outside the tax.
  • Sellers must declare and pay within 30 days of the sale, even when an exemption applies.
  • Nothing here replaces a calculation prepared by a notary or a tax adviser for your specific transaction.

What is TPI, and when do you owe it?

TPI applies when you transfer a property or a real property right in Morocco for value.

Article 61 of the tax code also covers shares in companies whose assets are mainly made up of property.

The seller carries this cost, while registration duty and land registry fees normally sit with the buyer.

Because the headline rate is 20% of the net gain, the calculation matters far more than the rate itself.

Even a sale at a loss usually triggers the minimum contribution of 3% of the declared price.

Only a valid exemption removes that floor.

Our wider guide to capital gains rules for foreign owners repeats the same principle.

How is the taxable gain calculated?

Your gain is not simply the difference between what you paid and what you received.

Net gain = (sale price minus selling costs) minus (purchase price plus acquisition costs plus investment work, revalued by the official coefficient)

First, genuine selling costs come off the sale price.

Article 65 accepts advertising costs, brokerage fees, deed costs normally borne by the seller and eviction indemnities.

Each of those items must be properly documented.

Next, several items are added to the original purchase price.

  • Acquisition costs, valued at a flat 15% of the purchase price unless you can prove a higher figure.
  • Investment spending on construction, rebuilding, extension, renovation or improvement, backed by proper invoices.
  • Interest paid on a loan used to buy or improve the property, including the equivalent charge under Mourabaha or Ijara financing.

Finally, that adjusted purchase figure is multiplied by an official coefficient for the year of acquisition.

Because the coefficient follows the national cost of living index, a long ownership period lifts the deductible cost and shrinks the taxable gain.

That coefficient is the real reward for holding a property, since Moroccan law contains no sliding scale discount based on years of ownership.

Several online guides describe a degressive reduction after year ten, yet no such relief appears in the tax code.

Routine upkeep such as repainting is also treated differently from investment work, so ask your notary which invoices actually qualify.

Sellers who kept every receipt from the purchase are in a much stronger position at this stage.

That includes the notary and registration costs paid when buying.

When I bought in Marrakech, I paid several separate charges rather than one single fee.

I keep those documents because they matter on any future sale.

 

How to avoid tpi tax in morocco

Which exemptions can legally remove TPI?

Three situations in article 63 remove the tax completely, although each carries conditions.

Exemption Main legal condition Point to verify
Principal residence Occupied as your main home for at least five years at the date of sale A 3% contribution can still apply above a price of four million dirhams
Low value sales Total value of your property sales stays under 140,000 dirhams in one calendar year The threshold applies to sale value across the year, not to the profit
Family gifts Free transfers between spouses, parents and children, or brothers and sisters Registration duty and later tax on the new owner still need planning
Social housing Qualifying social housing used as a main home for at least four years The property must meet the legal definition of social housing

The principal residence exemption

Article 63 exempts the profit on a home used as your principal and habitual residence for at least five years.

That period is measured at the day of the sale.

Before the 2023 Finance Law, that period was six years, which explains why older pages and even some current articles still repeat the longer figure.

Two extra conditions surprise sellers who assume the relief is unlimited.

You cannot use the relief more than once during the five year period.

Attached land also qualifies only up to five times the built surface.

One useful detail protects people who move out before selling, because the law allows a maximum of one year of vacancy before the sale.

Small sales under 140,000 dirhams

Anyone whose property sales in a calendar year total no more than 140,000 dirhams is exempt.

Read that threshold carefully, since it looks at the value of what you sold rather than the profit you made.

In practice this relief mostly covers modest plots, garages and small rural transfers.

Transfers inside the family

Free transfers between spouses, between parents and children, and between brothers and sisters escape the tax entirely.

A sale to a relative is different, because money changes hands and the normal rules apply.

Selling below market value to a family member can also invite the tax authority to reassess the declared price.

Already considering a property?

See the 14 Day Buyer Plan: $299 →

Get 14 days of personal buyer support, three private calls and WhatsApp support.

Get help reviewing up to three properties before you commit money.

Buying a Marrakech Property as a foreigner

What proof of principal residence should you keep?

The exemption depends on real occupation, therefore your paperwork carries the argument.

Evidence sellers are usually asked for

  • Electricity, water and telephone bills in your name at that address across the relevant years.
  • Your registered address on a residence card, carte de séjour or national identity document.
  • Bank statements and official correspondence sent to the property.
  • A letter from the syndic or building manager confirming that you lived there.
  • Local tax notices such as taxe d’habitation and taxe de services communaux.
  • Any administrative certificate of residence issued by the local authority.

Gaps in that trail are the most common reason a claim becomes difficult, so start collecting well before you market the property.

Can foreign owners claim the principal residence exemption?

In principle the relief follows use rather than nationality, so a foreign owner who genuinely lived in the property can qualify.

Article 63 also protects the home that Moroccans living abroad keep for their own use in Morocco.

One condition removes many foreign owners immediately, because a property loses principal residence status once it has been rented out or used for business.

Short term letting therefore rules out the exemption, which matters for anyone who ran the property as a holiday rental.

My own Marrakech purchase came with a shop already rented to a tenant.

Property used in that way could never be presented as a main home.

Owners who split the year between two countries face a harder case.

Here the tax authority looks at where the habitual home really was.

Before assuming anything, discuss your history with a notary and consider whether the rental income you declared in earlier years supports or contradicts your claim.

Marrakech Riad

How do declaration, payment and the prior ruling work?

Sellers must file the property profit declaration and pay within 30 days of the sale.

That obligation stands even when you believe the transaction is exempt, and the filing is made through the tax authority online service.

In practice the notary usually handles the calculation and the payment from the funds held after signature.

Since July 2023, article 234 quinquies also lets you ask the tax authority for a prior ruling on your calculation or your exemption.

You request it within 30 days of the preliminary sale agreement, and the administration answers within 60 days.

Its reply works as a liquidation certificate and stays valid for six months.

Declaring exactly on that basis then protects you from a later audit on this tax.

Sellers who skip the ruling face a different consequence, because they must advance the difference between the tax declared and 5% of the sale price.

That advance is refunded when no correction procedure is opened within the legal window, yet it still ties up cash exactly when you need it.

Remember too that the declared price can be challenged against market value.

A realistic valuation before you agree a price therefore protects the whole file.

An experienced notary who can explain each step in English is worth finding early rather than during the signing week.

What should you prepare before you sign?

Seller preparation checklist

  • Your original notarial deed showing the exact purchase date and price.
  • Receipts for registration duty, land registry fees and notary charges paid when you bought.
  • Proper invoices for renovation and improvement work, ideally from registered contractors.
  • Loan statements showing interest paid on any financing used for the purchase.
  • Occupation evidence if you intend to claim the principal residence exemption.
  • Proof of the original transfer of foreign currency into Morocco if you plan to send proceeds abroad.
  • Recent syndic statements and confirmation that building charges are settled.
  • A written calculation from the notary before you commit to a price.

Missing invoices cost more than most sellers expect, because undocumented work simply disappears from the calculation.

Already considering a property?

See the 14 Day Buyer Plan: $299 →

Get 14 days of personal buyer support, three private calls and WhatsApp support.

Get help reviewing up to three properties before you commit money.

What does selling actually cost?

Below are the items sellers most often meet, all of which vary with the property and the agreement between the parties.

Item Usual basis (estimate) Worth confirming
Property profit tax 20% of the net gain, or 3% of the sale price when that is higher Whether any exemption removes or reduces it in your case
Provisional advance Up to 5% of the sale price when no prior ruling was requested How and when the balance is returned to you
Agency fees Commonly around 2.5% to 5% of the price plus VAT, and negotiable Whether the invoice is drawn correctly so the cost can be deducted
Notary and registration charges Normally paid by the buyer in a Moroccan sale What your own contract says about who pays each item
Arrears and clearances Unpaid local taxes and syndic charges settled from the proceeds Which certificates the notary needs before releasing funds

Anyone comparing these figures with the buying side can review the full breakdown of Moroccan property transfer taxes for context.

rent in marrakech

How do you move the money out of Morocco?

Paying the tax and transferring the proceeds abroad are two separate problems.

Office des Changes rules give foreign investments financed in foreign currency a convertibility regime.

That regime allows the proceeds of a later sale to be transferred out of Morocco.

Everything therefore depends on how the original purchase was funded and on whether you kept the supporting evidence.

Banks usually ask for the purchase deed, the sale deed and proof of the original transfer of currency into Morocco.

Buyers who used a convertible dirham account when they purchased generally find this stage far simpler.

More detail on the practical steps sits in our guide to repatriating money after selling property in Morocco.

Double taxation treaties then decide how your home country treats the gain, so speak to an adviser there as well.

Mistakes that cost sellers money

Assuming the worst is the first mistake, since the revaluation coefficient and documented costs often cut the taxable gain sharply.

Losing paperwork is the second, because a missing deed or invoice removes a deduction you were entitled to claim.

Confusing this tax with the tax on rent is another, as rental income follows a completely different regime.

Underdeclaring the price is the most dangerous of all, given that the administration can reassess the value and open a correction procedure.

Trusting informal advice ranks close behind, so treat opinions from friends and agents as questions to check rather than answers.

Selling just before a threshold is the quiet one, and a seller close to the five year mark should at least discuss timing before committing.

Questions to ask your notary

  • Which exemption, if any, do you believe applies to this sale?
  • What figure do you calculate for the tax, and on what basis?
  • Which of my invoices can be included, and which cannot?
  • Should we request a prior ruling from the tax authority?
  • If we do not, how much will be held as a provisional advance?
  • Which clearance certificates are needed before the funds are released?
  • What documents will my bank need for a transfer abroad?

What is the safest next step?

Start with an accurate calculation rather than an assumption about what you owe.

Gather the deed, the receipts and the occupation evidence, then ask a notary or tax adviser to price the sale properly.

Where an exemption looks possible, confirm it in writing before you agree a completion date.

Our guide to selling property in Morocco as a foreigner then covers the wider process.

Above all, treat every figure in this article as a starting point for that conversation rather than a promise about your own tax bill.

Already considering a property?

See the 14 Day Buyer Plan: $299 →

Get 14 days of personal buyer support, three private calls and WhatsApp support.

Get help reviewing up to three properties before you commit money.

Frequently asked questions

Is TPI the same as capital gains tax in Morocco?

Yes, TPI is the familiar name for income tax on property profits.

The rate is 20% of the net gain, with a minimum contribution of 3% of the sale price.

How many years must I occupy a home before the exemption applies?

Article 63 currently requires at least five years of occupation as your principal residence at the sale date.

The 2023 Finance Law reduced that period from six years.

Your notary should still confirm the rule in force on your own sale date.

Does the exemption still apply if I rented the property out?

No, because a property stops counting as a principal residence once it has been let or used professionally.

That point catches many owners who ran the home as a short term rental.

Do I still pay if I sell at a loss?

Usually yes, since the minimum contribution of 3% applies even when the calculation shows no profit.

Only a full exemption removes that charge.

Can I avoid the tax by selling to a family member?

A sale to a relative is taxed like any other sale.

However, free transfers between spouses, parents and children, or brothers and sisters are exempt.

Selling below market value can also trigger a review of the declared price.

How is inherited property treated?

For inherited property, the purchase price used is the market value at the date of death.

That value comes from the inventory drawn up by the heirs, or otherwise from the declaration made by the seller.

Whatever figure was recorded then will shape the tax due much later.

Do I have to declare a sale that is exempt?

Yes, the declaration is still required within 30 days of the sale.

Treating an exemption as a reason to skip the filing can create penalties later.

Can the tax authority still review my sale after payment?

The administration can open a correction procedure within the legal window after your declaration.

However, a prior ruling under article 234 quinquies changes that position.

Declaring exactly on the basis of the ruling protects you from an audit on this tax.

Is it better to sell through a company?

Company disposals follow corporate tax rules instead of this regime.

Whether that helps depends entirely on your structure, your profit and your plans.

Read our guide on buying property in Morocco through a company before restructuring anything.

Should I rely on an exemption before speaking to a notary?

No, because eligibility turns on your occupation history, your documents and how the tax authority reads your file.

Only a written calculation from the notary handling the transaction or a qualified tax adviser gives a reliable answer.

Similar Posts

Leave a Reply

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