快速上手
TypeScript(npm)與 Python(PyPI)為同一套引擎的鏡像,API 對應、計算結果逐位元一致。擇一語言即可。
TypeScript · npm
npm install taiwan-payrollimport { createPayrollEngine } from 'taiwan-payroll';
const engine = createPayrollEngine({ year: 2026 });
engine.calculate({ monthlySalary: 42000, dependents: 1, pensionSelfContribution: 0.06 });
engine.calculateSupplementary({ type: 'bonus', amount: 200000, monthlyInsuredSalary: 42000 });
engine.calculateWithholding({ type: 'resident', monthlySalary: 100000, dependents: 2 });
engine.calculateOldAgePension({ avgInsuredSalary: 32000, years: 35, months: 6 });
engine.calculateProrated({ monthlySalary: 29500, startDate: '2026-03-08' });Python · PyPI
pip install taiwan-payrollfrom taiwan_payroll import (
create_payroll_engine, CalculateInput, SupplementaryInput,
WithholdingInput, ProratedInput, OldAgePensionInput,
get_year_data, calc_old_age_pension,
)
engine = create_payroll_engine(year=2026)
engine.calculate(CalculateInput(monthly_salary=42000, dependents=1, pension_self_contribution=0.06))
engine.calculate_supplementary(SupplementaryInput(type="bonus", amount=200000, monthly_insured_salary=42000))
engine.calculate_withholding(WithholdingInput(type="resident", monthly_salary=100000, dependents=2))
engine.calculate_prorated(ProratedInput(monthly_salary=29500, start_date="2026-03-08"))
calc_old_age_pension(get_year_data(2026), OldAgePensionInput(avg_insured_salary=32000, years=35, months=6))涵蓋功能:勞健保勞退職災負擔、二代健保補充保費(含雇主端)、薪資所得稅扣繳、月中到職/離職破月、健保補充保費明細申報媒體檔產生(6 類所得,CSV/Big5)、勞保老年給付試算(年金月領/老年一次金/一次請領)。各函數的參數、預設值、範圍與回傳結構(TypeScript 與 Python 並列)見 API 參考。
MCP server
讓 Claude 等 AI 助理直接呼叫試算。兩種連線方式擇一,於 MCP client(如 Claude Desktop)設定加入:
遠端 · 免安裝
{
"mcpServers": {
"taiwan-payroll": {
"type": "streamable-http",
"url": "https://taiwan-payroll.simoko.workers.dev/mcp"
}
}
}公開無狀態端點,無需登入;計算純在 edge 執行,不蒐集輸入資料。
本地 · npx(stdio)
{
"mcpServers": {
"taiwan-payroll": { "command": "npx", "args": ["-y", "taiwan-payroll-mcp"] }
}
}資料來源與官方文號(民國115年/2026)
項目
主管機關
文號/依據
上限
勞保投保薪資分級表(11級)
機關勞動部勞保局
文號勞動保2字第1140091863號令
上限45,800
勞退月提繳分級表(62級)
機關勞動部勞保局
文號勞動福3字第1140153598號令
上限150,000
職災投保薪資分級表(21級)
機關勞動部勞保局
文號職災保險法§17
上限72,800
健保投保金額分級表(58級)
機關衛福部健保署
文號衛部保字第1140153424號令
上限313,000
亦內建民國 113(2024)、114(2025)年度;上方為最新年度(115/2026)。各年度完整分級表與發布文號見原始碼 data/{year}.json 的 sources,計算機右上可切換年度。
免責聲明
本套件依公開法規與主管機關公告實作,計算結果僅供參考,實際應繳金額以勞保局、健保署核發之繳款單為準。本套件不構成法律或會計建議。