ukmoneycalc 0.1.0
ukmoneycalc is a small D library for UK take-home-pay arithmetic on the 2025/26 England and Northern Ireland thresholds. It answers the one question a payslip poses: what is left of an annual gross salary after PAYE. Five public functions. personalAllowance applies the taper that withdraws the allowance as income rises above the taper threshold. incomeTax charges the basic, higher and additional bands on taxable income. nationalInsurance computes Class 1 employee contributions at the main rate up to the upper earnings limit and the reduced rate above it. studentLoan covers Plans 1, 2, 4, 5 and Postgraduate repayments. takeHome assembles a whole-year gross-to-net breakdown into a struct. Every function is @safe pure and carries an input contract rejecting negative income. The package has no dependencies beyond the standard library and no runtime configuration. The thresholds are declared as named constants at the top of the module, so they are readable and auditable rather than buried in the arithmetic. Six unittest blocks, MIT licensed.
| Tags | d dlang library tax payroll finance |
|---|---|
| License | MITL |
| State | initial |