← All articles

Using AI to build payroll software? Here is a deadline the official text appears to get wrong

In short
  • AI models are really good at payroll research. HMRC's January 2026 guidelines encourage using generative AI in tax software too.
  • A model is only as right as the page it reads. The consolidated text of a pension deadline on legislation.gov.uk says 19 days. The law as amended in 2012 says 22 if you pay electronically.
  • HMRC lists legislation as a reliable source. Here the official copy of the legislation appears to be the bit that is out of date.
  • What I do: use the top model for research, make it quote its sources, read the amendments, and keep a ledger of every decision.
On this page
  1. The example: 19 days or 22?
  2. What the government says about AI in this kind of software
  3. What I do about it
  4. Sources

So AI is really good at this. Give a good model a spec or a regulation and it reads it faster than I can, cross-references it and writes the code. I use it a lot for payroll work and I wouldn’t go back.

But payroll is somewhere a wrong number looks exactly like a right one. A deadline of the 19th and a deadline of the 22nd both pass the tests you wrote from them.

Uncle Ben in Spider-Man (2002), sitting in a car, saying: With great power comes great responsibility.
Uncle Ben, Spider-Man (2002).
22ndthe deadline if you pay electronically
19 daysall the consolidated page gives for the general rule
1 Jul 2012when the 22 days came into force
0"known outstanding effects", according to the banner on the page

The example: 19 days or 22?#

When an employer takes pension contributions out of someone’s pay, the money has to reach the scheme by the 22nd of the following month if it’s paid electronically, or the 19th if not. That’s what The Pensions Regulator says and what everybody does.

The rule lives in regulation 16(1) of SI 1996/1715. The consolidated (“revised”) page for it on legislation.gov.uk is where a person or a model would go to read it, and it only says 19 days.

PageWhat it gives for the general rule
Regulation 16, revised (opens in a new tab)19 days
SI 2012/215 regulation 40, as made (opens in a new tab). This is the amendment22 days electronic, 19 otherwise
SI 2010/772 regulation 48, revised (opens in a new tab). This holds the replacement text of regulation 1622 days electronic, 19 otherwise
The Pensions Regulator’s code (opens in a new tab)day 22 electronic, day 19 otherwise

Pick how the money was paid and the day it arrived.

Interactive: choose electronic payment or cheque and the day of the following month the contributions reach the scheme, and see the verdict under the consolidated regulation 16 page (19 days) and under the text as amended in 2012 (22 days electronic, 19 otherwise). An electronic payment arriving on the 20th, 21st or 22nd is late on the consolidated page’s wording and on time under the amended text (web version only).

My working

Why I think the page is out of date, and not the regulator:

  • The new regulation 16 was written in 2010 to start on 1 October 2012. Before it started, SI 2012/215 added the 22 days and SI 2012/1257 moved the start to 1 July 2012.
  • Paragraph (1) on the revised page is word for word the 2010 text, and its footnote still says “substituted (1.10.2012)”.
  • The 2013 instrument that changed the rest of the regulation has a footnote saying it was “amended by S.I. 2012/215”.

In git terms it’s a stale merge. The branch was changed before merge day and main got the old version. The site hasn’t confirmed this, so “appears to be out of date” is as far as I can go. The 22nd does show up lower down the page, in the special rule for new joiners. It’s the general rule that’s missing it. The matching personal pensions regulation (opens in a new tab) has the same gap.

Nobody paying by BACS on the 21st has done anything wrong. But a rules engine or an AI tool built from that page would flag them as late from the 20th.

What the government says about AI in this kind of software#

HMRC published guidelines for software developers using generative AI (opens in a new tab) on 28 January 2026. It’s written about tax software, and about AI features inside a product more than using AI to build one. I couldn’t find anything specific to payroll. It’s the closest there is though, and it starts off positive: HMRC “encourages innovative use of AI in tax software products”.

HMRC expectsWhat this example shows
“only use reliable source data”, from “official HMRC publications”, “legislation” and “established case law”Legislation is on the list. Here the official consolidated copy appears to be the stale bit
“continuous monitoring, version control and timely updating of the underlying code and all relevant data sources”You need to know which source each number came from and when you last checked it
“It should support, not replace, human judgment”The model can find the page. Somebody still has to check the page
Tell users about “hallucinations”, where the output “is factually incorrect or made up”This isn’t one. A model quoting the page perfectly would still be wrong

What I do about it#

DoWhy
Use the top model for researchCheaper models are fine for boilerplate. Reading legislation is the part where you want the best one you can get. The research for this post was done with one, and it caught the stale footnote date, which wasn’t in my first notes
Make it quote, with a linkA summary hides which version of the text it read
Read what changed the textOpen the instruments in the footnotes, then check whether those were amended before they started
Cross-check with the regulatorThe Pensions Regulator’s code said 22 the whole time
Keep a ledger of decisionsOne entry per figure or date, so you can see later why the code says what it says

A ledger entry doesn’t need to be clever. This is the one for this rule:

rule       pension contributions due date (general rule)
value      22nd of following month if electronic, else 19th
source     SI 2012/215 reg 40, as made
backed by  The Pensions Regulator, general code
not using  SI 1996/1715 reg 16, revised page (19 days only)
checked    23 Nov 2026
note       revised page appears to be missing the 2012 amendment

When the page gets fixed, or a rate changes, the ledger says which lines of code to look at.

Sources#

All checked on 23 November 2026.

My reading of the published texts as at 23 November 2026. Not legal advice. legislation.gov.uk hasn’t confirmed the page is out of date. The widget shows the general rule only.

Comments