Examples¶
Worked take-home calculations across the 2025/26 UK tax bands, including the £100,000 allowance taper edge cases. All figures are annual, in GBP (£), and computed with this crate.
Basic-rate salary¶
A £40,000 salary sits entirely inside the 20% band. Personal Allowance is untouched (well below the £100k taper), so taxable income is £27,430.
use uk_paye::{income_tax, national_insurance, take_home};
let gross = 40_000.0;
// Income tax: 20% of (40,000 - 12,570) = £5,486.00
assert!((income_tax(gross) - 5_486.00).abs() < 1e-6);
// NI: 8% of (40,000 - 12,570) = £2,194.40
assert!((national_insurance(gross) - 2_194.40).abs() < 1e-6);
let (net, tax, ni) = take_home(gross);
// net = 40,000 - 5,486.00 - 2,194.40 = £32,319.60
| £ | |
|---|---|
| Gross | 40,000.00 |
| Income tax | 5,486.00 |
| National Insurance | 2,194.40 |
| Take-home | 32,319.60 |
At the higher-rate boundary¶
£50,000 is below the £50,270 higher-rate line, so income tax is still all 20%. NI is also still entirely in the 8% main band.
use uk_paye::take_home;
let (net, tax, ni) = take_home(50_000.0);
// net ≈ 39,519.60 tax ≈ 7,486.00 ni ≈ 2,994.40
| £ | |
|---|---|
| Gross | 50,000.00 |
| Income tax | 7,486.00 |
| National Insurance | 2,994.40 |
| Take-home | 39,519.60 |
Just above the UEL (40% + 2% NI)¶
At £60,000 income tax crosses into the 40% band, and employee NI drops to 2% on the slice above £50,270.
use uk_paye::{income_tax, national_insurance, take_home};
let gross = 60_000.0;
// Allowance still full (£12,570); taxable £47,430.
// 20% on £37,700 + 40% on £9,730 = 7,540.00 + 3,892.00 = £11,432.00
assert!((income_tax(gross) - 11_432.00).abs() < 1e-6);
// NI: 8% on (50,270 - 12,570) + 2% on (60,000 - 50,270)
assert!((national_insurance(gross) - 3_210.60).abs() < 1e-6);
let (net, _, _) = take_home(gross);
// net ≈ 60,000 - 11,432.00 - 3,210.60 = £45,357.40
The £100k taper (60% marginal rate)¶
This is the case a naive calculator gets wrong. Between £100,000 and £125,140 the Personal Allowance is withdrawn at £1 per £2 earned. Each £2 of extra salary is taxed at 40% and drags £1 of income from 0% into the 40% band — a 60% effective marginal rate on income tax alone.
use uk_paye::personal_allowance;
// £100,000: full allowance, taper just starting.
assert!((personal_allowance(100_000.0) - 12_570.0).abs() < 1e-6);
// £110,000: allowance reduced by (110,000 - 100,000) / 2 = £5,000 -> £7,570.
assert!((personal_allowance(110_000.0) - 7_570.0).abs() < 1e-6);
// £125,140: allowance tapered to exactly zero.
assert!(personal_allowance(125_140.0).abs() < 1e-6);
A useful way to see the trap: compare the marginal cost of earning an extra £1,000 just below versus just inside the taper.
use uk_paye::take_home;
let before = take_home(99_000.0).0;
let after = take_home(100_000.0).0;
// Just below the taper: ~£580 net of an extra £1,000 gross.
let before = take_home(110_000.0).0;
let after = take_home(111_000.0).0;
// Inside the taper: only ~£400 net of an extra £1,000 gross
// (60% effective income-tax rate + 2% NI).
Additional rate¶
Above £125,140 the allowance is already zero and the 45% additional rate applies to everything above that line. The taper is over, so marginal rates drop back to a flat 45% + 2% NI.
use uk_paye::{income_tax, take_home};
// £150,000: £0 allowance.
// 20% of 37,700 + 40% of 74,870 + 45% of 24,860 = £54,331.50
assert!((income_tax(150_000.0) - 54_331.50).abs() < 1e-6);
let (net, _, _) = take_home(150_000.0);
// net ≈ 150,000 - 54,331.50 - 5,010.60 = £90,657.90
| Gross | Personal Allowance | Income tax | NI | Take-home |
|---|---|---|---|---|
| 12,570 | 12,570.00 | 0.00 | 0.00 | 12,570.00 |
| 30,000 | 12,570.00 | 3,486.00 | 1,394.40 | 25,119.60 |
| 40,000 | 12,570.00 | 5,486.00 | 2,194.40 | 32,319.60 |
| 50,000 | 12,570.00 | 7,486.00 | 2,994.40 | 39,519.60 |
| 60,000 | 12,570.00 | 11,432.00 | 3,210.60 | 45,357.40 |
| 80,000 | 12,570.00 | 19,432.00 | 3,610.60 | 56,957.40 |
| 100,000 | 12,570.00 | 27,432.00 | 4,010.60 | 68,557.40 |
| 110,000 | 7,570.00 | 33,432.00 | 4,210.60 | 72,357.40 |
| 125,140 | 0.00 | 43,144.50 | 4,513.40 | 77,482.10 |
| 150,000 | 0.00 | 54,331.50 | 5,010.60 | 90,657.90 |
| 200,000 | 0.00 | 76,831.50 | 6,010.60 | 117,157.90 |
Note the jump between £100,000 and £110,000: taxable income rises by £16,000 (the £10,000 raise plus the £5,000–£6,000 of lost allowance across the band), which is the taper at work.
Loop over a salary scale¶
A common need is take-home across a salary ladder — e.g. for a pay-rise visualisation.
use uk_paye::take_home;
let scale: Vec<f64> = (0..=10).map(|i| (i as f64) * 20_000.0).collect();
for gross in scale {
let (net, tax, ni) = take_home(gross);
println!("{gross:>9.0} net {net:>10.2} tax {tax:>9.2} ni {ni:>8.2}");
}
These are the same figures the UKMoneyCalc take-home calculator renders interactively.