• About Duane Jackson
  • Email Notifications
  • Four Thousand Days
  • Get In Touch
UKStartups
UKStartups

UKStartups

On Building Payroll Software

October 23, 2025 / Duane / 0 Comments

Long ago, I was the go-to guy for all things SaaS having been an early pioneer in both the technology and the business model. These days, there are thousands of people far more knowledgeable and experienced on that front than I could ever be.

For now, I seem to be the go-to guy for all things payroll software, thanks to the success of Staffology, which was the first real innovation in the space for quite some time.

Lately, I’ve been having a lot of conversations with teams who are either building or thinking about building payroll solutions. I figured it might be useful to share an overview of what’s involved in case it helps others going down the same path. This is by no means a complete guide, but will hopefully give both techies and less technical people an overview of whats involved.

There are three distinct parts to handling payroll in any country:

  1. Gross to Net
  2. Other Deductions
  3. Filing the results

Parts 1 and 3 are the easiest, so let’s get them out of the way before coming back to number 2.

Gross to Net

Here you take the amount an employee is being paid and calculate two key deductions — Tax and National Insurance. The NI equivalent goes by other names in different countries (social security, CPP), but it’s essentially the same thing.

This part isn’t particularly complicated. There are open-source “engines” on GitHub that handle it for the UK. They’ll work out how much tax to deduct based on the employee’s tax code, and how much NI based on their assigned NI letter.

HMRC provides a set of test scenarios each tax year so you can verify your calculations. If your software passes those, you can be reasonably confident your numbers are correct.

Filing the results

This is simply the process of reporting the above (and some of what we’ll cover below) to the relevant authority. In the UK, that’s HMRC, and the process is well-documented.

You’re essentially submitting XML to their gateway in what’s called an FPS — a Full Payment Submission.

To achieve “Recognised by HMRC” status (don’t you dare call it certified), you’ll need to send HMRC your XML output for review. Once that’s approved, you can be fairly sure you’ve got this part right.

From a distance, it’s easy to assume that the two parts above cover most of what’s involved in payroll.
You’d be wrong.

Other Deductions

This is where the real work begins.

In most cases, there are countless other deductions and calculations to handle – and you won’t always know which ones are needed in advance. That means you can’t really build a simple MVP as you’ll need to support all scenarios right from the start.

The list below is specific to the UK, but every country will have its own version of this complexity.

Statutory Pay
Whether it’s for maternity leave, sickness, or one of the other handful of statutory payment types, there are detailed rules governing how to calculate eligibility and the amount payable.

Attachment Orders
There are roughly twenty different types of court orders that can be applied to an employee’s pay – covering everything from child maintenance to unpaid council tax. Each type comes with its own rules about how much to deduct, when to deduct it, and what to do if the employee doesn’t have enough pay.

Pensions
There are multiple pension types, and life gets a lot easier if you steer clear of schemes like the Teachers’ or NHS pensions. Beyond the deductions themselves, you’ll likely need to implement Auto Enrolment assessments to determine whether an employer must legally enrol an employee. The rules around this are extensive and require a deep understanding to implement properly.

Accrued Holiday
You’ll need to track how much leave an employee has earned — whether that’s measured in days or in holiday pay — and support the different calculation methods employers might use.

Minimum Wage
You’ll have to build features to help employers ensure they are staying on the right side of the rules governing minimum wage.

And more…
And that’s still not everything. You’ll also encounter Termination Pay, Payrolled Benefits, and plenty of other edge cases that pop up once you get into the details. To make all of this work, you’ll need to build in Working Patterns — a way to track which days and hours each employee normally works as well as other supporting models. I’m sure there’s loads I’ve forgotten (or supressed the memories of!).

In closing

This is all before you get into the fact that underlying data such as tax rates and statutory pay amounts change every year – and sometimes mid-year.

And if you have ambitions to build a system that can support multiple countries then you really need to bake this in to your code from day one – retrofitting it really osn’t an option.

Payroll looks simple from the outside: take pay, calculate tax, send a file. But under the surface, it’s a maze of rules, exceptions, and ever-changing legislation.

If you’re thinking about building a payroll product, don’t underestimate the scale of the “other deductions” problem. It’s where the true complexity lives — and why there are far fewer payroll platforms than there are CRMs or HR platforms.

About Duane Jackson

From childrens' homes to prison to business. Founded one of the first B2B SaaS companies, which he sold at the end of 2013. Read more here.
On Amazon:   Four Thousand Days - My Journey from Prison to Business Success

Categories: Uncategorized

Your API Docs are a marketing asset » « Entering the US as a UK Citizen With a Criminal Record

Recent Posts

  • Announcing Sodium Public Beta
  • Developers and AI
  • Your API Docs are a marketing asset
  • On Building Payroll Software
  • Entering the US as a UK Citizen With a Criminal Record

Recent Comments

  • Mark Lee on LTNS!
  • Neil Sleightholm on How To Control LightwaveRF Devices from Fibaro HC2
  • Mark Lee on Partnering with SaaS Companies
  • Leigh Foley on How To Control LightwaveRF Devices from Fibaro HC2
  • Martin Baker on VATMOSS and Stripe

Search

Get Notified

Copyright © 2026 UKStartups

Theme by Anders Noren — Up ↑