Functional Weave
Code in TypeScript

payroll.student-loan@1.0.1

README.md

2,386 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.