Functional Weave
Code in Python

payroll.student-loan@1.0.2

README.md

3,747 bytes · view raw

# payroll.student-loan

The student loan or postgraduate loan deduction an employer takes from one
period's pay: 9% (plans 1, 2, 4 and 5) or 6% (postgraduate loan) of the
earnings above the period's share of the plan's annual threshold, with the
pence dropped. Tax years 2023-24 to 2026-27 are carried as dated data.

## Decisions

- **Earnings are NI-able pay**, the figure employer Class 1 NICs are worked out
  on, not taxable pay: pension contributions under a net pay arrangement do not
  reduce it.
- **The period threshold is exact.** Regulation 44(2) of the Education
  (Student Loans) (Repayment) Regulations 2009 scales the annual threshold by
  weeks/52 or months/12 of the earnings period. HMRC's printed weekly and
  monthly figures (£517.30, £2,241.66 for plan 1 in 2026-27) are that fraction
  cut to the penny, and on rare pay amounts the difference moves the deduction
  by a pound; a vector pins the case. Fortnightly is 2/52 and four-weekly 4/52
  of the annual threshold.
- **Pence are ignored** (reg. 44(3)): the deduction is always whole pounds,
  rounded down. HMRC's own worked example (£700 a week repays £16, £2,800 a
  month repays £50, plan 1, 2026-27) is a vector.
- **One plan per call.** An employee repaying a postgraduate loan and a plan 1,
  2, 4 or 5 loan has both deducted, concurrently (reg. 44(2A)): call twice.
  With two undergraduate plans and no SL1 yet, HMRC says to use the plan with
  the lowest threshold; picking that is the caller's job.
- **Plan 5** repayments start in 2026-27 (threshold £25,000); asking for plan 5
  before 6 April 2026 is an error.
- The deduction is never negative. Refunds, under- and over-deduction recovery
  and the court-order ordering rules are out of scope.

## Sources

- The Education (Student Loans) (Repayment) Regulations 2009, reg. 44:
  https://www.legislation.gov.uk/uksi/2009/470/regulation/44
- HMRC, "Special rules for student loans" (thresholds from April 2026, plan 5,
  the £700 / £2,800 worked example):
  https://www.gov.uk/guidance/special-rules-for-student-loans
- HMRC, "Rates and thresholds for employers" 2023 to 2024, 2024 to 2025, 2025
  to 2026 and 2026 to 2027 (annual thresholds and the 9% / 6% rates):
  https://www.gov.uk/guidance/rates-and-thresholds-for-employers-2026-to-2027

1.0.1 fixes Python accepting a trailing newline or non-ASCII digits in payDate; adds tests.

## 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.2 marks it unreviewed and adds its attribution notices (NOTICE). The code and the tests are unchanged.