Every score traces back to a statute, a rule and a question.

This page explains what LaborCalc-TW measures, where its rules come from, how questions are generated, how answers are scored, and what the result cannot tell you.

What is measured

Only calculations with a single correct answer; no legal judgement.

Each calculation lists the cases it includes and the cases it leaves out, with the reason. A case is left out when the statute does not fix the arithmetic, or when the answer depends on facts a question does not give.

Overtime pay covers a monthly-salaried worker on standard hours, one day at a time, in whole hours. It leaves out hourly and daily wages, flexible working-hour schemes, exempt staff, and work caused by disasters or emergencies. Annual leave covers the statutory days under the anniversary method. It leaves out calendar-year proration, pay in lieu of unused leave, and breaks in service.

Annual leave days v0.1.3

3 inclusion conditions and 5 documented exclusions, each with its reason. The full list is kept in Chinese with the rule and is shown on the Chinese version of this page.

Overtime pay v0.2.2

6 inclusion conditions and 10 documented exclusions, each with its reason. The full list is kept in Chinese with the rule and is shown on the Chinese version of this page.

Rules and sign-off

Each rule is implemented in Python and in JavaScript. Both must give the same answer on every reference case. Reference cases come from examples published by the authority, from checks against the official calculators, or directly from the statute.

A rule needs a human sign-off before it is used. The sign-off is bound to the hashes of four files: the specification, the rule code, the question templates and the sampler. A change to any of them voids it.

Annual leave days v0.1.3

  • 已滿月數(民法 §121)m = \max\{\, k \ge 0 : E(H, k) \le Q \,\}
  • 特別休假日數(§38 第 1 項)D = \begin{cases} 0 & m < 6 \\ 3 & 6 \le m < 12 \\ 7 & y = 1 \\ 10 & y = 2 \\ 14 & 3 \le y < 5 \\ 15 & 5 \le y < 10 \\ \min(15 + (y - 9),\ 30) & y \ge 10 \end{cases},\quad y = \lfloor m / 12 \rfloor

Sign-off: Calvin Ku, 2026-11-10, approved. 19 reference cases. spec a0205489f0e0rule ed6d1012e68ctemplates 073e2530e76esampler 41f1acde2b6a

Overtime pay v0.2.2

  • 平日每小時工資額
    wh=Wm30×8=Wm240
  • 平日延長工時(0 ≤ h ≤ 4)
    P=wh(43min(h,2)+53max(h−2,0))
  • 休息日出勤(0 ≤ h ≤ 12)
    P=wh(43min(h,2)+53min(max(h−2,0),6)+83max(h−8,0))
  • 國定假日出勤
    P=Wm30[h>0]+wh(43min(max(h−8,0),2)+53max(h−10,0))
  • 最終金額(無條件進位到元)
    P∗=⌈P⌉
  • 整數實作(避免浮點誤差;JS 與 Python 皆以此驗算)
    P=Wm(4h1+5h2+8h3+24b)720,P∗=⌊720P+719720⌋,h3=休息日第 9 小時起,b=[國定假日且 h>0]

Sign-off: Calvin Ku, 2026-11-10, approved. 16 reference cases. spec 632c7b7fc0ferule e8862905b1dftemplates 471ec16e1727sampler a83134ac02f6

Questions

Questions are generated by code: a branch is chosen by quota, parameters are sampled, a template is filled in, and the correct answer is computed by the rule. Branches cover each pay rate, each leave tier, and boundaries such as the day before and the day of a threshold.

Each calculation includes a few control questions whose correct answer is 0: no overtime worked, or less than six months of service. Control questions do not count towards accuracy.

Annual leave days v0.1.3

Public set: 200 questions, generator v0.5.0, as of 2026-10-09, sha256 4eee1965da1c.

BranchShareCovers
S05.0%未滿六個月,應答 0(對照題,不進 accuracy) (control)
S110.0%三日
S210.0%七日
S310.0%十日
S410.0%十四日
S510.0%十五日
S610.0%十年以上每年加一日(16–29 日)
S75.0%封頂三十日
B112.5%查詢日 = 滿期相當日當天(新階梯)
B212.5%查詢日 = 相當日前一日(舊階梯)
B35.0%到職日 29/30/31,滿期之月無相當日(民法 §121 但書);查詢日為該月末日或翌日

Overtime pay v0.2.2

Public set: 200 questions, generator v0.5.0, as of 2026-10-08, sha256 f9b56f556727.

BranchShareCovers
W05.0%對照題(無加班,應答 0);control 分支不進 accuracy,另報 control_pass (control)
W115.0%僅 4/3 段
W215.0%4/3 + 5/3 兩段
R115.0%僅 4/3 段
R215.0%4/3 + 5/3,未逾 8 小時
R310.0%第 9 小時起 ×8/3(MOL-RESTDAY-9H)
H110.0%僅加發一日工資,與時數無關
H27.5%一日工資 + 4/3 段
H37.5%一日工資 + 4/3 + 5/3

Scoring

Reading the answer

If the reply contains an integer after the marker 「答案:」, the last such integer is used. Otherwise the last integer in the reply is used.

Matching

The integer must equal the correct answer. There is no partial credit.

Fixed denominator

The denominator is the size of the question set. Missing questions are neither scored as zero nor reweighted. A configuration that has not finished a calculation gets no overall score.

Evaluated configuration

A configuration is a model together with its quantization, where it ran, and its answer mode. Results from different configurations are never merged.

Limitations

A score says how often a model answered these two calculations correctly. It is not legal advice, and it does not describe performance on other labor-law questions, other laws, or real cases.

A correct answer means the number matched, not that the reasoning was sound. A wrong answer may be a formatting failure. Questions come from a finite set of templates, and other phrasings may give different results.

The public question set may end up in the training data of later models. After a statute is amended, earlier versions of the questions and scores apply only to the text in force at the time.

Data and reproduction

Every figure on this site is read at build time from one evaluation artifact, never typed in by hand. The code, the questions and each model's answer logs will be made public with the first release.

Data on this site: release 2026Q4 (release), source commit 615ba52b5a3d, manifest sha256 f6f73f3a0947.

Content updated