FA-59187 / Payroll withholding rules / Member archive
Cumulative wages withholding method: tax to date proration · case 02
Withholding collapses to a single period's share of tax despite prior withholding being subtracted.
Case contract
Input {ytd_wages, ytd_wh, wage, period_index k (1-based, includes this period), periods}. Annualized = (ytd_wages + wage)*periods/k exactly. Annual tax: 0% to 10,000.00, 12% to 40,000.00, 24% above. Tax to date = annual tax * k/periods. Withholding = max(0, tax_to_date - ytd_wh) rounded half-up at the end.
Why this case matters
The cumulative method spreads irregular pay across elapsed periods and trues up against prior withholding.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression 0 | 0 | 1684840 | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