# Moroccan salary simulator: rules specification and validation

Version 0.2, 24 October 2026. Engine `ma-salary-2026-plf2027-v1.1.2`. Website locales: Arabic, French, English. Currency: MAD.

**Status: sourced implementation specification with arithmetic-verified examples. Not payroll-certified.** The supplied consolidated CGI 2026 has been read at the relevant articles; key pages were rendered and visually checked. The 2027–2031 scales are from the supplied PLF 2027 and remain proposal scenarios. Official regulator/provider material was used for contribution research. A Moroccan payroll specialist has not reviewed this work, and no independent human sign-off is implied.

This document supersedes the salary-related research gaps in the earlier implementation plan where expressly resolved below. It specifies the calculation engine used by the browser simulator. Annual reference results remain distinct from certified payroll withholding.

## Scheduled bonuses and allowances, v1.1 contract

This section supersedes references below that exclude all bonuses. Known cash payments can be scheduled; unknown variable pay, arrears and retroactive payroll regularizations remain unsupported. No allowance classification or exemption ceiling has been newly legally verified. A name alone never changes tax or social treatment.

- `gross`: base monthly cash salary excluding added components. It repeats for 12 employed months with one employer and unchanged family eligibility.
- `components`: up to 30 uniquely identified cash items: seniority, transport, meal, housing, responsibility, performance, thirteenth month or other. The user enters amounts or percentages, including seniority. No tenure-to-rate inference is made.
- Each item has `mode: amount` plus `amount`, or `mode: percent`, `rate` (a user-entered percentage such as `10`), and `percentBase: base|custom` (custom requires `baseAmount`). The calculated item is rounded half-up to cents.
- `frequency: monthly` pays in all 12 months; `once` requires a payment `month` from 1 to 12. Several one-off rows model several payment dates. The entered calendar repeats each comparison year. A thirteenth-month label does not imply an amount.
- Private `treatment: salary` means the entire component is taxable and included in professional-expense, CNSS, AMO and eligible gross-product bases. Selecting this is an explicit classification, never an exemption.
- `treatment: payslip` requires `classificationConfirmed: true`, a nonempty `basisReference`, and component-only bases: `taxableAmount`, `expenseAmount`, `socialAmount`, `healthAmount`, `optionalAmount`, plus `pensionAmount` for public CMR. Public components must use this mode. Each base must be between zero and the component cash amount. Expense base cannot exceed taxable amount. The user must obtain valid payroll/legal evidence. The application does not verify the declaration.
- A partly exempt payslip component additionally requires explicit `taxableAmount2031` and `expenseAmount2031`, rather than silently retaining a disputed exemption in the 2031 scenario. This is a user scenario, not a legal determination. Social and optional-base declarations remain frozen assumptions.
- The optional gross or above-CNSS percentage base uses base salary plus the component portions declared eligible for optional products. Custom fixed bases stay user-entered. Optional-product eligibility and payroll deduction conditions remain separate.

Calculation order: build all 12 cash/tax/social/product bases; compute and round each month's employee contributions and products with that month's CNSS ceiling and public-health floor/cap; sum annual taxable remuneration, eligible expense bases and deductible contributions; apply annual professional expenses, rounded annual RNI, progressive IR and eligible family relief once; reconcile annual cash. Divide annual amounts by 12 only for average displays.

`months` exposes the cash gross, tax/expense/social/health bases, each component, contributions, optional products and cash before annual IR for every month. No monthly IR is invented. Top-level monthly contributions and optional-product base/amount are annual averages. Withholding and remittance remain `null`. Noncash benefits are blocked in component mode.

Worked example, private base 5,000 MAD monthly plus a fully taxable 10,000 MAD December bonus, no optional product or dependants, 2026 baseline: annual cash/taxable gross 70,000; CNSS 11 × 224 + 268.80 = 2,732.80; AMO 1,582; deductible contributions 4,314.80; professional expenses 24,500; rounded annual RNI 41,190; reference annual IR 119; annual net 65,566.20; monthly average 5,463.85. Moving 5,000 of the bonus to a second month changes annual capped CNSS to 2,777.60. These hand-calculated checks validate scheduling arithmetic, not payroll certification or exemption eligibility.

## 1. Scope and evidence closure

| Area | Result | Remaining limitation |
| --- | --- | --- |
| 2026 IR bands | Verified against CGI article 73-I | None for ordinary progressive-rate schedule |
| Professional expenses | 2026 thresholds, bases and exceptions read; 2027 amendment checked | Edge interpretation involving benefits and threshold selection requires reviewer confirmation |
| Dependants | Amount, cap, relationships, age, income and next-month timing verified | Individual eligibility evidence must be established; double claims and unusual family arrangements require review |
| Statutory rounding | Article 167 found and visually checked | Individual monthly withholding versus employer aggregate remittance application still requires operational guidance |
| CNSS social contributions | Standard capped baseline triangulated from primary legal/regulator sources | No exhaustive 2026 amendment audit; contribution branch rounding and exemption guide not fully retrieved |
| Private AMO | 2.26% employee baseline supported by current regulator guidance | Legacy group-cover exemption and reduced-pay exceptions need separate treatment |
| Public AMO | 2.5%, 70 MAD floor, 400 MAD ceiling supported by provider/regulator | Use the appropriate legal base; February 2027 administrator transition is not proof of rate change |
| CMR civil pension | 14% and legal base established from law 011-71, articles 11 and 16 | Special status, reduced pay and arrears require a separate profile |
| RCAR | 6% and base structure established in employer guide | Current 2026 ceiling not found; automatic RCAR profile blocked |
| CIMR | User-entered employee rate and plan-specific base specified | Contract and payroll withholding/remittance conditions must be met |
| Other financial products | Cash treatment and legal categories specified | Product-specific tax treatment cannot be inferred from its brand name |

