SuperAPIAI Directory

taiwan-payroll

github.com · AI developer platforms

Taiwan statutory payroll calculations: labor and health insurance, labor pension, NHI supplementary premium, income-tax withholding and old-age benefits.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)

About this tool

taiwan-payroll is an open-source calculation engine for Taiwan's statutory labor insurance, national health insurance, and labor pension contributions, positioned as a "calculation engine" rather than a "compliance guarantee." Based on the input salary and identity, it calculates the shares borne by each party for labor insurance (including employment insurance), national health insurance, labor pension, occupational accident insurance, and the second-generation national health insurance supplementary premium, and also covers salary income withholding, mid-month onboarding/offboarding partial months, the national health insurance supplementary premium declaration media file, and labor insurance old-age benefit estimation.

In terms of main capabilities, the engine has built-in official parameters for ROC years 113 to 115 (2024 to 2026). The bracket tables and rates are taken level by level from announcements by the competent authority, and calculation results are verified bit by bit against official example golden vectors. TS and Python read the same data/ and run the same testdata/, with results being bit-for-bit identical. core carries no runtime packages, and the Python version is pure stdlib.

Three interfaces are provided for usage: TypeScript (npm), Python (PyPI, pip install taiwan-payroll), and an MCP server (for AI assistants to call). The MCP server provides a remote installation-free endpoint https://taiwan-payroll.simoko.workers.dev/mcp (Streamable HTTP), or local npx taiwan-payroll-mcp (stdio). There is also an online calculation webpage https://taiwan-payroll.vercel.app , installation-free, calculated directly in the browser. For API details, see the documentation site /docs/api.

Specific features include: national health insurance partial months adopt the "end-of-month attribution principle," charging the full month based on the insured unit to which the end of the month belongs—the month of onboarding is counted as a full month, and the month of offboarding is not counted; from declaration data, generate the National Health Insurance Administration's "Supplementary Premium Detailed Declaration File" (CSV/Big5), covering 6 categories of income: bonuses (62), part-time salary (63), professional practice (65), dividends (66), interest (67), rent (68). Each generator is verified bit by bit against official National Health Insurance Administration examples; because dividends include cases such as stock dividends/employer deductions, the premium for each row is provided by the caller (a convenience function calcDividendPremium is also provided); Big5 encoding is handled by the caller in TS, while Python provides to_big5_bytes(). Labor insurance old-age benefit estimation covers three types: old-age annuity (the better of two formulas, early/deferred claimOffsetMonths, ±4%/year, cap ±5 years), old-age lump sum (1 month for each full year of service, with a maximum of 5 years of service after age 60), and one-time payment (base system, 1 base per year for the first 15 years, 2 bases per year for the portion exceeding that, cap of 45 for the first 60, combined cap of 50, with the average taken from the 36 months before withdrawal from insurance).

Applicable scenarios include Taiwan salary calculation, labor insurance/national health insurance/labor pension contribution estimation, supplementary premium declaration file generation, and old-age benefit estimation, etc. In terms of limitations: the calculations are for reference only, and the actual result is subject to approval by the Bureau of Labor Insurance; this package does not constitute legal or accounting advice; the actual amount payable is subject to the payment slip issued by the Bureau of Labor Insurance and the National Health Insurance Administration. Currently, three years are built in: ROC 113/114/115. Available years can be obtained with getAvailableYears(), and specified with createPayrollEngine({ year }).

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools