Fix Class 2 NICs: 2023-24 rate, the 2022-23 lower profits threshold, and the small profits threshold - #1888
Closed
MaxGhenis wants to merge 1 commit into
Closed
Fix Class 2 NICs: 2023-24 rate, the 2022-23 lower profits threshold, and the small profits threshold#1888MaxGhenis wants to merge 1 commit into
MaxGhenis wants to merge 1 commit into
Conversation
- 2023-24 weekly rate £3.45 (SI 2023/236 reg 3(a)); model year 2023 charged £3.15. - From 2022-23 Class 2 is payable only on profits that exceed the lower profits threshold (£11,908, SI 2022/1329; £12,570, SI 2023/236 reg 3(b)). Profits from the small profits threshold up to it are treated as paid (s.11(5A)-(5B)); the model charged 52 weeks on them. - Small profits threshold: £6,725 in 2023-24 and 2024-25 (not CPI uprated), £5,965 in 2015-16 and 2016-17 (not 3,965). CPI projections now run from the latest statutory value. - Compulsory Class 2 ends 6 April 2024 (NICRRA 2023 s.3), not 1 January. - Every value cites its amending instrument. - Tests: YAML cases per year and threshold; a statute-table differential, range and monotonicity property test over model years 2015-2030; a 2023-24 regulation 100 pin using the default £3.45 rate. - NI notebook: describe the rule and regenerate saved charts; the rates chart now selects percentage parameters by unit. Fixes #1887 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 30, 2026
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1887
What was wrong
A reviewer of #1884 recalled that the 2023-24 Class 2 rate was £3.45 a week. That is right. Checking every year of s.11 of the Social Security Contributions and Benefits Act 1992 against the amending instruments and the point-in-time text on legislation.gov.uk turned up four more errors:
flat_rate.yamlhad2022-04-06: 3.15and2024-01-01: 0, so model year 2023 (sampled at 2023-04-30) charged £3.15. SI 2023/236 reg 3(a) set £3.45 from 6 April 2023.Also, compulsory Class 2 ended on 6 April 2024 (National Insurance Contributions (Reduction in Rates) Act 2023 s.3), not 1 January 2024. Results don't change, because the model samples April 30.
2020-21 (£3.05, SPT £6,475) and 2021-22 (£3.05, SPT £6,515) were already right.
Changes
class_2/flat_rate.yaml:2023-04-06: 3.45;2024-04-06;class_2/small_profits_threshold.yaml:start_instant: 2022-04-06anchor was keeping 2023-24 and 2024-25 on the uprated path, and it put 2027-28 at £7,980 instead of £7,247. This has no effect on liabilities, since the threshold no longer sets Class 2 liability.class_2/lower_profits_threshold.yaml(s.11(4)(a)): £11,908 from 6 April 2022 (SI 2022/1329 reg 2(3)), £12,570 from 6 April 2023. After s.11(4)(a) was omitted in April 2024, the 2023-24 value stays for reforms that restore a Class 2 rate.class_2/lower_profits_threshold_applies.yaml: false before 6 April 2022, true from then (SI 2022/1329 regs 1 and 2(2)).ni_class_2: liable where profits > the lower profits threshold when that test applies, else where profits ≥ the small profits threshold. The strict and non-strict comparisons follow the statutory wording ("that exceed" and "of, or exceeding"). I also removed a duplicatereferenceattribute.Value < 1to exclude the £/week Class 2 rate, which let that rate's zeros from 2024 onward through.model-baseline.mdlinks to the new line range.test_ni_class_4_properties.pydocstring: Class 2 now starts at the lower profits threshold in 2022-23 and 2023-24. The test logic already keyed on the model'sni_class_2.Invariants
These hold for every model year from 2015 to 2030 and every profit level ≥ 0:
ni_class_2= 52 × the statutory weekly rate when s.11(2) makes the earner liable, otherwise 0.test_ni_class_2.pyholds its own table of statutory figures, taken from the instruments, not from the parameter files.ni_class_2∈ {0, 52 × weekly rate}.ni_class_2is non-decreasing in profits.Tests
ni_class_2.yaml: 17 cases. They cover 2023-24 (below, at and between the thresholds; at and 1p above the lower profits threshold; above the UPL; over State Pension age), 2022-23 (in the band, and at and above £11,908), 2021-22 and 2020-21 at the threshold, 2015-16 either side of £5,965, and 2024-25. Onmain, 8 of the 17 fail.test_ni_class_2.py:Effect
These figures are single-person households at default parameters, main (d2754dc) against this branch. The grid covers profits £0–£150,000 in £50 steps, crossed with employment income of £0, £20k, £30k, £50k and £100k.
2023-24, profits above the £50,270 UPL (the case asked about):
2023-24, profits £6,725–£12,570: −£163.80. The model had charged £3.15 × 52 on profits above its uprated £7,215.94 SPT. By law these profits are treated as paid.
2022-23, profits £6,725–£11,908: −£163.80.
2015-16 and 2016-17, profits £3,965–£5,964.99: −£145.60 (52 × £2.80).
2021-22, 2024-25 and later: no change anywhere in the grid.
Household net income moves by the negative of the NI change in every example (e.g. −£15.60 for the 2023 sole trader). I did not run a microsimulation, so there is no aggregate revenue figure.
Not in this PR
Axiom parity
axiom: TheAxiomFoundation/rulespec-uk#353 queued
rulespec-uk's
uk/statutes/ukpga/1992/4/11.yamlencodes only the 2025-04-06 text. It has no s.11(2) liability before 2024-25, no lower profits threshold, and it still uses 2025-26 figures for 2026-27. The corpus has none of the amending instruments. #353 is dispatch-ready: module path, verbatim law, a figures table for 2015-16 to 2026-27, the corpus ingest path, a pasteablereview_finding, and 15 companion tests built on the same statutory figures as the tests here.Verification of the figures
Each figure was read from the amending instrument's made or enacted text, and from the point-in-time text of s.11 on 6 April and 5 April of each year. Three independent sweeps did the reading: legislation.gov.uk, GOV.UK with its archives and HMRC Table A4, and the 2024 abolition. Adversarial verifiers then re-fetched every value, and a completeness critic reviewed the result. No value was refuted, and every cited URL resolves.
Independent review
Pending: an independent Opus 5.5 review via Subfleet (
--task review --tier standard). Its result will be posted here.Commands run
ruff format .andruff check .policyengine-core test policyengine_uk/tests/policy -c policyengine_uk: 1,269 passedpytest policyengine_uk/tests/test_ni_class_2.py test_ni_class_4_maximum.py test_ni_class_4_properties.py test_parameter_descriptions.py test_parameter_metadata.py test_fiscal_year_parameters.py test_build_metadata.py: 52 passed, 1 skippedni_class_2.yamlrun againstmain: 8 failed, 9 passedmake documentation(CI runs both).🤖 Generated with Claude Code