### Source authority and dates

The CGI is the consolidated 2026 tax baseline. The PLF is proposed legislation. Regulator fact sheets explain contribution schemes but may retain historical material elsewhere on the same page. Provider guidance does not establish all later legislative changes. In particular, do not copy an old pension eligibility rule from a source merely because its contribution section is useful.

Future social contributions are not known through 2031. The multiyear comparison holds the verified baseline rates and the user's product settings constant, unless a separately verified dated rule is available. All resulting future net figures must be labeled scenarios with this assumption.

## 2. Supported employment profiles

| Profile | Engine support required | Release disposition |
| --- | --- | --- |
| Private employee, ordinary progressive IR, full-year regular salary, standard CNSS/AMO | Automatic contribution formulas, ordinary article 59-I-A expenses | First release candidate after remaining rounding/freshness review |
| Same with payroll-withheld CIMR | User rate/amount, product/base and legal deduction classification | First release candidate |
| Same with reviewed group risk insurance | User employee premium, qualifying risk category and evidence | Conditional, only reviewed products |
| Public employee, CMR civil pension | Explicit pensionable base and public health base, separate affiliation | Specified and illustrated; not fully public-payroll-certified |
| Public employee, RCAR | Dated official ceiling and complementary-plan settings | Block automatic calculation until ceiling confirmed |
| Actual payslip reconciliation | User-entered mandatory amounts, each tagged to scheme and period | Allowed as declared-input scenario; never described as statutory verification |
| Other cases | Separate rule packages | Unsupported initially |

Unsupported initially: multiple employers, partial-year employment, irregular bonuses and arrears, special occupational deduction categories, maritime employees, nonresident/special foreign-worker regimes, CFC flat-rate options, first-job or program exemptions, expatriate social-security exemptions, pension income, termination/severance, mortgage relief, individual retirement-policy deductions requiring annual filing, and exceptional pension buybacks/carryovers. Ask a scope question before applying ordinary rules. Do not silently ignore an unsupported material item.

The payroll profile is not simply public/private. Store employment type, tax regime, social scheme, health regime, retirement scheme and optional products separately. CNSS, CIMR and AMO can coexist; CMR and RCAR must not be stacked without a verified exceptional rule.

## 3. Input contract

Every monetary value is a decimal string. Rates are decimal fractions internally: a displayed 6% becomes `0.06`. Reject ambiguous or invalid inputs rather than coercing them to zero.

| Input | Required meaning |
| --- | --- |
| Fiscal year/scenario | 2026 enacted or identified PLF proposal version/year |
| Gross cash earnings | Cash remuneration before employee deductions, separated into components |
| Benefits in cash/kind | Separate legal classification; noncash value does not increase bank transfer |
| Reimbursements/family allowances | Separate from ordinary pay; tax and contribution exemptions assessed independently |
| Contribution bases | CNSS, health, pension and each optional product have explicit bases |
| Optional contribution | User-entered employee percentage or fixed amount, frequency, effective dates and payroll/direct-debit channel |
| Dependants | Qualifying relationship, birth date, relevant annual income and legal-charge status, with change dates |
| Other cash deductions | Advances, garnishments, nondeductible payroll charges, separate from tax deductions |
| Profile flags | Special regime, multiple employers, variable pay, employment dates and coverage exceptions |

For each pay component store: cash/noncash, taxable/exempt and source, professional-expense-base eligibility, each contribution-base inclusion, effective dates, and evidence. A tax exemption does not automatically imply a CNSS exemption.

The minimal ordinary profile can assume all entered ordinary cash remuneration is taxable and contributory, but must state that assumption. Any purported exempt or unusual allowance requires classification rather than a free-text exemption toggle.

## 4. The 2026 tax baseline

### 4.1. Salary and taxable gross

CGI articles 56 and 58, PDF pages 88 and 94 (printed 89 and 95): salary taxation includes the relevant remuneration and benefits. Compute taxable gross after article 57 exemptions. Value benefits in kind at their real value, reduced by the employee's contribution toward that benefit as article 58 specifies. Do not subtract that employee contribution twice from cash or tax base.

Article 57-1° requires justified employment expenses for the reimbursement exemption and includes occupation-specific restrictions. An allowance called transport, representation, internet, or housing is not automatically exempt. The complete tax/contribution treatment of such allowances needs supporting facts and guidance.

### 4.2. Professional-expense deduction

CGI article 59-I, PDF pages 96–98 (printed 97–99):

- Ordinary A category: 35% if annual taxable gross does not exceed 78,000 MAD; otherwise 25%, capped at 35,000 MAD annually.
- The percentage base excludes benefits in cash or kind. This is not the net salary and is not reduced by CNSS, AMO or CIMR first.
- Occupational category B has distinct 25%, 35% or 45% rates and a 35,000 MAD cap. Category C has a 40% maritime rule. These are outside the ordinary-profile release.

Define `G_tax` as annual taxable gross and `P` as the eligible professional-expense base. For the ordinary 2026 profile:

```text
if G_tax <= 78,000: FP = 0.35 × P
otherwise:         FP = min(0.25 × P, 35,000)
```

Do not apply 35% to a first slice and 25% to the remainder. It is a branch selection, not a progressive deduction schedule. For a pure ordinary-pay case, the deduction falls from 27,300 at 78,000 to 19,500.0025 at 78,000.01. This discontinuity must be preserved. It makes a globally monotonic gross-to-net assumption unsafe.

