calculate_payroll
計算台灣勞健保勞退
計算台灣某月薪資的勞保(含就保)、健保、勞退、職災各方(員工/雇主/政府)負擔。支援不同身份別、眷屬、自提、部分工時。結果僅供參考,以勞保局、健保署核發之繳款單為準,不構成法律或會計建議。
yearidentitypartTimeroundingdependentsmonthlySalaryrequiredoccupationalRateemploymentInsurancepensionSelfContribution
io.github.supra126Published by GitHub account supra126v1.4.0Updated Oct 27, 2026
台灣勞保、健保、勞退、職災與二代健保補充保費試算,含薪資扣繳、破月與勞保老年給付。資料取自主管機關公告,對官方範例逐位元驗證。
Calculates Taiwan labor insurance, health insurance, pension, occupational injury and supplementary premiums, plus withholding and old-age benefits, for an AI…
Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.
Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.
Read https://sourceweft.com/mcp/io.github.supra126%2Ftaiwan-payroll/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.Add this to your client's mcpServers config.
{
"mcpServers": {
"io-github-supra126-taiwan-payroll-zf2h": {
"type": "http",
"url": "https://taiwan-payroll.simoko.workers.dev/mcp"
}
}
}[npm] [PyPI] [License: MIT] [Smithery]
開源的台灣勞健保勞退法定費用計算引擎。輸入薪資與身份,算出勞保(含就保)、健保、勞退、職災與二代健保補充保費的各方負擔——並涵蓋薪資所得扣繳、月中到職/離職破月、健保補充保費申報媒體檔,以及勞保老年給付試算。
[在 AI 助理中以自然語言詢問薪資,taiwan-payroll MCP server 呼叫 calculate_payroll 即時算出員工自付 4,872、雇主負擔 8,315]
示意:在支援 MCP 的 AI 助理(Claude / Cursor 等)中呼叫 taiwan-payroll
[月薪 42,000 第一類計算結果:員工負擔 4,872、雇主負擔 8,315、政府補助 864(新台幣/月,民國115年度)]
data/、跑同一套 testdata/,結果逐位元相同定位是「計算引擎」而非「法遵保證」。 內建民國 113–115(2024–2026)年度官方參數。
健保破月採「月底歸屬原則」:以月底所屬投保單位計收整月——到職當月計整月、離職當月不計。此為健保署實務規則(非按日、與 15 日分水嶺無關)。
由申報資料產生健保署「補充保險費明細申報檔」(CSV/Big5),涵蓋 6 類所得:獎金(62)、兼職薪資(63)、執行業務(65)、股利(66)、利息(67)、租金(68)。每個產生器皆以健保署官方範例逐位元驗證,TS 與 Python 結果一致。
generateSupplementaryDividendFiling)因含股票股利/雇主扣除等情形,逐列保費由呼叫端提供(另附便利函式 calcDividendPremium)。to_big5_bytes()(core 維持零依賴)。/docs/api。依勞保局官方公式試算三種老年給付(皆對官方數值/公式驗證、TS≡Python):
平均×年資×0.775%+3000 vs ×1.55%),提前/延後 claimOffsetMonths(±4%/年、上限 ±5 年(±20%));附 averageHighestInsuredSalary、statutoryClaimAge。data/{year}.json — 單一事實來源,年度法規參數(級距表、費率),以 JSON Schema 驗證。testdata/ — 語言無關的黃金測試向量(官方案例,含 source 出處),是跨語言行為一致性的根基。packages/core — 零執行期依賴的 TypeScript 引擎。pip install taiwan-payroll,純 stdlib、API 對應 TS 版(PyPI)。https://taiwan-payroll.simoko.workers.dev/mcp(Streamable HTTP),或本地 npx taiwan-payroll-mcp(stdio,npm)。
[taiwan-payroll MCP server — Glama 品質評分]
費率:勞保 12.5%(含就保 1%)、健保 5.17%、勞退雇主 6%、職災平均 0.21%、二代健保補充保費 2.11%。
目前內建民國 113/114/115(2024/2025/2026) 三個年度,各年度的分級表與文號見 data/{year}.json 的 sources;以 createPayrollEngine({ year }) 指定,可用年度由 getAvailableYears() 取得。
本套件依公開法規與主管機關公告實作,計算結果僅供參考,實際應繳金額以勞保局、健保署核發之繳款單為準。本套件不構成法律或會計建議。
MIT
Source: README.md at commit 81bf20d
計算台灣勞健保勞退
計算台灣某月薪資的勞保(含就保)、健保、勞退、職災各方(員工/雇主/政府)負擔。支援不同身份別、眷屬、自提、部分工時。結果僅供參考,以勞保局、健保署核發之繳款單為準,不構成法律或會計建議。
yearidentitypartTimeroundingdependentsmonthlySalaryrequiredoccupationalRateemploymentInsurancepensionSelfContribution二代健保補充保費
計算二代健保補充保費(費率 2.11%)。bonus 課徵年度累計超過當月投保額 4 倍部分;其餘五類單次達門檻全額課(單次上限 1,000 萬)。結果僅供參考,以勞保局、健保署核發之繳款單為準,不構成法律或會計建議。
typerequiredyearamountrequiredroundingytdBonusmonthlyInsuredSalary投保單位(雇主)補充保費
計算雇主端二代健保補充保費(費率 2.11%):(每月支付薪資總額 − 受僱者當月健保投保金額總額) × 費率,無上限。結果僅供參考,以勞保局、健保署核發之繳款單為準,不構成法律或會計建議。
yearroundingmonthlyPaidTotalrequiredmonthlyInsuredTotalrequired薪資所得扣繳稅額
計算薪資所得扣繳稅額:居住者固定月薪(公式法)、非每月給付獎金(5%,未達起扣標準免扣)、非居住者(18%;月薪≤1.5倍基本工資為6%)。結果僅供參考,以勞保局、健保署核發之繳款單為準,不構成法律或會計建議。
typerequiredyearamountdependentsmonthlySalary計算勞保老年年金(月領)
依勞保老年年金法定公式(擇優兩式、提前/延後增減給每年 ±4%,上限 ±5 年(±20%))試算月領金額;年資未滿 15 年不符年金請領資格。結果僅供參考,以勞保局、健保署核發之繳款單為準,不構成法律或會計建議。
yearyearsrequiredmonthsavgInsuredSalaryrequiredclaimOffsetMonths計算勞保老年一次金
依勞保老年一次金法定公式(平均月投保薪資 × 給付月數;年資每滿 1 年給 1 個月、逾 60 歲後之年資最多計入 5 年)試算給付金額。結果僅供參考,以勞保局、健保署核發之繳款單為準,不構成法律或會計建議。
yearyearsrequiredmonthspostSixtyMonthsavgInsuredSalaryrequired計算勞保一次請領老年給付
依勞保一次請領老年給付法定公式(基數制:前 15 年每年 1 個基數、第 16 年起每年 2 個基數、60 歲前最高 45 個基數、逾 60 歲後年資每年 2 個基數最多計 5 年、合併最高 50 個基數)試算給付金額。適用 98 年前已有保險年資者。結果僅供參考,以勞保局、健保署核發之繳款單為準,不構成法律或會計建議。
yearpreSixtyYearsrequiredpostSixtyYearspreSixtyMonthspostSixtyMonthsavgInsuredSalaryrequired月中到職/離職破月計算
計算月中到職或離職當月的破月保費。勞保/職保/勞退按日(30 日基準);健保採官方「月底歸屬」——到職當月計整月、離職當月不計。結果僅供參考,以勞保局、健保署核發之繳款單為準,不構成法律或會計建議。
yearendDateidentitypartTimeroundingstartDatedependentsmonthlySalaryrequiredoccupationalRateemploymentInsurancepensionSelfContribution列出可用年度
列出目前支援的年度、資料版本與基本工資(月薪/時薪)。計算前可先用本工具確認有效的 year 值。
Takes no parameters.
100% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
npm install taiwan-payroll # TypeScript / Nodepip install taiwan-payroll # Pythonimport { createPayrollEngine } from 'taiwan-payroll';
const engine = createPayrollEngine({ year: 2026 });const r = engine.calculate({ monthlySalary: 42000, identity: 'category1', dependents: 1, employmentInsurance: true, pensionSelfContribution: 0.06,});
console.log(r.employee); // { labor: 1050, health: 1302, pensionSelf: 2520, total: 4872 }console.log(r.employer.occupational); // 職災雇主負擔// 補充保費(六類所得:bonus/parttime/professional/dividend/interest/rent)engine.calculateSupplementary({ type: 'bonus', amount: 200000, monthlyInsuredSalary: 42000 });// → { type: 'bonus', chargeable: 32000, rate: '0.0211', premium: 675 }
// 月中到職/離職(勞保/職保/勞退按日;健保採官方「月底歸屬」原則)engine.calculateProrated({ monthlySalary: 29500, startDate: '2026-03-08' });// → { ..., days: { insured: 23 }, healthCharged: true }import { generateSupplementaryBonusFiling } from 'taiwan-payroll';
const { filename, content } = generateSupplementaryBonusFiling({ year: 2026, filingDate: '20260901', // 用於檔名 unit: { taxId: '11111111', name: '甲公司', phone: '0227065866', email: '[email protected]', contactName: '王小明' }, records: [ { action: 'I', payDate: '20260615', payeeId: 'A123456789', payeeName: '李四', bonusAmount: 50000, insuredSalary: 31800, ytdBonusCumulative: 150000, unitCode: '123456789' }, ],});// filename: 'DPR111111111150901001.csv'// content : Unicode 字串;檔案實際為 Big5,存檔時請以 Big5 編碼寫出。import { calcOldAgePension, calcOldAgeLumpSum, calcOldAgeSinglePayment, getYearData } from 'taiwan-payroll';const d = getYearData(2026);calcOldAgePension(d, { avgInsuredSalary: 32000, years: 35, months: 6 }); // 月領年金(擇優兩式,可提前/延後)calcOldAgeLumpSum(d, { avgInsuredSalary: 30000, years: 10 }); // 老年一次金calcOldAgeSinglePayment(d, { avgInsuredSalary: 30000, preSixtyYears: 20 }); // 一次請領(舊制基數)pnpm installpnpm validate:data # 驗證 data schema、級距連續性、向量格式pnpm -r test # 跑全部黃金測試向量pnpm typecheck