Skip to content

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
mainfrom
class-2-flat-rate-2023-24
Closed

MaxGhenis wants to merge 1 commit into
mainfrom
class-2-flat-rate-2023-24

Conversation

@MaxGhenis

Copy link
Copy Markdown
Collaborator

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:

  1. 2023-24 rate. flat_rate.yaml had 2022-04-06: 3.15 and 2024-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.
  2. Who pays in 2022-23 and 2023-24. SI 2022/1329 (made December 2022, with effect from 6 April 2022) rewrote s.11(2). From then Class 2 is payable only on profits that exceed the lower profits threshold: £11,908 in 2022-23, and £12,570 in 2023-24 (SI 2023/236 reg 3(b)). Profits from the small profits threshold up to it are treated as paid (s.11(5A)-(5B)) and cost nothing. The model charged 52 weeks from the small profits threshold.
  3. Small profits threshold, 2023-24 and 2024-25. It stayed at £6,725 (s.11(4)(b) as at 6 April 2023 and 2024). The file had no values for those years, so CPI uprating from 2022 gave £7,215.94 and £7,396.34.
  4. Small profits threshold, 2015-16 and 2016-17. The file had 3,965. NICA 2015 Sch 1 para 3 set £5,965, unchanged in 2016-17.

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:
    • adds 2023-04-06: 3.45;
    • moves the zero to 2024-04-06;
    • dates the other values 6 April, where they were 1 April;
    • cites the amending instrument for every value (NICA 2015; SIs 2017/415, 2018/337, 2019/262, 2020/299, 2022/232 and 2023/236; NICRRA 2023 s.3).
  • class_2/small_profits_threshold.yaml:
    • corrects 2015 to 5,965;
    • adds £6,725 for 2023-04-06 and 2024-04-06;
    • cites every value, including SIs 2025/288 and 2026/231 for £6,845 and £7,105.
    • CPI uprating now projects from the latest statutory value (2026-27). The start_instant: 2022-04-06 anchor 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.
  • New 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.
  • New 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 duplicate reference attribute.
  • Docs: the NI notebook describes the 2022-23 and 2023-24 rule and the 2024 end of compulsory Class 2. Its saved charts were regenerated; the docs build does not execute notebooks. The rates chart now selects percentage parameters by unit. Before, it relied on Value < 1 to exclude the £/week Class 2 rate, which let that rate's zeros from 2024 onward through. model-baseline.md links to the new line range.
  • test_ni_class_4_properties.py docstring: Class 2 now starts at the lower profits threshold in 2022-23 and 2023-24. The test logic already keyed on the model's ni_class_2.

Invariants

These hold for every model year from 2015 to 2030 and every profit level ≥ 0:

  1. Differential against statute. ni_class_2 = 52 × the statutory weekly rate when s.11(2) makes the earner liable, otherwise 0. test_ni_class_2.py holds its own table of statutory figures, taken from the instruments, not from the parameter files.
  2. Range. ni_class_2 ∈ {0, 52 × weekly rate}.
  3. Monotonicity. ni_class_2 is non-decreasing in profits.
  4. Parameters. In each model year 2015–2026, the flat rate, small profits threshold, lower profits threshold and test switch equal the statutory figures for that tax year.

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. On main, 8 of the 17 fail.
  • test_ni_class_2.py:
    • Statute-table parameter checks for 2015–2026.
    • One simulation covering every threshold ±1p/£1 plus 200 seeded random profit levels, checked in all 16 model years.
    • A Hypothesis property test (invariants 1–3; 10 derandomised examples of up to 24 profit levels × 16 years).
    • A regulation 100 pin for 2023-24 using the default £3.45 rate: Step Three adds 53 × £3.45, and the Class 4 cap is £1,256.95 for £60,000 of profits with £3,000 of Class 1. The Class 4 limits and rates are pinned to their statutory 2023-24 values; see "Not in this PR".

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):

Class 2 Class 4 Total NI
Sole trader, £60,000 profits £163.80 → £179.40 (+£15.60) £3,793.13, unchanged +£15.60
£30,000 employment + £60,000 profits +£15.60 £2,516.85 → £2,517.04 (+£0.18) +£15.78
£60,000 employment + £60,000 profits +£15.60 £1,683.22, unchanged +£15.60
  • Sole traders. Class 4 does not change. Reg 100 applies because Class 2 is payable. Step Three adds 53 weeks and Step Four subtracts the 52 paid, so the maximum stays one week of Class 2 above the s.15(3) amount. Both old and new maxima exceed it (£3,796.28 → £3,796.58).
  • Dual earners where the maximum binds. Step Four rises by 53 × £0.30 − 52 × £0.30 = £0.30. Step Five then rises by £0.30 / 9% = £3.33, which takes £3.33 × the additional rate off Step Eight. At the model's current 3.5% additional rate the net is +£0.18; at the statutory 2% it would be +£0.23.
  • Grid. Above the UPL, Class 4 changes only for £20k and £30k of employment income, by +£0.18 in every such cell (from £40,400 and £27,100 of profits). With £50k or £100k of employment, Step Four is floored at zero before and after, so nothing changes.

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

  • Class 4 in 2022-23 and 2023-24. At default parameters, model year 2023 has a £11,908 lower profits limit and a 3.5% additional rate. s.15(3) and (3ZA) give £12,570 and 2%. That is a separate provision (s.15) and a separate fix; a follow-up task has been filed. It doesn't affect the Class 2 figures above. It does change the Class 4 amounts quoted for 2023 dual earners.
  • 52 contribution weeks. Class 2 is weekly (s.11(2)) and the model counts 52 weeks. I did not find a source settling whether any year in this range had 53 contribution weeks.
  • Voluntary Class 2 (s.11(6): £3.45, £3.50 and £3.65 from 2024-25) is still not modelled. The flat-rate parameter describes compulsory liability only.

Axiom parity

axiom: TheAxiomFoundation/rulespec-uk#353 queued

rulespec-uk's uk/statutes/ukpga/1992/4/11.yaml encodes 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 pasteable review_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 . and ruff check .
  • policyengine-core test policyengine_uk/tests/policy -c policyengine_uk: 1,269 passed
  • pytest 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 skipped
  • The branch's ni_class_2.yaml run against main: 8 failed, 9 passed
  • Not run locally: the microsimulation tests and make documentation (CI runs both).

🤖 Generated with Claude Code

- 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>
@MaxGhenis

Copy link
Copy Markdown
Collaborator Author

Superseded by #2058. That PR carries this branch's commit unchanged (apart from one notebook cell that main had also edited) and adds the Class 4 fix this PR left for a follow-up (#1968), so the Class 2 and Class 4 tests for 2022-23 and 2023-24 land together.

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.

Class 2 NICs wrong for 2022-23 and 2023-24 (rate, lower profits threshold) and 2015-17 (small profits threshold)

1 participant