For cases containing benefits, distinguish the statutory annual gross criterion from the percentage base. The implementation candidate selects the branch using taxable gross including taxable benefits and applies its percentage to the eligible base excluding them. A reviewer must confirm this edge interpretation before benefits-containing calculations are released.

### 4.3. Employee deductions

CGI article 59-II–IV, PDF pages 98–99 (printed 99–100), provides categories for pension/retirement, social protection and qualifying employee group-risk premiums. Keep one entry per deduction with legal classification, actual withholding, and eligible tax amount.

Amounts paid by the employer do not reduce employee net cash. A tax deduction is not a second cash deduction. Do not subtract the same CNSS amount both as a pension item and again as an aggregate social contribution.

### 4.4. Annual 2026 progressive tax

CGI article 73-I, PDF page 118 (printed 119):

| Annual RNI interval | Marginal rate | Equivalent rate-minus-offset formula |
| --- | ---: | --- |
| Up to 40,000 | 0% | 0 |
| Over 40,000 through 60,000 | 10% | RNI × 0.10 − 4,000 |
| Over 60,000 through 80,000 | 20% | RNI × 0.20 − 10,000 |
| Over 80,000 through 100,000 | 30% | RNI × 0.30 − 18,000 |
| Over 100,000 through 180,000 | 34% | RNI × 0.34 − 22,000 |
| Over 180,000 | 37% | RNI × 0.37 − 27,400 |

Use continuous intervals with cents, not a gap between 40,000 and the legislative whole-dirham notation 40,001. Apply the required base rounding at its documented stage.

## 5. Proposed tax changes, 2027–2031

Supplied PLF 2027, article 7, PDF pages 9, 15 and 25:

| Year | 0% ceiling | 10% upper bound | Subsequent bands |
| --- | ---: | ---: | --- |
| 2027 | 60,000 | 80,000 | 20% to 100,000; 34% to 180,000; 37% above |
| 2028 | 60,000 | 100,000 | 25% to 200,000; 37% above |
| 2029 | 60,000 | 130,000 | 20% to 200,000; 35% above |
| 2030 | 60,000 | 150,000 | 20% to 200,000; 30% above |
| 2031 | 60,000 | 150,000 | 20% to 500,000; 30% above |

From 2027, the amended ordinary professional-expense deduction is `min(0.45 × P, 35,000)`. Paragraph B is abrogated and category C remains distinct. The cap is reached at an eligible base of 77,777.777… MAD. Do not round this threshold into a new legal eligibility amount; compare the computed deduction against the cap.

The amended expense-allowance exemption starts in 2031. The previous version continues through 2030. Persistent salary supplements may become taxable even when the total pay package does not grow. Such cases require component-level reclassification and contribution-base review, not just a lower tax rate.

These are proposal-versioned rules. No production status promotion occurs automatically on 1 January. Obtain and compare the final enacted law first.

## 6. Statutory contribution registry

### 6.1. Standard private CNSS

Baseline for ordinary, full-month private employees:

```text
capped_social_base = min(eligible_CNSS_base, 6,000)
employee_social = 4.48% × capped_social_base
```

The 4.48% comprises 3.96% long-term plus 0.33% short-term and 0.19% IPE. Do not add IPE again. Maximum before any rounding is 268.80 MAD/month. Source: ACAPS legal decree 2-01-2723, IPE financing publication and CNSS fact sheet [W1–W3]. The old decree alone omits later IPE financing and must not be used as a complete current table.

The legal base includes remuneration and benefits under dahir 1-72-184 article 19 [W4]. Exempt reimbursement classifications need the applicable administrative base guide. Initial scenarios assume ordinary cash salary is fully contributory.

The ceiling is monthly. Do not replace it with a 72,000 annual ceiling for irregular pay. Partial months, multiple employments, exemptions and branch-rounding behavior require dedicated rules.

### 6.2. Private employee AMO

Regulator guidance [W5] supports an employee share of 2.26% of the applicable uncapped salary base. Employer contributions remain separate. Law 65-00 article 106 links the private base to social-security remuneration [W6]. Never apply the 6,000 CNSS ceiling to standard AMO. Legacy exempt group-cover employers and special populations require a separate reviewed profile.

### 6.3. Public health cover

Provider guidance [W7] supports employee 2.5%, minimum 70 and maximum 400 MAD/month:

```text
employee_public_health = clamp(0.025 × eligible_public_health_base, 70, 400)
```

The public base depends on the legal employment category under article 106 [W6], not indiscriminately on every payslip component. No active employee means no automatic 70 MAD charge: zero pay, reduced pay and suspended status require separate rules. Do not use `clamp` as a rule for all statuses.

The supplied 2027 reports describe a CNOPS-to-CNSS administrative transfer scheduled for February 2027. Confirm the governing law and implementation. Do not substitute private AMO rates merely because the administrator changes.

### 6.4. Public pensions

CMR civil: law 011-71 article 16 gives 14% of article 11 pensionable emoluments [W8]. The base has specific statutory components and exclusions. Ask for it explicitly; do not infer it from total gross. Military and special-status pension rules are outside this profile.

RCAR: the employer guide gives employee 6% on the relevant fixed remuneration, excluding expense/family items, with a dated ceiling [W9]. Its table stops at 2023 (235,584 annually, 19,632 monthly). This is not a verified 2026 ceiling. Automatic RCAR results remain unavailable until the applicable ceiling and complementary arrangement are confirmed.

### 6.5. User-entered statutory amounts

A reconciliation mode can accept actual employee CNSS/AMO/CMR/RCAR amounts from a payslip. Mark these `user_declared`, preserve the period and base, and distinguish them from automatically verified amounts. Future years cannot silently reuse those amounts as legal forecasts.

