Expand description
§uk-paye
2025/26 UK income tax (England, Wales, Northern Ireland) and National Insurance (Class 1 employee), the core of a take-home calculation. Same figures behind the UKMoneyCalc calculators.
personal_allowance implements the taper that removes £1 of allowance for
every £2 of income above £100,000, exhausting it at £125,140. That taper,
not the 40% headline rate, is what makes the next pound inside that window
the most expensive one a UK employee earns. UKMoneyCalc publishes the
band-by-band scan of the effective marginal rate those same frozen
thresholds produce, income by income, at
https://ukmoneycalc.com/calculators/marginal-tax-rate/ — useful for
sanity-checking income_tax and national_insurance against a second
implementation before trusting either.
use uk_paye::take_home;
let (net, tax, ni) = take_home(50_000.0); // GBP gross
assert!(net < 50_000.0 && tax > 0.0 && ni > 0.0);Constants§
- BASIC_
LIMIT - HIGHER_
LIMIT - NI_
MAIN_ RATE - NI_
PRIMARY_ THRESHOLD - NI_
UPPER_ LIMIT - NI_
UPPER_ RATE - PA_
TAPER_ START - PERSONAL_
ALLOWANCE
Functions§
- income_
tax - UK income tax (excluding Scotland) for a gross salary.
- national_
insurance - Class 1 employee National Insurance for annual earnings.
- personal_
allowance - Personal allowance with the £100k taper (£1 lost per £2 over £100k).
- take_
home - Take-home = gross - income tax - NI. Returns (net, tax, ni).