Skip to content

Charge employer Class 1 NI at 15.05% in 2022-23 - #2227

Merged
MaxGhenis merged 2 commits into
mainfrom
employer-ni-hscl-2022
Oct 9, 2026
Merged

MaxGhenis merged 2 commits into
mainfrom
employer-ni-hscl-2022

Conversation

@MaxGhenis

Copy link
Copy Markdown
Collaborator

Fixes #2226

What changes

Employer (secondary) Class 1 NI now charges 15.05% in model year 2022 (2022-23), where it charged 13.8%.

class_1/rates/employer.yaml gains 15.05% from 2022-04-06 and 13.8% from 2022-11-06, citing both Acts.

Annualisation follows the employee main rate

convert_to_fiscal_year_parameters reads each model year at 30 April unless a parameter sets fiscal_year_blend. The employee main rate is not blended: it reads 13.25% for 2022, although 12% applied from 6 November. The employer rate now follows the same convention and reads 15.05% for 2022. Neither parameter sets the flag, and a test pins that.

Averaging is the per-parameter choice open in #1807. For 2022-23 the day-weighted averages are 14.53% (employer) and 12.73% (employee main): 214 days at the levy rate, 151 at the base rate. These match, to two decimal places, the rates the Repeal Act Sch para 5(3) sets for directors' annual earnings periods. A test checks both against an exact computation and against fiscal_year_average, so a later move to blending has its target figures ready.

Two related edits

  • Employee main rate date. The employee main rate's levy value moves from 2022-04-01 to 2022-04-06, the start of the tax year that s.5(1) names, and gains an s.5(2)(a)(i) reference. Every model year reads the same value as before, because both dates fall before the 30 April sample. The new date-matching property needs the two rates to share dates.
  • Employer references. The employer values' references move under metadata:. policyengine-core accepts only value and metadata on a dated value (ParameterAtInstant._allowed_keys), so the bare reference: keys were dropped with a warning.

Invariants

These hold for the stored parameter files:

  1. Statutory window. For any date d, the employer rate is 15.05% if and only if 6 April 2022 ≤ d < 6 November 2022. The employee main rate is 13.25% on exactly the same dates. Hypothesis tests dates from 2015-04-06 to 2031-04-05, with explicit edge cases on each side of both boundaries.
  2. Same dates. In the 2022-23 tax year both rates change on the same two dates, 2022-04-06 and 2022-11-06.
  3. Same uplift. Inside the window each rate is 1.25 points above its value on 5 April 2022.
  4. Annual equivalent (differential). The exact day-weighted average over 2022-23 rounds to 14.53% and 12.73%. fiscal_year_average agrees with the exact figure to 1e-9.

These hold for the model:

  1. Same convention. Neither rate is blended. In every model year from 2015 to 2030, each annual rate equals the stored rate at 30 April.
  2. Employer NI differential. In test_ni_secondary_threshold.py, ni_class_1_employer equals rate × max(earnings − annual ST, 0), in exact arithmetic, in every year from 2015 to 2030. That now includes 2022-23 at 15.05%. Correct the 2015-16 and 2016-17 secondary threshold; pin the annual threshold to reg 11(3A)(b) in every year #2182 left 2022-23 out of this differential because of this gap.

Tests

All runs were at 827312fa, through ~/reviews/us-hub/scripts/heavy_run.sh and /usr/bin/lockf -k …/subfleet-suites.lock, with -n 2.

  • pytest -n 2 policyengine_uk/tests/test_ni_health_and_social_care_levy.py test_ni_secondary_threshold.py test_fiscal_year_parameters.py test_ni_class_1_age_properties.py test_parameter_metadata.py: 96 passed in 84 s.
  • policyengine-core test policyengine_uk/tests/policy/baseline/gov/hmrc/national_insurance -c policyengine_uk: 99 passed.
  • ruff format and ruff check on the touched Python files: clean.
  • Not run: the full make test suite and the microsimulation-marked tests. The only other tests that name either rate are test_parametric_reform_impacts.py (reforms in 2025) and tests/microsimulation/reforms_config.yaml (scored on 2029). This PR changes no value in those years. No YAML test outside the NI folder computes employer NI for 2022.