## 7. CIMR and other Moroccan financial products

### 7.1. User controls the contribution

For every optional item collect product, employee percentage or fixed amount, base, frequency, start/end dates, and payment channel. No silent 6% default. An explicit absence of CIMR is zero; an unanswered CIMR question is unknown.

Supported base modes: selected eligible gross components, an explicit contract base, or the portion of eligible remuneration exceeding the scheme ceiling. Explain the selected base beside the rate.

CIMR provider guidance distinguishes Al Kamil's gross-remuneration base from Al Mounassib's portion above the CNSS ceiling [W10]. Verify the actual contract. At 15,000 MAD eligible monthly salary and a user-entered 6%, these produce 900 MAD and 540 MAD respectively. Deduct the employee amount, never the employer amount.

### 7.2. Contribution and tax deduction are separate

| Product class | Cash effect | Tax effect |
| --- | --- | --- |
| Qualifying employer-withheld CIMR/retirement-scheme contribution | Reduces payroll cash | Article 59-II-A treatment, subject to scheme and employer conditions |
| Qualifying employee group insurance for illness/maternity/disability/death | Reduces payroll cash if withheld | Article 59-IV classification, with supporting contract |
| Insurer retirement policy | Depends on payroll/direct-debit channel | Article 28-III eligibility and limits, separate implementation |
| Ordinary savings, investments, PEA, insurance or Takaful with unverified deduction eligibility | May reduce disposable income | No salary tax deduction by default |
| Unknown product | Show separately or require clarification | Never manufacture a tax deduction |

Article 59-II-A requires employer withholding/remittance and retention of a certified contract copy for the relevant retirement deductions. Provider guidance corroborates employer-routed CIMR deduction. Individual bank debit alone does not establish an immediate payroll-tax reduction.

Article 28-III, CGI PDF pages 62–63 (printed 63–64), describes qualifying insurer retirement policies, including eight-year duration, benefits from age 45, and limits depending on the income category (including a 50% regular net-taxable-salary limit for salary-only taxpayers). It is not a universal 50% cap on every pension deduction. Do not merge article 28 insurer policies with article 59 pension schemes. The latter specifically cross-refers to selected later paragraphs of article 28, not its entire limit structure.

Individual-policy limit-base ordering, combined policies and annual-filing versus employer withholding require a specialist decision before automation. Store eligibility facts now; classify these tax calculations as unsupported rather than offer an arbitrary deductible checkbox. Mortgage deductions under article 59-V or article 28-II are also separate, mutually constrained cases outside the first release.

A direct-debit saving of 1,000 MAD after payroll leaves `net_payable` unchanged and reduces `disposable_after_savings` by 1,000. A payroll deduction reduces the bank transfer. Keep these outputs distinct.

## 8. Dependant eligibility and timing

CGI articles 74–75, PDF pages 124–125 (printed 125–126), visually checked:

- Annual reduction: 600 MAD per qualifying person, maximum 3,600 MAD.
- Article 74-II-A names the taxpayer's wife. Do not impose the children's income test on a wife merely by analogy.
- Own children and legally taken-in children at the household qualify subject to the stated income and age conditions.
- A child's annual global income must not exceed the exempt annual IR tranche: 40,000 in the 2026 baseline. The proposed scales make that reference 60,000 in their scenarios. Equality qualifies; an amount above the threshold does not.
- Age must not exceed 27. Do not import AMO's distinct dependent-child age rules. The age condition is waived for children whose infirmity prevents them supporting themselves; the income condition is not automatically waived.
- A woman taxpayer can claim husband/children when legally dependent under the stated conditions. Do not treat every married taxpayer as entitled to an unconditional spouse credit.
- Family changes during a month apply from the first following month. Input change dates and the legally confirmed eligibility state; birthday edge application must be included in specialist review.
- Relief is applied against tax, not taxable income. Do not turn unused relief into negative salary tax.

For unchanged qualifying status throughout a full year: `credit = min(number_eligible, 6) × 600`. Do not count the taxpayer, parents, siblings or unrelated household occupants automatically. Do not use one count for tax relief, AMO dependants and family-allowance benefits.

Event-based monthly relief and annual reconciliation need dated eligibility records. The initial constant-full-year example pack assumes eligibility does not change during the year. Potential duplicate claims across taxpayers are a review exception, not inferred from a household headcount.

## 9. Calculation sequence

1. Validate scope, employment period and selected ruleset. Stop on unsupported material circumstances.
2. Normalize local numeric input to exact decimal values, preserving original display locale.
3. Classify earnings into cash/noncash, tax treatment, professional-expense base and each social/retirement base.
4. Sum taxable gross after supported exemptions. Compute `P` separately.
5. Compute employee statutory contributions per scheme and month. Apply ceiling/floor at the legal period, then the verified scheme rounding policy.
6. Compute user-entered optional contributions on their contract base. Determine legally deductible portions without double counting.
7. Calculate professional expenses on `P`, selecting the appropriate year/occupation branch.
8. Calculate exact RNI: taxable gross minus professional expenses and eligible employee deductions. Negative bases require a defined zero-tax/no-carry result within the supported profile; unusual excess contributions are exceptions.
9. Apply the approved tax-base rounding policy. Keep exact and rounded RNI in the trace.
10. Compute progressive bracket tax using exact decimal arithmetic.
11. Apply eligible family relief at the correct time. Bound current tax at zero within this profile.
12. Produce withholding only under an approved period/regularization policy. Apply remittance rounding to the legally appropriate payer/payment, not automatically per employee.
13. Reconcile cash net: gross cash plus exempt cash reimbursement/allowances minus employee cash deductions and employee withholding. Do not subtract professional expenses from cash.
14. Separately calculate disposable cash after out-of-payroll savings, if requested.
15. Compare against the same pay package under the 2026 baseline. Clearly expose future frozen-rate assumptions and any year-specific allowance reclassification.

