Skip to main content

Crate uk_paye

Crate uk_paye 

Source
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).