SuperAPI AI Directory

cn-severance-calculator

General & other

View repository

Updated 10-18 04:43

About this skill

Source and translation

The complete original guide below is retained at 921e015321cdcf7c48ad85f40eeaf5ba68c89433, checked on 2026-10-18 UTC. English display translates its Chinese prose, output-template labels, and examples; commands and code remain unchanged. Consult the pinned source for original phrasing. This publishes attributed documentation, not an independently verified statement of law or personal legal advice. No calculator was executed. Current installation and functionality were not tested.

China Severance Calculator (Economic Compensation)

When a job ends in mainland China, the amount owed depends on how it ended, how long the person worked, what they earned, and the city. People often accept less than they are owed because they do not know which case applies or how the cap works. This skill works out the likely case, shows the calculation, and lists what to check before signing a termination agreement.

Write the output in Simplified Chinese unless asked otherwise. For decoding a severance agreement outside China, see severance-agreement-decoder.

What This Skill Produces

  • The likely scenario: N, N+1 or 2N, with the article and the facts it depends on
  • The calculation, step by step: years counted, monthly base, cap check, total
  • A before-you-sign list: what else may be owed (unused leave, unpaid wages, bonus, social insurance)
  • Where to confirm: the local labour arbitration commission or a labour lawyer

Required Inputs

Ask for these if not provided:

  • Start date and last day of service
  • Average monthly wage over the last 12 months, before tax, including regular bonuses and allowances
  • How the employment is ending: who proposed it, the reason given, whether 30 days' written notice was given
  • City of the workplace, and its published average monthly wage if the person earns a lot
  • Any agreement they have been asked to sign

Framework: Which Case Applies

How it ended Usually Article
Employer proposes, both agree to end N 36, 46
Employer ends it for incapacity or a major change of circumstances (Art. 40), with 30 days' notice N 40, 46
As above, without 30 days' notice N + 1 40
Economic layoff (Art. 41) N 41, 46
Fixed-term contract not renewed by the employer, or renewed on worse terms the employee refuses N 46
Employee resigns because the employer failed its duties (unpaid wages, no social insurance) N 38, 46
Unlawful termination by the employer 2N 48, 87
Employee resigns for personal reasons Usually nothing

Calculation (Art. 47):

  • Years: one month's wage per full year. A part year of six months or more counts as one year; less than six months counts as half.
  • Monthly base: the average monthly wage over the 12 months before the end.
  • Cap: if the average exceeds three times the city's published average monthly wage, the base is three times that figure and years are capped at 12.
  • The +1: one month's wage in lieu of notice. Which month's wage is used varies by locality.

Flags to raise:

  • Service before 1 January 2008 may be calculated differently.
  • Pregnancy, maternity, occupational illness, medical treatment periods and some long-service cases restrict termination; if any apply, the termination itself may be unlawful.
  • Compensation is separate from unpaid wages, unused annual leave pay and bonus already earned.

Programmatic Helper

python3 skills/cn-severance-calculator/scripts/cn_severance.py --start 2018-03-01 --end 2026-09-30 --avg-wage 25000 --scenario n
python3 skills/cn-severance-calculator/scripts/cn_severance.py --start 2018-03-01 --end 2026-09-30 --avg-wage 25000 \
    --scenario n_plus_1 --last-month-wage 26000 --local-avg 12000

The end date counts as a day worked. Standard library only.

Output Format

Economic compensation estimate: [Name]

1. Applicable scenario: [N / N+1 / 2N], based on [article], because [facts]. List any uncertain facts.

2. Calculation | Item | Amount | Explanation | | Service years | ... | Start and end dates; counting rules | | Monthly wage base | ... | 12-month average; whether capped | | N | ... | | | +1 / x2 | ... | | | Total | ... | |

3. Check before signing

  • Unpaid wages, unused annual-leave pay, earned bonuses, and social-insurance and housing-fund contributions
  • Whether the agreement contains a waiver of other rights

4. Where to confirm: The local labour and personnel dispute arbitration commission, or a labour lawyer

End verbatim: "This is an estimate, not legal advice. Local rules and judicial practice vary. Before signing any agreement, confirm the result with your local labour arbitration body or a labour lawyer."

Quality Checks

  • [ ] The scenario is tied to an article and to the facts given
  • [ ] Years counted follow the six-month rule, and the end date counts as worked
  • [ ] The cap is checked when the city's average wage is known, and flagged when it is not
  • [ ] Other amounts owed are listed separately from compensation
  • [ ] The disclaimer appears verbatim

Anti-Patterns

  • Assuming N+1 by default. The +1 applies to one specific case.
  • Using base salary only when bonuses and allowances form part of the wage.
  • Skipping the protected-period check. It can turn N into 2N.
  • Advising the person to sign. Calculate, list what to check, and point to confirmation.

Example Trigger Phrases

  • "My company is laying me off after six and a half years, with a monthly wage of CNY 30,000. How much compensation might I receive?"
  • "How exactly is N+1 calculated?"
  • "My company dismissed me without advance notice. Is that unlawful termination?"
  • "How much severance am I owed in Shanghai?"

License and attribution

MIT License

Copyright (c) 2026 Mohit Aggarwal

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Fixed sources