The first delivery mode is an annual constant-package scenario with monthly-equivalent presentation. A monthly equivalent is not promised to equal an actual payslip withholding or bank transfer. Bonuses, partial years, variable remuneration and year-to-date corrections are not handled by multiplying one month by twelve.

## 10. Rounding contract

CGI article 167, PDF page 316 (printed 317), states upward rounding of tax calculation bases to the next ten MAD and upward rounding of each payment to the next dirham. An amount already on a multiple stays there.

```text
ceil10(x) = 10 × ceiling(x / 10)
ceil1(x)  = ceiling(x)
```

Examples: 40,000 → 40,000; 40,000.01 → 40,010; a payment of 7,218.72 → 7,219. These are not nearest rounding and not cent rounding.

**Do not silently assume that an employer's aggregate payment is rounded separately for every employee.** Articles 156 and 174 establish withholding on payments and employer remittance; the retrieved text does not resolve every operational monthly rounding step. An annual reference tax based on `ceil10(annual_RNI)` is useful for validation but is not a certified monthly payroll algorithm.

Store at least: exact base, tax base after upward rounding, raw bracket tax, relief, tax after relief, individual withholding, aggregate remittance, payment-rounding adjustment, and the payer/period of each adjustment. A remittance adjustment cannot automatically become an extra deduction from the employee.

Social contributions and contractual products need their own rounding policy. The worked examples explicitly use nearest-cent half-up on each monthly combined employee contribution and annual aggregation afterwards. This modelling convention is not claimed to be a verified CNSS branch-rounding instruction. Check component-wise versus aggregate rounding against official instructions and reference payslips before release.

## 11. Worked examples and arithmetic validation

The examples use ordinary cash salary paid identically for 12 months, no other income, no special tax regime, unchanged eligibility, and frozen social rates for future scenarios. Benefits and reimbursement cases explicitly state their separate classification. All user-entered CIMR contributions are assumed to meet the employer/contract conditions for article 59 deduction.

The annual RNI is rounded upward to ten MAD for these reference illustrations. The displayed tax is after family relief and **before payment rounding**. A separately computed hypothetical single annual payment is rounded upward to one MAD in the validation JSON. Neither is presented as actual monthly employee withholding.

### Case A: ordinary 10,000 MAD monthly gross, 2026

1. Annual taxable cash salary: 120,000.
2. Employee CNSS: 268.80/month, or 3,225.60/year.
3. Employee AMO: 226/month, or 2,712/year.
4. Professional expenses: 25% × 120,000 = 30,000.
5. Exact RNI: 120,000 − 3,225.60 − 2,712 − 30,000 = 84,062.40.
6. Annual reference base after article 167: 84,070.
7. IR before family relief: 2,000 + 4,000 + 4,070 × 30% = 7,221.
8. Annual-model cash net: 106,841.40; monthly equivalent 8,903.45.

For proposed 2027, professional expenses become 35,000, rounded annual RNI is 79,070 and reference tax is 1,907. The monthly-equivalent net is 9,346.28. This is a scenario under declared assumptions, not a universal exemption or payroll guarantee.

### Case B: 15,000 MAD gross, user CIMR 6% on full eligible salary, three eligible dependants

CIMR is 900/month. CNSS is 268.80 and AMO 339. Professional expenses are capped at 35,000 in both the 2026 and proposal scenarios. Exact RNI is 126,906.40, rounded base 126,910, and full-year family relief 1,800.

| Year | Reference annual IR before payment rounding | Monthly-equivalent cash net |
| --- | ---: | ---: |
| 2026 | 19,349.40 | 11,879.75 |
| 2027 | 13,349.40 | 12,379.75 |
| 2028 | 8,927.50 | 12,748.24 |
| 2029 | 4,891.00 | 13,084.62 |
| 2030 | 4,891.00 | 13,084.62 |
| 2031 | 4,891.00 | 13,084.62 |

### Case C: explicit public CMR bases, 2026

Cash salary 10,000/month, CMR base 8,000/month, public health base 10,000/month, no dependants. CMR = 1,120/month; health = 250/month. With ordinary professional expenses of 30,000/year, RNI = 73,560 and tax = 4,712 before payment rounding. Annual cash net is 98,848; monthly equivalent 8,237.33. This validates arithmetic from declared bases, not the classification of a real public payslip.

### Benefits, reimbursements and contribution-base variants

- A 1,000/month fully taxable/contributory noncash benefit on top of 10,000 cash increases taxable and AMO bases, leaves the cash salary at 10,000 and does not enter the ordinary professional-expense percentage base.
- A fully documented, legally exempt and noncontributory reimbursement of 500/month leaves the corresponding base case's RNI unchanged and adds 6,000/year to cash. The exemption classification is a stated fixture assumption, not a universal rule for allowances.
- A 6% CIMR contribution on 9,000 rather than 15,000 produces 540 rather than 900/month. Changing the base must change both the cash contribution and its eligible taxable-income deduction.

### Validation performed

`work/validate_salary_reference.py` runs 254 exact checks. It compares a Decimal progressive-slice method against a separately transcribed rate-minus-offset method using rational arithmetic. It checks 81 tax-boundary inputs (below/at/above by 0.01), before and after base rounding, plus fixed reference amounts, expense thresholds/caps, reimbursement invariance, and 54 annual worked scenarios.

