In brief: The sale of securities (shares, bonds, UCITS units) generates a profit subject to IR in Morocco. The rate varies according to the nature of the security: 15% for listed shares and 20% for unlisted shares, bonds and other UCITS (Art. 73-II of the Tax Code). Sales whose annual total does not exceed MAD 30,000 are exempt. The return must be filed within 30 days of the sale.
Definition of capital gains on securities (Art. 66 of the Tax Code)
Article 66 of the General Tax Code defines capital gains on securities as the net gains realised on the disposal, for valuable consideration, of securities and other equity or debt instruments. The following are concerned:
- Shares and partnership interests in listed or unlisted companies
- Bonds and other debt instruments
- UCITS units (undertakings for collective investment in transferable securities)
- REIT units (real estate investment trusts — OPCI)
- Subscription and allocation rights
- Equity securities of any kind issued by legal entities under public or private law
These profits fall under the category of income and capital gains from movable capital, distinct from investment income which concerns recurring flows (dividends, interest).
Triggering event: the date of sale (Art. 67)
The triggering event for taxation is the date of the actual sale of the security. Article 67 of the Tax Code specifies that this date corresponds to the day of the transfer of ownership, namely:
- For listed securities: the date of execution of the stock exchange order
- For unlisted securities: the date of the transfer deed (or agreement)
- For UCITS units: the redemption date
It is essential to correctly identify this date as it determines the starting point of the 30-day deadline for filing and paying the tax.
Calculation of the net capital gain
The taxable net profit is determined according to the following formula:
Net profit = Sale price − (Acquisition price + Acquisition and disposal costs)
Sale price
The sale price corresponds to the amount actually received by the seller, net of brokerage fees and commissions paid to intermediaries.
Acquisition price
The acquisition price is the price actually paid when purchasing the security, plus acquisition costs (commissions, transfer duties where applicable). In the case of a gratuitous acquisition (inheritance, gift), the price used is the market value of the securities at the date of transfer.
For securities acquired before January 1, 2013, the taxpayer may opt for the reference value set as at January 1, 2013, subject to certain conditions.
Deductible costs
The following costs are deductible from the gross profit:
- Brokerage fees and commissions paid on disposal
- Brokerage fees and commissions paid on acquisition
- Custody fees (in certain cases)
In the case of a capital loss, it may be offset against gains of the same nature realised during the same year. Any excess capital loss may be carried forward over the following 4 years.
Tax rates (Art. 73-II of the Tax Code)
The IR rate applicable to capital gains varies according to the nature of the security sold:
| Nature of the security | IR rate | Tax Code reference |
|---|---|---|
| Shares listed on the Stock Exchange | 15% | Art. 73-II-C-1°-a |
| Unlisted shares | 20% | Art. 73-II-F-2° |
| Bonds and debt instruments | 20% | Art. 73-II-F-2° |
| Equity UCITS (≥ 60% shares) | 15% | Art. 73-II-C-1° |
| Other UCITS (diversified, bond) | 20% | Art. 73-II-F-2° |
| Unlisted REITs | 20% | Art. 73-II-F-2° |
| Foreign-source movable capital — income | 15% | Art. 73-II-F-5° |
| Foreign-source movable capital — gains | 20% | Art. 73-II-F-5° |
The reduced rate of 15% mainly benefits listed shares and equity-dominant UCITS, as an incentive for stock market investment. Unlisted securities and bond instruments are subject to the 20% rate.
Exemptions (Art. 68 of the Tax Code)
Annual sales threshold
Capital gains on securities are exempt from IR when the total amount of sales during a calendar year does not exceed MAD 30,000. This threshold is assessed on all sales combined, across all categories of securities.
Note: if the threshold is exceeded, the entirety of the gains is taxable (not just the fraction exceeding MAD 30,000).
Savings plans (PEA and PEE)
Gains realised within a Share Savings Plan (PEA) are exempt subject to conditions:
- Minimum holding period of the plan: 5 years
- Compliance with the contribution ceiling
- No withdrawal before the end of the minimum period
Similarly, capital gains realised within a Company Savings Plan (PEE) benefit from an exemption subject to lock-up conditions.
Other cases of exemption
- Sales between spouses and between ascendants/descendants (Art. 68-III)
- Certain restructuring operations (mergers, demergers) benefiting from the preferential regime provided by the Tax Code
Filing obligations (Art. 84 of the Tax Code)
A taxpayer realising a capital gain on securities must:
- File a return with the tax authorities within 30 days following the month in which the sale took place
- Spontaneously pay the corresponding tax at the time of filing
- Attach supporting documents of acquisition and sale (trade confirmations, statements, etc.)
For securities managed by an authorised financial intermediary (banks, brokerage firms), the intermediary may carry out the withholding at source and remit the tax on behalf of the taxpayer.
Penalties for late filing: failure to meet the 30-day deadline results in a 5% surcharge on the tax amount, plus late interest of 0.50% per month of delay.
Worked example: sale of listed shares
Mr Karim acquired 500 shares of company ABC listed on the Casablanca Stock Exchange in March 2024 at a unit price of MAD 120. He sells them in February 2026 at a unit price of MAD 165.
Profit calculation
| Item | Amount (MAD) |
|---|---|
| Sale price (500 x 165) | 82,500 |
| (−) Disposal commissions (0.35%) | −288.75 |
| Net sale price | 82,211.25 |
| Acquisition price (500 x 120) | 60,000 |
| (+) Acquisition commissions (0.35%) | 210.00 |
| Acquisition price plus costs | 60,210.00 |
| Net taxable profit | 22,001.25 |
Tax due
Mr Karim’s total sales exceed MAD 30,000 (sale price = MAD 82,500), so the exemption does not apply.
IR = 22,001.25 x 15% = MAD 3,300.19
Mr Karim must file his return and pay MAD 3,300.19 to the DGI by March 31, 2026 (30 days after the month of February).
Frequently asked questions (FAQ)
How do I declare a capital gain on securities?
The return is filed using the dedicated form with the DGI, within 30 days following the month of sale. You must indicate the sale price, the acquisition price, the costs and the net profit. Payment of the IR is simultaneous. If your securities are managed by a financial intermediary, the intermediary may carry out the withholding at source on your behalf.
What happens in the case of a capital loss?
Capital losses on the sale of securities are deductible from gains of the same nature realised during the same year. If the losses exceed the gains, the surplus is carried forward over the following 4 years. No refund is possible: the loss constitutes solely an offset credit.
Does the MAD 30,000 threshold apply per transaction or per year?
The exemption threshold of MAD 30,000 is assessed on the total amount of sales made during the calendar year, not per individual transaction. It refers to the gross sale price (before deducting costs), across all categories of securities combined. If this total amount exceeds MAD 30,000, all gains are taxable.
Are capital gains on a securities account held abroad taxable?
Yes. Moroccan tax residents are taxable on their worldwide income, including capital gains on the sale of securities held abroad. The applicable rate is 20% for gains and 15% for income (Art. 73-II-F-5°). A tax credit may be granted under a tax treaty with the source country.
READ ALSO:
- Investment income in Morocco: dividends, interest and withholding tax
- Withholding tax on dividends in Morocco
- Withholding tax on interest in Morocco
- Withholding tax: which products are subject?
- Salary income tax in Morocco: 2026 scale
- Tax law advisory — Upsilon Consulting
This article is written by the chartered accountants team at Upsilon Consulting, a firm registered with the Order of Chartered Accountants (OEC) of Morocco.
Need guidance on the taxation of securities? Contact Upsilon Consulting for tailored tax advisory services.