Impact (real microsimulation runs)

Each figure is a weighted total from Microsimulation.calculate. Each comes from two runs on the same file: origin/main at 9f92d53e7 (baseline) and this branch at 827312fa. Scripts and outputs are kept outside the repo.

Released uk-data 1.58.0 (enhanced_frs_2024_25.h5, sha256 5ba399ea…, the only microdata in the 1.58.0 release manifest). The file holds years 2024 to 2030. A 2022 run on it returns £0 employment income, so this change cannot move any 2022 output from the released data.

Year Employer NI, baseline Employer NI, branch Other totals
2022, 2023 £0 (no data for the year) £0 identical
2024 £116.707bn £116.707bn identical
2025 £154.541bn £154.541bn identical
2026 £161.154bn £161.154bn identical
2027 £166.168bn £166.168bn identical
2028 £170.808bn £170.808bn identical
2029 £177.663bn £177.663bn identical
2030 £183.237bn £183.237bn identical

"Identical" covers every total the script records: employment income, employer NI, employee NI, gov_tax, gov_balance, household_net_income and the count of employer NI payers.

2022 magnitude. The only released file with 2022-23 data is enhanced_frs_2022_23.h5, still in the HF tree at tag 1.58.0 (sha256 c0200a76…). It was last built by uk-data 1.16.1 in July 2025 and is not in the 1.58.0 manifest. The current model rejects four of its enum columns, so the run used a copy that maps each invalid value to the variable's default:

Column Rows replaced Old value Replaced with
council_tax_band 332 'nan' D
current_education 6,372 '0' NOT_IN_EDUCATION
employment_status 6,052 'nan' UNEMPLOYED
marital_status 44,388 'nan' SINGLE

Baseline and branch read the same copy.

2022-23 total Baseline Branch Change
Employer NI (ni_class_1_employer, ni_employer) £106.854bn £116.533bn +£9.679bn (+9.06%)
gov_tax, gov_balance +£9.679bn
household_net_income, ni_employee, employment income 0

Employer NI rises by a factor of 1.090580, the ratio 15.05 / 13.8, and the number of payers (24.98m) does not change. The levels come from a file built in July 2025. Both runs read that same file, so the difference between them isolates this PR's rate change.

2023 and later on a 2023-24 base. The 1.58.0 file cannot run 2023, so the same two code versions also ran on enhanced_frs_2023_24.h5, still in the HF tree at tag 1.58.0 (sha256 584ae33d…, last built by uk-data 1.55.10). It loads without changes. Every recorded total is identical between baseline and branch in each year from 2023 to 2030. Employer NI is £106.991bn in 2023, £115.541bn in 2024 and £182.756bn in 2030. 2022 has no data in this file.

Not in this PR

  • The employee additional rate (class_1/rates/employee/additional.yaml) holds the levy's 3.25% until 2024-04-04. Repeal Act s.2(1) restored 2% from 6 November 2022, so model year 2023 reads 3.25% instead of 2%. Fixing it changes 2023 outputs, so it is left for a separate PR.
  • Class 4 2022-23 rates (Repeal Act s.2(2): 9.73% and 2.73%) are in Fix Class 2 and Class 4 NICs against SSCBA 1992 for 2015-16 to 2026-27 #2058.

axiom: TheAxiomFoundation/rulespec-uk#441 queued (rulespec-uk uk/statutes/ukpga/1992/4/9.yaml#secondary_percentage has only 15% from 2025-04-06; HSCL Act 2021 s.5 is not in the corpus, and signed encoder runs need approval)

🤖 Generated with Claude Code