This is **computational cross-checking by the same author**, not an independent payroll professional's review, and not a check against a production engine. Shared legal assumptions can still be wrong. Full machine-readable traces are in `work/salary-validation-results.json`; the complete scenario table appears in the appendix.

## 12. Remaining validation and release gates

| Gate | Required evidence or action | State |
| --- | --- | --- |
| Individual monthly rounding and withholding | DGI payroll guidance and reference payslips; confirm employer-remittance distinction | Open, blocks exact-payslip claim |
| Social contribution rounding | Scheme instructions or independently reconciled employer calculation | Open |
| Freshness and exemptions | Verify dated CNSS/AMO instruments and current base exclusions; no search-result absence proof | Partly resolved |
| 2026 RCAR ceiling | Current official annual ceiling and complementary coverage | Open, blocks automatic RCAR |
| Optional insurance tax deduction | Contract-level classification, statutory cap base/order and payment channel | Open for unapproved products |
| Dependant facts and changes | Eligibility evidence, monthly treatment and duplicate-claim cases | Rules established; individual validation remains |
| Ordinary 78,000 threshold with benefits | Confirm branch criterion versus percentage base | Reviewer decision |
| 2031 recurring allowances | Final law, component treatment and corresponding contribution effects | Proposal rules only |
| Fiscal review | Moroccan payroll specialist checks source-to-formula mapping and signs examples | Not performed |

The following source-to-fixture tests are required in addition to the executed tax arithmetic:

- CNSS base just below/at/above 6,000; distinguish AMO continuing above that cap.
- Public health bases at 2,800 and 16,000, with 0.01 neighbors; zero/reduced-pay status must not receive a fabricated floor.
- Professional-expense 78,000 discontinuity, 140,000 cap point in 2026, and exact 45%-cap equality in the proposed years.
- Dependant income equal to/above the exempt threshold; age 27/28; disability; legal-charge evidence; more than six persons; midmonth family changes.
- Unknown product, payroll versus direct debit, optional 0% versus missing rate, excessive contribution, overlapping deductions, employer versus employee share.
- Net cash reconciliation with noncash benefits and employee copayments.
- Unsupported regimes and missing mandatory bases produce explicit unavailable states.
- Identical numbers in Arabic/French/English; locale input normalization changes formatting only.

### Review packet for a payroll specialist

Provide this specification, CGI pages, the identified contribution instruments, example JSON and source hashes. Request explicit approval or corrections for: deduction base/branch, scheme applicability, dependant conditions, rounding stages, payment period, annual regularization, optional-product eligibility and every representative trace. Record reviewer name/role, date, rule version, exceptions and fixture discrepancies. Do not mark the engine certified merely because arithmetic tests pass.

## 13. Rule/data implementation contract

Every active rule stores ID, version, legal stage, effective interval, employment scope, source article/page, formula, base definition, employee/employer share, cap/floor, rounding stage, verified date and reviewer status. A result stores assumptions and rule IDs, not just a final amount.

Optional-product records store entered rate or amount, selected base/components, channel, period and reviewed legal category. No opaque product name grants a tax deduction. Distinguish `verified`, `user_declared`, `assumed_frozen_future`, `proposal` and `unsupported` values.

Core outputs: taxable gross, professional-expense base/deduction, each contribution and eligible tax amount, exact/rounded RNI, bracket tax, family relief, withholding-policy status, cash net, optional disposable-after-savings, year comparison and source-linked calculation trace. An unsupported material rule blocks the affected result; do not replace it with zero.

Use exact decimal money and stable internal units. Preserve calculation precision and documented rounding. Annual totals and monthly equivalents must reconcile, allowing only declared presentation rounding. Do not use a global gross-to-net bisection that assumes monotonicity across the 2026 expense threshold.

## 14. Source register

PDF locators refer to physical PDF page positions, not the printed footer. CGI page positions in this supplied file are generally one lower than printed labels.

