Functional Weave
Code in Python

payroll.minimum-wage-check@1.0.1

README.md

4,109 bytes · view raw

# payroll.minimum-wage-check

Whether the pay for one pay reference period meets the National Minimum Wage
or National Living Wage, and by how much it falls short if not.

**Everything is fixed at the start of the pay reference period.** GOV.UK's
guidance: "When the minimum wage rates change, the increase applies to the
first pay reference period starting on or after the date of any change ... The
same approach applies when a worker reaches a birthday that makes them
eligible for a higher minimum wage rate." So a monthly period starting 16 March
2026 uses the 2025 rates throughout, and a worker who turns 21 halfway through
a period stays on the 18-20 rate until the next one. Using the pay date, or the
age on the pay date, is the common mistake.

**Apprentice rate** (NMW Regulations 2015 reg 5): applies to an apprentice who
is under 19, or who is in the first 12 months of the apprenticeship. Pass
`apprenticeshipStart` for apprentices, null otherwise. When the apprentice rate
applies, the age rates do not (reg 4A(2)).

**Required pay** is `rate x minutes / 60` rounded **up** to the penny: pay in
whole pence meets the exact requirement only if it reaches that figure.

Age bands: 2023-24 had the National Living Wage from 23 and a separate 21-22
rate; from 1 April 2024 the National Living Wage starts at 21. A worker under 16
(below school leaving age in this simplification) is an error; the precise
school-leaving date differs across the UK and is the caller's to apply.

Not covered: what counts as pay or working time (salaried hours, sleep-ins,
the accommodation offset, deductions that reduce pay for minimum wage
purposes). Callers supply both numbers already adjusted.

Rates (per hour, from 1 April):

| Year | NLW | 21-22 | 18-20 | Under 18 | Apprentice |
|---|---|---|---|---|---|
| 2023 | £10.42 (23+) | £10.18 | £7.49 | £5.28 | £5.28 |
| 2024 | £11.44 (21+) | - | £8.60 | £6.40 | £6.40 |
| 2025 | £12.21 | - | £10.00 | £7.55 | £7.55 |
| 2026 | £12.71 | - | £10.85 | £8.00 | £8.00 |

Sources:
- GOV.UK, "National Minimum Wage and National Living Wage rates",
  https://www.gov.uk/national-minimum-wage-rates (current and previous rates)
- GOV.UK, "Calculating the minimum wage: pay counted during a pay reference period",
  https://www.gov.uk/guidance/calculating-the-minimum-wage/calculating-the-minimum-wage
- The National Minimum Wage Regulations 2015 (SI 2015/621) regs 4, 4A, 5, 6,
  https://www.legislation.gov.uk/uksi/2015/621
- The National Minimum Wage (Amendment) Regulations 2026 (SI 2026/357),
  https://www.legislation.gov.uk/uksi/2026/357/made
- GOV.UK, "Rates and thresholds for employers" 2023-24 to 2026-27,
  https://www.gov.uk/guidance/rates-and-thresholds-for-employers-2026-to-2027

## Before you rely on this

**Not professional advice.** This capability calculates payroll figures from published rules. It is a software component for developers, not tax or legal advice. Rules change and every rate here has an effective date. Check that the dates cover your case. Verify results against the official sources listed above, and have a payroll specialist review how you use it, before anyone relies on the output. Provided "as is" under its licence, without warranty.

**Unreviewed.** This capability's implementations agree in every language and pass its published test vectors, which were worked out from the official sources cited. But no qualified payroll specialist has yet checked those vectors, or confirmed that the capability covers the cases it claims. Treat it as a draft. Do not use it for real people, money or decisions without your own expert review. Once a qualified reviewer signs off, this notice is replaced with their name, qualification and the date. Each new version needs fresh sign-off.

## Notices

Contains public sector information licensed under the Open Government
Licence v3.0 (https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/).

Legislation: Crown copyright and database right.

1.0.1 marks it unreviewed and adds its attribution notices (NOTICE). The code and the tests are unchanged.