MaxGhenis and others added 2 commits October 8, 2026 22:59
The Health and Social Care Levy Act 2021 s.5(2)(b) made the secondary
percentage 15.05% for 2022-23. The Health and Social Care Levy (Repeal)
Act 2022 s.2(1) kept it for earnings paid before 6 November 2022. The
employer rate parameter held 13.8% throughout, while the employee main
rate already carried the levy.

Add 15.05% from 2022-04-06 and 13.8% from 2022-11-06. Model year 2022
reads the rate at 30 April (15.05%), the same convention as the employee
main rate (13.25%); #1807 covers sampling against averaging. Move the
employee main rate's levy value to the statutory 2022-04-06 (no change
to any model year) and cite s.5(2)(a)(i). Put the employer references
under metadata, where policyengine-core reads them.

Tests: YAML cases for 2021-2023, property tests for the levy window,
dates, uplift and the Repeal Act's 14.53%/12.73% annual equivalents,
and 2022-23 back in the secondary threshold differential.

Fixes #2226

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The baseline page credited the 1.25-point levy to the employee rate only
and linked parameter lines that the rate edits shifted. Name both rates,
the repeal from 6 November 2022 and the 30 April reading, and repoint the
employer and employee main rate line anchors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis

Copy link
Copy Markdown
Collaborator Author

Hand-off to the UK hub

  • Head: 827312fad495ae591daa2b1afb7bfcd03494c9bd (base 9f92d53e7; GitHub reports MERGEABLE against main at 94ffad008, which touches none of these files).
  • Independent review: APPROVE at this head, no findings. Run subfleet 20261008-230236-pe-uk-hscl-r1b (--task review --tier hard, served by GPT-6.1 Sol). The verdict is in ~/reviews/pe-uk-employer-ni-hscl-2022/review_r1.md. The reviewer checked:
    • the statute, against both Acts;
    • the 30 April samples for 2015-2040, where only employer model year 2022 changes;
    • the callers, none of which bypasses fiscal-year conversion;
    • the test edges, the four YAML amounts and the doc anchors.
  • CI: all 7 checks pass at this head, including Test (56 min) and the documentation build.
  • Local tests: run through heavy_run.sh and lockf with -n 2.
    • pytest: 96 passed.
    • NI YAML suite: 99 passed.
    • Log: ~/reviews/pe-uk-employer-ni-hscl-2022/tests_827312fa.log.
  • Impact runs: outputs, scripts and the sanitizer report are in ~/reviews/pe-uk-employer-ni-hscl-2022/. The numbers are in the PR description.
  • Pending: nothing on this PR except landing. There is no hold and no decision.
  • Depends on: nothing.
  • Follow-ups owed, not on this PR:

@MaxGhenis
MaxGhenis merged commit 7331e76 into main Oct 9, 2026
7 checks passed
@MaxGhenis

Copy link
Copy Markdown
Collaborator Author

Landed by the UK hub on the gates (handed off by session local_f9672a1b).

  • Head 827312fad495ae591daa2b1afb7bfcd03494c9bd. Merged with a merge commit, pinned to this head.
  • CI: all 7 checks ran and passed at this head, including Test (56 min).
  • Mergeable: MERGEABLE, not a draft.
  • Review: an independent GPT-6.1 Sol review (20261008-230236-pe-uk-hscl-r1b) APPROVES this head with no findings.
  • Impact: in the PR description, from real runs.
  • Change: employer Class 1 NI is 15.05% for 2022-23, per Health and Social Care Levy Act 2021 s.5(2)(b), until the 6 November 2022 repeal. This is a bug fix to match the law, so no Max decision is needed.

@MaxGhenis
MaxGhenis deleted the employer-ni-hscl-2022 branch October 9, 2026 10:28
MaxGhenis added a commit that referenced this pull request Oct 9, 2026
…acy-award-readers-claimant-partner

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Employer Class 1 rate is 13.8% in 2022-23; the Health and Social Care Levy set 15.05%

1 participant