| ID | Primary source | Relevant locators/use |
| --- | --- | --- |
| L1 | Supplied `source/CGI-2026-FR.pdf` | Arts. 28 (PDF 60–63), 56–59 (PDF 88–99), 73 (PDF 118), 74–75 (PDF 124–125), 156 (PDF 292–293), 167 (PDF 316), 174 (PDF 328–329) |
| L2 | Supplied `source/corps-PLF2027-fr.pdf` | PDF 9, 15, 25: expense deduction, annual bands and commencement |
| W1 | [ACAPS legal decree 2-01-2723](https://www.acaps.ma/sites/default/files/publication_documents/decret_ndeg_2-01-2723.pdf) | One page, arts. 2–4: historical branch rates and ceiling; not complete current IPE treatment |
| W2 | [ACAPS CNSS fact sheet](https://www.acaps.ma/fr/files/fichesynthetiquecnsspdf) | PDF p.2, branch totals and 6,000 ceiling; do not assume every other historic statement is current |
| W3 | [ACAPS publication containing IPE financing](https://www.acaps.ma/fr/files/acapsbondeg7054frdu06janvier2022catassuranceetreassurancepdf) | Employee 0.19%, employer 0.38%, 6,000 cap; retrieved indexed text, complete page review outstanding |
| W4 | [ACAPS dahir 1-72-184](https://www.acaps.ma/fr/files/dahir1-72-184pdf) | PDF p.5 art.19 remuneration base; historical consolidation, scope used narrowly |
| W5 | [ACAPS AMO guidance](https://www.acaps.ma/fr/grand-public/sante/couverture-medicale-de-base-amo) | Sector-specific contribution summary |
| W6 | [Law 65-00 hosted by ACAPS](https://acaps.ma/sites/default/files/publication_documents/loi_65.00_fr.pdf) | PDF p.43 art.106 bases; older consolidation, not authority for every 2027 amendment |
| W7 | [CNOPS contribution guidance](https://www.cnops.org.ma/fr/cotisations) | Active public employees, 2.5%, 70/400 limits; indexed full-page text retrieved, direct open failed |
| W8 | [Law 011-71 hosted by ACAPS](https://www.acaps.ma/sites/default/files/publication_documents/loi_011.71.pdf) | PDF pp.3 and 6, arts.11 and 16: CMR civil base and 14% |
| W9 | [RCAR employer guide](https://www.rcar.ma/fr/services/commun/document-reference/guide_employeur_04032025.pdf) | PDF pp.21–22 and 68: 6%, base and old ceiling table |
| W10 | [CIMR contribution guidance](https://www.cimr.ma/cotiser-a-la-cimr/) | Product-base distinction and employer-routed contribution deduction |

Web sources accessed 23 October 2026. No absence-of-amendment conclusion follows from a failed search. The 2026 source SHA-256 is `fe03c94471aefd23a9be9de11da5bff0593b45a72c2f90939eeaae7298b413e1`.

## Appendix: complete reference scenario table

P4000/P6000/P10000/P30000: ordinary monthly gross, zero CIMR/dependants. P15000-C6-D3: gross 15,000, user-entered 6% CIMR on full salary and three eligible dependants. BENEFIT: 10,000 cash plus 1,000 noncash benefit, fully taxable/contributory but outside FP base. REIMBURSEMENT: P10000 plus 500 exempt/noncontributory cash reimbursement. CIMR-EXCESS: 15,000 gross, 6% on 9,000. PUBLIC-CMR: cash 10,000, CMR base 8,000 and health base 10,000. All amounts MAD. Future social rates frozen. Monthly equivalents are not exact payslip withholding outputs.

| Case | Year | CNSS/CMR per month | Health per month | CIMR per month | Expenses annual | RNI exact | RNI ceil10 | Annual IR before payment rounding | Monthly equivalent net |
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
| P4000 | 2026 | 179.20 | 90.40 | 0.00 | 16800.00 | 27964.80 | 27970 | 0 | 3730.40 |
| P4000 | 2027 | 179.20 | 90.40 | 0.00 | 21600.00 | 23164.80 | 23170 | 0 | 3730.40 |
| P4000 | 2028 | 179.20 | 90.40 | 0.00 | 21600.00 | 23164.80 | 23170 | 0 | 3730.40 |
| P4000 | 2029 | 179.20 | 90.40 | 0.00 | 21600.00 | 23164.80 | 23170 | 0 | 3730.40 |
| P4000 | 2030 | 179.20 | 90.40 | 0.00 | 21600.00 | 23164.80 | 23170 | 0 | 3730.40 |
| P4000 | 2031 | 179.20 | 90.40 | 0.00 | 21600.00 | 23164.80 | 23170 | 0 | 3730.40 |
| P6000 | 2026 | 268.80 | 135.60 | 0.00 | 25200.00 | 41947.20 | 41950 | 195 | 5579.35 |
| P6000 | 2027 | 268.80 | 135.60 | 0.00 | 32400.00 | 34747.20 | 34750 | 0 | 5595.60 |
| P6000 | 2028 | 268.80 | 135.60 | 0.00 | 32400.00 | 34747.20 | 34750 | 0 | 5595.60 |
| P6000 | 2029 | 268.80 | 135.60 | 0.00 | 32400.00 | 34747.20 | 34750 | 0 | 5595.60 |
| P6000 | 2030 | 268.80 | 135.60 | 0.00 | 32400.00 | 34747.20 | 34750 | 0 | 5595.60 |
| P6000 | 2031 | 268.80 | 135.60 | 0.00 | 32400.00 | 34747.20 | 34750 | 0 | 5595.60 |
| P10000 | 2026 | 268.80 | 226.00 | 0.00 | 30000.00 | 84062.40 | 84070 | 7221 | 8903.45 |
| P10000 | 2027 | 268.80 | 226.00 | 0.00 | 35000 | 79062.40 | 79070 | 1907 | 9346.28 |
| P10000 | 2028 | 268.80 | 226.00 | 0.00 | 35000 | 79062.40 | 79070 | 1907 | 9346.28 |
| P10000 | 2029 | 268.80 | 226.00 | 0.00 | 35000 | 79062.40 | 79070 | 1907 | 9346.28 |
| P10000 | 2030 | 268.80 | 226.00 | 0.00 | 35000 | 79062.40 | 79070 | 1907 | 9346.28 |
| P10000 | 2031 | 268.80 | 226.00 | 0.00 | 35000 | 79062.40 | 79070 | 1907 | 9346.28 |
| P15000-C6-D3 | 2026 | 268.80 | 339.00 | 900.00 | 35000 | 126906.40 | 126910 | 19349.4 | 11879.75 |
| P15000-C6-D3 | 2027 | 268.80 | 339.00 | 900.00 | 35000 | 126906.40 | 126910 | 13349.4 | 12379.75 |
| P15000-C6-D3 | 2028 | 268.80 | 339.00 | 900.00 | 35000 | 126906.40 | 126910 | 8927.5 | 12748.24 |
| P15000-C6-D3 | 2029 | 268.80 | 339.00 | 900.00 | 35000 | 126906.40 | 126910 | 4891 | 13084.62 |
| P15000-C6-D3 | 2030 | 268.80 | 339.00 | 900.00 | 35000 | 126906.40 | 126910 | 4891 | 13084.62 |
| P15000-C6-D3 | 2031 | 268.80 | 339.00 | 900.00 | 35000 | 126906.40 | 126910 | 4891 | 13084.62 |
| P30000 | 2026 | 268.80 | 678.00 | 0.00 | 35000 | 313638.40 | 313640 | 88646.8 | 21665.97 |
| P30000 | 2027 | 268.80 | 678.00 | 0.00 | 35000 | 313638.40 | 313640 | 82646.8 | 22165.97 |
| P30000 | 2028 | 268.80 | 678.00 | 0.00 | 35000 | 313638.40 | 313640 | 71046.8 | 23132.63 |
| P30000 | 2029 | 268.80 | 678.00 | 0.00 | 35000 | 313638.40 | 313640 | 60774 | 23988.70 |
| P30000 | 2030 | 268.80 | 678.00 | 0.00 | 35000 | 313638.40 | 313640 | 53092 | 24628.87 |
| P30000 | 2031 | 268.80 | 678.00 | 0.00 | 35000 | 313638.40 | 313640 | 41728 | 25575.87 |
| BENEFIT | 2026 | 268.80 | 248.60 | 0.00 | 30000.00 | 95791.20 | 95800 | 10740 | 8587.60 |
| BENEFIT | 2027 | 268.80 | 248.60 | 0.00 | 35000 | 90791.20 | 90800 | 4160 | 9135.93 |
| BENEFIT | 2028 | 268.80 | 248.60 | 0.00 | 35000 | 90791.20 | 90800 | 3080 | 9225.93 |
| BENEFIT | 2029 | 268.80 | 248.60 | 0.00 | 35000 | 90791.20 | 90800 | 3080 | 9225.93 |
| BENEFIT | 2030 | 268.80 | 248.60 | 0.00 | 35000 | 90791.20 | 90800 | 3080 | 9225.93 |
| BENEFIT | 2031 | 268.80 | 248.60 | 0.00 | 35000 | 90791.20 | 90800 | 3080 | 9225.93 |
| REIMBURSEMENT | 2026 | 268.80 | 226.00 | 0.00 | 30000.00 | 84062.40 | 84070 | 7221 | 9403.45 |
| REIMBURSEMENT | 2027 | 268.80 | 226.00 | 0.00 | 35000 | 79062.40 | 79070 | 1907 | 9846.28 |
| REIMBURSEMENT | 2028 | 268.80 | 226.00 | 0.00 | 35000 | 79062.40 | 79070 | 1907 | 9846.28 |
| REIMBURSEMENT | 2029 | 268.80 | 226.00 | 0.00 | 35000 | 79062.40 | 79070 | 1907 | 9846.28 |
| REIMBURSEMENT | 2030 | 268.80 | 226.00 | 0.00 | 35000 | 79062.40 | 79070 | 1907 | 9846.28 |
| REIMBURSEMENT | 2031 | 268.80 | 226.00 | 0.00 | 35000 | 79062.40 | 79070 | 1907 | 9846.28 |
| CIMR-EXCESS | 2026 | 268.80 | 339.00 | 540.00 | 35000 | 131226.40 | 131230 | 22618.2 | 11967.35 |
| CIMR-EXCESS | 2027 | 268.80 | 339.00 | 540.00 | 35000 | 131226.40 | 131230 | 16618.2 | 12467.35 |
| CIMR-EXCESS | 2028 | 268.80 | 339.00 | 540.00 | 35000 | 131226.40 | 131230 | 11807.5 | 12868.24 |
| CIMR-EXCESS | 2029 | 268.80 | 339.00 | 540.00 | 35000 | 131226.40 | 131230 | 7246 | 13248.37 |
| CIMR-EXCESS | 2030 | 268.80 | 339.00 | 540.00 | 35000 | 131226.40 | 131230 | 7123 | 13258.62 |
| CIMR-EXCESS | 2031 | 268.80 | 339.00 | 540.00 | 35000 | 131226.40 | 131230 | 7123 | 13258.62 |
| PUBLIC-CMR | 2026 | 1120.00 | 250.00 | 0.00 | 30000.00 | 73560.00 | 73560 | 4712 | 8237.33 |
| PUBLIC-CMR | 2027 | 1120.00 | 250.00 | 0.00 | 35000 | 68560.00 | 68560 | 856 | 8558.67 |
| PUBLIC-CMR | 2028 | 1120.00 | 250.00 | 0.00 | 35000 | 68560.00 | 68560 | 856 | 8558.67 |
| PUBLIC-CMR | 2029 | 1120.00 | 250.00 | 0.00 | 35000 | 68560.00 | 68560 | 856 | 8558.67 |
| PUBLIC-CMR | 2030 | 1120.00 | 250.00 | 0.00 | 35000 | 68560.00 | 68560 | 856 | 8558.67 |
| PUBLIC-CMR | 2031 | 1120.00 | 250.00 | 0.00 | 35000 | 68560.00 | 68560 | 856 | 8558.67 |


### Fully excluded cash allowance shortcut (v1.1.2)

Select `treatment: excluded` to retain the cash amount with zero tax, professional-expense, social, health, pension and optional-product bases throughout all comparison years. Selecting it is a simulation input, not independent classification verification. It requires no reference, attestation or separate 2031 assumption. The interface shows only one short explanation. Detailed base values and legacy `excluded2031` values are ignored in this mode. The amount may be fixed or a user-entered percentage, recurring or scheduled once. No exemption is inferred from the component name. Use custom bases (advanced) for partial or year-specific treatment; that mode retains its evidence requirements and explicit 2031 tax bases. This section supersedes the earlier shortcut's extra confirmation and future-assumption controls.
