Skip to content

Council Tax Reduction income deducts the family's whole income tax, not the tax the schemes allow #2090

Open

Description

@MaxGhenis

Found while fixing Scottish Council Tax Reduction (CTR) income for Carer Support Payment (#1992, fixes #1955).

council_tax_reduction_applicable_income deducts the claimant's and partner's whole income_tax and national_insurance from every income it counts:

tax = add_for_members(
    benunit, period, ["income_tax", "national_insurance"], members
)
income_under_general_rules = max_(
    0, increased_income - tax - pension_contributions
)

The CTR instruments deduct less than that. The working-age and pension-age rules differ.

Working age. The Council Tax Reduction (Scotland) Regulations 2021 (SSI 2021/249) take tax and NI off earnings only. Reg 50(3)(a) reads "Earnings do not include— (a) any amount deducted from them by way of income tax or primary Class 1 contributions under the 1992 Act". Reg 49(6)(b) (applicants with UC) and reg 51(2) (self-employed with UC) do the same. Part 6 Chapter 4 (unearned income, regs 57 to 65) has no tax deduction. So tax on unearned income such as State Pension, private pensions, contributory benefits and Carer Support Payment should not come off. The model takes it off, so CTR is too generous wherever such income is taxed.

Pension age. All three pensioner schemes disregard tax only on income they take into account:

  • Scotland, SSI 2012/319 reg 31(12): "In the case of any income taken into account for the purpose of calculating a person's income, any amount payable by way of tax must be disregarded."
  • England, SI 2012/2885 Sch 1 para 17(13), and Wales, WSI 2013/3029 Sch 1 para 11(13): "In the case of any income taken into account for the purpose of calculating a person's income any amount payable by way of tax is disregarded."

NI comes off earnings only (SSI 2012/319 regs 33, 36 and 37), and the model's NI is all charged on earnings, so the NI deduction matches. The model's whole-tax deduction is close to the law for tax on counted income. It also deducts tax on income CTR does not count. One example is the taxable Scottish Carer Supplement (SI 2026/93), which SSI 2012/319 reg 27(1)(j)(xxib) excepts. Another is income disregarded under the schedules.

Not yet checked. The English and Welsh working-age schemes: SI 2012/2886 (the English default scheme), the local English schemes, and the WSI 2013/3029 working-age parts.

Related.

Suggested fix. Deduct tax and NI on earnings only, and at pension age also the income tax attributable to counted unearned income. Pension-age HB and PC need the same apportionment (#1954), so a shared helper would fit. Test it with:

  • a working-age Scottish carer with taxable State Pension or private pension, whose CTR income should not be reduced by the tax on it;
  • a pension-age Scottish carer whose Scottish Carer Supplement tax should not reduce CTR income.

Law texts were fetched from legislation.gov.uk on 2026-10-02 (CLML, valid from 2026-04-01 for the Scottish instruments).

🤖 Generated with Claude Code

Activity

  1. MaxGhenis commented on Oct 11, 2026

    @MaxGhenis
    CollaboratorAuthor

    Two pieces of evidence from PolicyBench UK round 2 (policyengine-uk 2.126.7).

    1. Pension-age CTR, scenario 048.

    2. #2327 makes this defect visible on the transfer data. Scenario 148:

    • The household has £510,223 of pay, £973,043 of dividends, £108,067 of interest and a −£2,399,684 miscellaneous figure.
    • On main the loss cuts Income Tax to £411,105, and CTR income stays at £123,854, so CTR is nil.
    • With Relieve a miscellaneous loss only against miscellaneous income #2327 the loss is ring-fenced and Income Tax is £563,769, of which £431,326 is on the dividends and interest. This function deducts all of it, although CTR counts neither, so CTR income falls to nil and the household gets the full £3,251.

    The enhanced FRS has no negative miscellaneous income, so #2327 moves nothing there. The fix for this case belongs here.

  2. MaxGhenis commented on Nov 2, 2026

    @MaxGhenis
    CollaboratorAuthor

    Picking this up for the UK hub. Reply here if you're mid-change and I'll stop.


    Generated by Claude Code

  3. MaxGhenis commented on Nov 2, 2026

    @MaxGhenis
    CollaboratorAuthor

    PR_TITLE.txt

    Deduct only the tax Council Tax Reduction schemes allow
    

    Generated by Claude Code

  4. MaxGhenis commented on Nov 2, 2026

    @MaxGhenis
    CollaboratorAuthor

    PR_BODY.md

    Addresses #2090
    
    Reproducer: policyengine_uk/tests/policy/baseline/gov/local_authorities/council_tax_reduction/council_tax_reduction_tax_deduction.yaml::England's pensioner scheme deducts no tax on savings interest
    
    axiom: hub fills this line
    
    ## What the code does now
    
    `council_tax_reduction_applicable_income` deducted every applicant's and partner's whole `income_tax_before_winter_fuel_payment_charge` and `national_insurance` in every scheme. It now deducts a new BenUnit variable, `council_tax_reduction_tax_deduction`, which holds the income tax and National Insurance each scheme allows:
    
    - **Scotland, working age (SSI 2021/249).** The formula deducts National Insurance on earnings and profits (Classes 1, 2 and 4) and the income tax on earnings. It takes that tax as the Step 5 tax that employment and self-employment income bear as the lowest part of non-savings income, with pensions, taxable benefits, property and miscellaneous income above them, and savings and dividends taxed separately. The earnings keep the personal allowance they would have on their own.
    - **Pensioner schemes of England (SI 2012/2885), Wales (WSI 2013/3029) and Scotland (SSI 2012/319).** The formula deducts the same National Insurance and the Step 5 tax on non-savings income less the tax on the income the model's CTR income does not count (the Scottish Carer Supplement, miscellaneous income and benefits in kind), taken as the highest part of non-savings income. It deducts no tax on savings interest or dividends.
    - In both, the Step 6 tax reductions come off the tax deducted first, and the Step 7 charges other than the winter fuel payment charge are shared in proportion to the Step 5 tax.
    - **Unchanged:** the English working-age schemes the model runs (Merton, Kingston upon Thames, Newham, Westminster, Oxford), the Welsh working-age scheme and families outside Great Britain still deduct the whole liability and all National Insurance. Issue #2090 quotes no provision for these, so this PR leaves them open.
    
    The pensioner schemes' guarantee credit and savings-credit-only routes do not deduct tax and are unchanged.
    
    ## The law
    
    - [SSI 2021/249 reg 50(3)(a)](https://www.legislation.gov.uk/ssi/2021/249/regulation/50): "Earnings do not include— (a) any amount deducted from them by way of income tax or primary Class 1 contributions under the 1992 Act". [Reg 49(6)(b)](https://www.legislation.gov.uk/ssi/2021/249/regulation/49) (applicants with UC) and [reg 51(2)](https://www.legislation.gov.uk/ssi/2021/249/regulation/51) (self-employed with UC) do the same. Part 6 Chapter 4 (unearned income, regs 57 to 65) has no tax deduction.
    - [SSI 2012/319 reg 31(12)](https://www.legislation.gov.uk/ssi/2012/319/regulation/31): "In the case of any income taken into account for the purpose of calculating a person's income, any amount payable by way of tax must be disregarded."
    - [SI 2012/2885 Sch 1 para 17(13)](https://www.legislation.gov.uk/uksi/2012/2885/schedule/1/paragraph/17) and [WSI 2013/3029 Sch 1 para 11(13)](https://www.legislation.gov.uk/wsi/2013/3029/schedule/1/paragraph/11): "In the case of any income taken into account for the purpose of calculating a person's income any amount payable by way of tax is disregarded."
    - SSI 2012/319 reg 27(1)(j)(xxib) excepts the Scottish Carer Supplement from the pensioner scheme's income.
    
    ## Limitation: how the tax is split
    
    The regulations name the tax deducted from earnings, or payable on counted income; they do not say how to apportion one liability between kinds of non-savings income. The model taxes savings and dividends as separate top slices (`savings_income_tax`, `dividend_income_tax`), so their tax comes apart exactly. Inside non-savings income, `earned_income_tax` taxes earnings, pensions, taxable benefits and miscellaneous income as one slice, so the model has no exact split there. The formula takes the uncounted income as the highest part of that slice, which gives each scheme's counted income the tax it would bear on its own. This is a modelling choice.
    
    The gap on the issue's own households is nil: scenario 048's non-savings income is all pension, which the scheme counts, and scenario 148's is all pay. It matters only where earnings and other non-savings income mix. For a working-age Scottish carer with £8,000 of pay, a £14,000 private pension and Carer Support Payment (income tax £2,867.09), the earnings tax is £0.00 under this PR's ordering, £846.25 if the tax were shared in proportion to income, and £1,600.00 if earnings were the highest part.
    
    Other limitations:
    - From 2027-28 the rUK property rates differ from the main rates; the formula prices the uncounted top slice at the main rates.
    - Benefits in kind sit with earnings in the Scottish working-age scheme (PAYE collects their tax from pay, as `person_net_earnings` already assumes) and with uncounted income in the pensioner schemes.
    - The pensioner earnings disregard still reads `council_tax_reduction_net_earnings`, which apportions tax by earnings' share of all income (`person_net_earnings`). This PR does not change it.
    
    ## The issue's households, before and after
    
    Single adults in 2026, council tax £2,000, no capital, built by hand from the figures in the issue's comment. The issue does not give the bill, the location or the capital behind scenario 048's interest, so the issue's reference (£238.68) and law (£213.33) figures are not reproduced here.
    
    | Household | Scheme | CTR tax deduction before | after | CTR income before | after | CTR before | after |
    |---|---|---|---|---|---|---|---|
    | 048: £20,308 pension, £6,559 interest, age 75 | England pensioner | £2,659.40 | £1,547.60 | £17,648.60 | £18,760.40 | £1,132.68 | £910.32 |
    | 048 | Wales pensioner | £2,659.40 | £1,547.60 | £17,648.60 | £18,760.40 | £1,132.68 | £910.32 |
    | 048 | Scotland pensioner | £2,619.73 | £1,507.93 | £17,688.27 | £18,800.07 | £1,124.75 | £902.39 |
    | 148: £510,223 pay, £973,043 dividends, £108,067 interest, −£2,399,684 miscellaneous | Scotland working age | £423,320.41 | £12,215.06 | £86,902.59 | £498,007.94 | £0 | £0 |
    | 148, miscellaneous loss set to nil | Scotland working age | £676,082.25 | £244,756.45 | £0 | £265,466.56 | £2,000 | £0 |
    | 148, miscellaneous loss set to nil | Wales working age (unchanged) | £659,344.19 | £659,344.19 | £0 | £0 | £2,000 | £2,000 |
    
    The "before" deductions are the whole income tax before the winter fuel payment charge plus National Insurance. In 048 the £1,547.60 is (£20,308 − £12,570) × 20%, the figure the issue gives as deductible. Setting 148's miscellaneous loss to nil stands in for the ring-fenced loss of #2327: on `main` it reproduces the issue's full award, and in Scotland this PR removes it. In 148 with the loss, the model sets the loss against the pay, so the pay bears no income tax and Scottish CTR income rises to pay less National Insurance; CTR stays nil. With the loss, 148 in Westminster's working-age scheme (unchanged) gives the same CTR income as Wales: £86,902.59 before and after.
    
    ## Invariants
    
    Each holds for every input; the property tests check them.
    
    1. In Scotland's working-age scheme, CTR applicable income never falls when a taxed unearned income (private pension, property income, savings interest or dividends) rises and earnings stay fixed.
    2. In Scotland's working-age scheme, with no earnings the deduction for income tax and National Insurance is nil.
    3. In the pensioner schemes, the deduction never exceeds what the same person would pay with only the income the scheme counts, nor the whole liability, and removing the uncounted income leaves it unchanged.
    4. The Scottish Carer Supplement leaves CTR income and the award unchanged under the general rules (tightened from "income plus income tax is unchanged").
    5. Determinism and no cycle: `council_tax_reduction` and the deduction come out the same whichever is calculated first. The deduction reads only income tax components, National Insurance and taxable income, and no family benefit.
    6. In schemes without a quoted rule, the deduction equals the whole liability, as before.
    
    ## Tests
    
    - New `council_tax_reduction_tax_deduction.yaml`: one case each for Scotland working age, England pensioner, Wales pensioner and Scotland pensioner (Carer Supplement), with expected values worked by hand from the rules above, plus a Welsh working-age guard. At `main` the four scheme cases fail (CTR income £25,954.53 against £27,959.27; £17,648.60 against £18,760.40; £17,492.75 against £18,514; £14,422.70 against £14,538.30); the guard passes, as intended.
    - New `test_council_tax_reduction_tax_deduction_properties.py`: invariants 1, 2, 3 and 5.
    - `council_tax_reduction_carer_support_payment.yaml`: the pension-age Scottish carer case now expects no deduction for the supplement's tax (deduction £1,145.41, CTR income £17,349.99, reduction £1,693.16).
    - `test_council_tax_reduction_carer_income_properties.py`: reads the new deduction, asserts invariant 4, and compares with Housing Benefit net of the tax that Housing Benefit deducts and CTR does not.
    - Mutation: with the new variable returning the whole liability for every scheme, 5 YAML cases and 4 property tests fail (both supplement tests, invariants 1 to 3).
    - Runs: CTR YAML directory 336 passed; the 26 other YAML files that read CTR 293 passed; the two CTR property files 8 passed; nine other property files that read CTR income 60 passed and 1 skipped (`test_claims_all_entitled_benefits.py::test_survey_takeup_follows_reports_in_microdata`, a microsimulation test that needs the survey dataset); `tests/code_health` 3,088 passed; ruff format, ruff check, F811/F821 and `git diff --check` clean.
    
    ## Merge notes
    
    `git merge-tree --write-tree --name-only` against this head (`411dc024`):
    
    - #1933 `fix-1933-ctr-pensioner-children` (`e8831fb6`): conflicts in `council_tax_reduction_applicable_income.py`. It merges cleanly with `main`, so this PR causes the conflict.
    - #1966 (`779f5dcf`): conflicts in `council_tax_reduction_carer_support_payment.yaml` (caused by this PR), and in `CHANGELOG.md`, `test_means_test_income_properties.py` and `pyproject.toml` (already conflicting with `main`).
    - #1995 (`1b8f2ded`): conflicts in `council_tax_reduction_applicable_income.py` and five other files, all already conflicting with `main`. It also overlaps in substance: it replaces the same tax line with its own `legacy_means_test_income_tax`, which treats savings, dividends and property income as capital in every scheme, including the English and Welsh working-age schemes, and deducts no Step 7 charges. Whichever lands second should route both through one helper.
    - #2077 (`cf0475dd`): conflicts in seven non-dependant deduction files, all already conflicting with `main`; none of this PR's files.
    - Clean: #2799 `fix-2799-ctr-uc-award` (`dd39eafb`), #2120 `fix-2120-uc-carer-awards` (`260f6a77`), #2007 `hub/2007-r5` (`2667976b`), #2794 (`19378b97`), #2768 (`fe1c4f1a`).
    
    ## Open
    
    - The English working-age schemes (SI 2012/2886 and the local schemes the model runs) and the Welsh working-age scheme: #2090 quotes no provision, so they still deduct the whole liability.
    - Pension Credit and pension-age Housing Benefit (#1954) could share `tax_below_top_slice`.
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    

    Generated by Claude Code

  5. MaxGhenis commented on Nov 2, 2026

    @MaxGhenis
    CollaboratorAuthor

    AXIOM_ISSUE.md

    Title: Council Tax Reduction: deduct only the tax the schemes allow from income
    
    Labels: pe-parity
    
    ## Module and corpus
    
    - Proposed module path: `uk/local_authorities/council_tax_reduction/tax_deduction`
    - Corpus citations:
      - Council Tax Reduction (Scotland) Regulations 2021 (SSI 2021/249) regs 49(6)(b), 50(3)(a) and 51(2), and Part 6 Chapter 4 (regs 57 to 65)
      - Council Tax Reduction (State Pension Credit) (Scotland) Regulations 2012 (SSI 2012/319) reg 31(12) and reg 27(1)(j)(xxib)
      - Council Tax Reduction Schemes (Prescribed Requirements) (England) Regulations 2012 (SI 2012/2885) Sch 1 para 17(13)
      - Council Tax Reduction Schemes and Prescribed Requirements (Wales) Regulations 2013 (WSI 2013/3029) Sch 1 para 11(13)
    - PolicyEngine UK counterpart: `council_tax_reduction_tax_deduction`, read by `council_tax_reduction_applicable_income` (PolicyEngine/policyengine-uk issue #2090).
    
    ## Law (verbatim, as quoted in issue #2090)
    
    SSI 2021/249 reg 50(3)(a):
    
    > Earnings do not include— (a) any amount deducted from them by way of income tax or primary Class 1 contributions under the 1992 Act
    
    Issue #2090 records that reg 49(6)(b) (applicants with Universal Credit) and reg 51(2) (self-employed with Universal Credit) do the same, and that Part 6 Chapter 4 (unearned income, regs 57 to 65) has no tax deduction. Their text is not quoted here.
    
    SSI 2012/319 reg 31(12):
    
    > In the case of any income taken into account for the purpose of calculating a person's income, any amount payable by way of tax must be disregarded.
    
    SI 2012/2885 Sch 1 para 17(13) and WSI 2013/3029 Sch 1 para 11(13):
    
    > In the case of any income taken into account for the purpose of calculating a person's income any amount payable by way of tax is disregarded.
    
    Issue #2090 records that SSI 2012/319 reg 27(1)(j)(xxib) excepts the Scottish Carer Supplement from the pensioner scheme's income; its text is not quoted here.
    
    ## Required outputs
    
    - `council_tax_reduction_tax_deduction` (benefit unit, annual, GBP): the income tax and National Insurance the scheme deducts from the applicant's and partner's income.
    - `council_tax_reduction_applicable_income` (benefit unit, annual, GBP), in so far as it depends on that deduction.
    
    ## Companion cases
    
    Worked by hand from the law above with 2026-27 rates: personal allowance £12,570; UK basic rate 20% on the first £37,700 of taxable income; Scottish starter rate 19% on the first £3,967 and basic rate 20% to £16,956; Class 1 primary contributions 8% above £12,569.96 a year. Single adults, no Universal Credit or Pension Credit, no capital. The working-age case assumes PAYE deducts from pay the tax on the pay alone, the only case where the regulations leave no apportionment to choose.
    
    1. **Scotland, working age.** Pay £20,000, dividends £9,000. Tax deducted from the pay: (£20,000 − £12,570) = £7,430 taxable; £3,967 × 19% = £753.73 and £3,463 × 20% = £692.60, so £1,446.33. Class 1: (£20,000 − £12,569.96) × 8% = £594.40. Deduction £2,040.73. No tax on the dividends comes off.
    2. **England, pension age.** Private pension £20,308, savings interest £6,559. The scheme does not take the interest into account as income. Tax on the pension: (£20,308 − £12,570) × 20% = £1,547.60. Deduction £1,547.60; applicable income from the pension £20,308 − £1,547.60 = £18,760.40.
    3. **Wales, pension age.** Private pension £20,000, dividends £10,000. Tax on the pension: (£20,000 − £12,570) × 20% = £1,486. Deduction £1,486; applicable income from the pension £18,514.
    4. **Scotland, pension age.** Private pension £15,000, Scottish Carer Supplement £608.40 (£11.70 × 52). Reg 27(1)(j)(xxib) excepts the supplement, so the scheme counts the pension alone. Tax on the pension: (£15,000 − £12,570) × 19% = £461.70. Deduction £461.70; applicable income £14,538.30.
    
    ### review_finding (paste as-is)
    
    ```yaml
    review_finding:
      source: PolicyEngine/policyengine-uk#2090
      module: uk/local_authorities/council_tax_reduction/tax_deduction
      finding: >-
        PolicyEngine UK deducted the applicant's and partner's whole income tax
        and National Insurance from Council Tax Reduction income in every scheme.
        Scotland's working-age scheme deducts tax and primary Class 1
        contributions from earnings only (SSI 2021/249 reg 50(3)(a)), and the
        pensioner schemes disregard tax only on income taken into account
        (SSI 2012/319 reg 31(12); SI 2012/2885 Sch 1 para 17(13); WSI 2013/3029
        Sch 1 para 11(13)).
      schemes_changed:
        - scotland_working_age
        - england_pension_age
        - wales_pension_age
        - scotland_pension_age
      schemes_open:
        - england_working_age_default_and_local
        - wales_working_age
      modelling_choice: >-
        The regulations do not apportion one income tax liability between kinds
        of non-savings income. PolicyEngine UK takes the income a scheme does not
        count (or, in Scotland's working-age scheme, income other than earnings)
        as the highest part of non-savings income; savings and dividends are
        taxed as separate top slices.
      companion_cases:
        - scotland_working_age: {pay: 20000, dividends: 9000, deduction: 2040.73}
        - england_pension_age: {private_pension: 20308, savings_interest: 6559, deduction: 1547.60}
        - wales_pension_age: {private_pension: 20000, dividends: 10000, deduction: 1486.00}
        - scotland_pension_age: {private_pension: 15000, scottish_carer_supplement: 608.40, deduction: 461.70}
    ```
    
    ## Completion boundary
    
    An approved follow-up must:
    
    - **Ingest** the full text of SSI 2021/249 regs 49, 50, 51 and 57 to 65, SSI 2012/319 regs 27 and 31, SI 2012/2885 Sch 1 para 17 and WSI 2013/3029 Sch 1 para 11 into the corpus, and the working-age provisions of SI 2012/2886 and WSI 2013/3029 that #2090 left unchecked.
    - **Encode** the deduction for each changed scheme in the module, with the apportionment of a single liability across counted and uncounted non-savings income stated as a parameterised convention, not as law.
    - **Prove** the four companion cases, and that with no earnings the Scottish working-age deduction is nil and the pensioner deduction never exceeds the tax on counted income alone; then compare with PolicyEngine UK's `council_tax_reduction_tax_deduction` on the same households.
    

    Generated by Claude Code

  6. MaxGhenis commented on Nov 2, 2026

    @MaxGhenis
    CollaboratorAuthor

    Ready for hub review

    Branch claude/council-tax-reduction-deductions-clzysl, head 411dc0243dbbadefd56d46389b4b2b6270591eda, based on main at 2da212abcf2086337fc088a4a1236f4ae7b6af63. No PR opened. PR title, body and Axiom packet are in the three comments above.

    Findings and resolutions

    1. Whole-tax deduction. council_tax_reduction_applicable_income.py deducted the whole income_tax_before_winter_fuel_payment_charge and national_insurance. It now reads the new BenUnit variable council_tax_reduction_tax_deduction (policyengine_uk/variables/gov/local_authorities/council_tax_reduction/council_tax_reduction_tax_deduction.py, formula from line 141). That variable selects by scheme: Scotland working age deducts tax on earnings plus Class 1, 2 and 4 NI; the GB pensioner schemes deduct tax on counted income plus the same NI; all others keep the whole liability.
    2. Which tax. The model taxes savings and dividends as separate Step 5 slices (savings_income_tax, dividend_income_tax), so their tax comes apart exactly. Within non-savings income, earned_income_tax lumps earnings, pensions, taxable benefits and miscellaneous income together, so there is no exact split. tax_below_top_slice (same file, line 30) takes the uncounted income as the highest part of non-savings income and prices it at the main rates. tax_after_reductions_and_charges (line 79) takes Step 6 reductions off the counted part first and shares Step 7 charges pro rata. On the issue's households the gap from this choice is nil (048's non-savings income is all pension; 148's is all pay). For a Scottish carer with £8,000 pay, £14,000 pension and CSP, earnings tax is £0.00 here, £846.25 pro rata, and £1,600.00 with earnings on top.
    3. Counterexample found by the properties, then fixed. Hypothesis found that rising savings interest lowered Scottish working-age CTR income. Minimised by hand: pay £30,000, interest £60,000 → £90,000 cut the personal allowance to £2,570, and the deduction rose from £4,845.47 to £5,895.47 (at £80,000). Cause: the taper caused by uncounted income fell on earnings. Fix: the income below the top slice keeps the allowance it would have alone (restored_allowance, line 57). After the fix, the deduction is £4,845.47 at £60,000, £90,000 and £200,000 of interest.
    4. Float residue. The no-earnings property found a deduction of 7.8e-05 (float32 subtraction). The helper now returns nil where nothing is taxable below the top slice (line 76).
    5. Class 3 NI. Changed schemes no longer deduct voluntary Class 3 contributions, which are not charged on earnings (line 27). Unchanged schemes still deduct all NI.

    Tests run

    • CTR YAML directory policyengine_uk/tests/policy/baseline/gov/local_authorities/council_tax_reduction: 336 passed.
    • 26 other YAML files that read CTR: 293 passed.
    • test_council_tax_reduction_tax_deduction_properties.py and test_council_tax_reduction_carer_income_properties.py: 8 passed.
    • Nine other property files that read CTR income: 60 passed, 1 skipped.
    • policyengine_uk/tests/code_health: 3,088 passed.
    • ruff@0.17.2 format --check, check, check --select F811,F821 policyengine_uk, git diff --check: clean.

    Revert and mutation checks

    • At main (scratch worktree), the four scheme cases in council_tax_reduction_tax_deduction.yaml fail on CTR income: £25,954.53 against £27,959.27, £17,648.60 against £18,760.40, £17,492.75 against £18,514, and £14,422.70 against £14,538.30. The Welsh working-age guard passes at main, by design. The deduction outputs don't exist at main, so I checked CTR income only there.
    • Mutation (the new variable returns the whole liability for every scheme): 5 YAML cases fail (the 4 new ones and the updated pension-age carer case), and 4 property tests fail (both supplement tests and the three new invariants). The two-order cycle test still passes under the mutation, as expected; it guards determinism, not the fix.
    • Before the allowance fix, the monotonicity property failed as described in finding 3.

    Changed existing tests

    • council_tax_reduction_carer_support_payment.yaml, the pension-age Scottish carer case: the supplement's tax is no longer deducted. New expected values are deduction £1,145.41, CTR income £17,349.99 and reduction £1,693.16 (was £1,717.50).
    • test_council_tax_reduction_carer_income_properties.py: reads the new deduction and tightens the supplement test to "CTR income and award unchanged", as Council Tax Reduction income deducts the family's whole income tax, not the tax the schemes allow #2090 asked. The HB/CTR differential now nets off the tax HB deducts and CTR does not.

    Skipped and why

    • test_claims_all_entitled_benefits.py::test_survey_takeup_follows_reports_in_microdata: microsimulation test that needs the survey dataset. Skipped locally; this is not a new skip.
    • I didn't run the full suite; CI is the evidence.
    • I didn't reproduce the issue's reference and law figures for scenario 048 (£238.68 and £213.33). The issue gives no bill, location or capital for it. I ran 048 with council tax of £2,000 in each nation instead.
    • I didn't touch the English working-age schemes (SI 2012/2886 and the local schemes the model runs) or the Welsh working-age scheme. Council Tax Reduction income deducts the family's whole income tax, not the tax the schemes allow #2090 quotes no provision for them, so the PR text says Addresses #2090.

    Judgement calls

    • Uncounted income taken as the highest slice of non-savings income (finding 2), rather than pro rata or earnings on top.
    • Benefits in kind sit with earnings in the Scottish working-age scheme (PAYE collects their tax from pay, as person_net_earnings already assumes) and with uncounted income at pension age.
    • Miscellaneous income counts as uncounted at pension age, because the model's CTR income doesn't count it.
    • The Widowed Parent's Allowance £15 disregard and the CSP pre/post-overlap difference don't change the tax attribution: the whole benefit is treated as counted.
    • Step 6 reductions come off the counted tax first; Step 7 charges are shared pro rata to Step 5 tax. Treat income derived from capital as capital in the legacy means tests #1995 instead deducts no Step 7 charges.
    • From 2027-28 the rUK property rates differ from the main rates; the top slice is priced at the main rates.
    • The pensioner earnings disregard still reads council_tax_reduction_net_earnings (the whole-income share in person_net_earnings); this branch leaves it alone.

    Merge notes

    Full list in the PR body. Conflicts this branch causes: #1933 in council_tax_reduction_applicable_income.py, and #1966 in council_tax_reduction_carer_support_payment.yaml. #1995 and #2077 conflict only in files that already conflict with main. #1995 also overlaps in substance: its legacy_means_test_income_tax replaces the same tax line under a different reading. #2799, #2120, #2007 (hub/2007-r5), #2794 and #2768 merge cleanly.


    Generated by Claude Code

  7. MaxGhenis commented on Nov 2, 2026

    @MaxGhenis
    CollaboratorAuthor

    Ready for hub review

    Verdict: REQUEST_CHANGES at 411dc0243dbbadefd56d46389b4b2b6270591eda (branch claude/council-tax-reduction-deductions-clzysl, one commit on 2da212abcf2086337fc088a4a1236f4ae7b6af63).

    The pensioner half is sound: the four YAML cases fail at the base and pass at the head with the figures the hand-off gives, I get the same expected values by hand, and the deduction does not move when uncounted income changes. Three things block. (1) For Scotland's working-age scheme the formula uses the opposite tax split to the ruling main already carries for Pension Credit (#2019, ruling d1424), and the body doesn't say so. (2) The Scottish self-employed rules without Universal Credit use a notional basic-rate tax and Class 4 between the limits, but the formula deducts the real liability while the body claims the law is met. (3) One row of the body's evidence table doesn't reproduce at the base.

    Setup: detached worktrees at base, head and #1995 (1b8f2ded); uv sync --frozen --extra dev; HUGGING_FACE_TOKEN and POLICYENGINE_UK_DEFAULT_DATASET unset. All households are single adults in 2026 with would_claim_uc: false, council tax £2,000 and inputs keyed to 2026, unless stated. Scripts: hh.py, hh2.py, opta.py, misc.py, props.py, order.py, table.py, mut.py (bodies available on request).

    P1

    P1-1. The Scottish working-age split contradicts the split main already uses, and the body doesn't say so

    council_tax_reduction_tax_deduction.py:160-165: in Scotland's working-age scheme the formula treats earnings as the lowest slice of non-savings income. Main has a standing ruling the other way. pension_credit_income_tax_without_employment_income and its siblings on main (from #2019, merged 2026-10-21 at 1fac3a50) carry DECISION = "... settled as option (a): treat earnings as the top slice of the person's income." #2019's body says: "Max's d1424 ruling remains option (a): tax on earnings is the extra tax those earnings cause, including savings-band and partner interactions." The PR body calls its ordering "a modelling choice" and never mentions d1424.

    The ordering decides the result. These are Scotland working-age deductions, CTR income and CTR. "Option (a)" means income tax with the earnings, less income tax with employment_income set to nil, plus NI on earnings. I computed the alternatives by set_input on council_tax_reduction_tax_deduction (hh.py, hh2.py, opta.py):

    Household Head (earnings lowest) Pro rata (non-savings) Earnings top of non-savings Option (a), d1424 Main
    Carer: pay £8,000, private pension £14,000, CSP £4,495.40, SCS £608.40 (care_hours: 35) £0.00 / £26,495.40 / £0 £846.25 / £25,649.14 / £0 £1,600.00 / £24,895.40 / £0 £1,600.00 / £24,895.40 / £0 £2,867.09 / £23,628.31 / £0
    Carer: pay £9,000, pension £5,000, CSP, SCS £0.00 / £18,495.40 / £0 £596.94 / £17,898.46 / £0 £1,267.09 / £17,228.31 / £48.82 £1,267.09 / £17,228.31 / £48.82 £1,267.09 / £17,228.31 / £48.82
    Pay £20,000, pension £10,000 (the YAML case) £2,040.73 / £27,959.27 £2,895.12 / £27,104.88 £4,045.47 / £25,954.53 £4,045.47 / £25,954.53 £4,045.47 / £25,954.53
    Pay £30,000, interest £60,000 £4,845.47 / £25,154.53 £4,845.47 £4,845.47 £14,359.47 / £15,640.53 £24,691.47 / £5,308.53 / CTR £1,932.01
    Pay £30,000, interest £90,000 (PA £2,570) £4,845.47 / £25,154.53 / £0 £6,945.47 / £23,054.53 £6,945.47 / £23,054.53 £18,459.47 / £11,540.53 / £685.61 £40,791.47 / £0 / £2,000
    Pay £30,000, property £20,000 £4,845.47 / £45,154.53 £6,783.63 / £43,216.37 £8,930.12 / £41,069.88 £8,930.12 / £41,069.88 £10,376.45 / £39,623.55

    Pensioner with SCS (the changed CSP YAML case: pension £14,000, CSP, SCS, age 70): head £1,145.41 / £17,349.99 / £1,693.16; main £1,267.09 / £17,228.31 / £1,717.50. At pension age the uncounted-on-top choice is option (a) applied to the supplement ("the extra tax the supplement causes"), so the pensioner half agrees with d1424. The working-age half reverses it.

    What the text supports. Regs 50(3)(a) and 49(6)(b) take off the amount actually "deducted from them" or "paid ... in respect of the employment". The model has no PAYE codes, so no slice ordering is exact. Two facts the body leaves out:

    • The head ordering gives the smallest earnings tax of the four. Where earnings fall below the personal allowance it deducts nothing, even when PAYE would collect tax on gross-paid benefits (CSP, State Pension) through the code on the pay. The £9,000/£5,000 carer loses £48.82 of CTR under this reading.
    • Option (a) breaks the body's invariant 1. Under option (a), the pay pushes savings into higher bands, so the deduction rises with interest (£14,359.47 at £60,000, £18,459.47 at £90,000) and CTR income falls as uncounted income rises. The head ordering and both non-savings orderings keep invariant 1. On my reading the text favours a non-savings ordering over full option (a), because tax on savings is not "deducted from" pay. Between earnings lowest and earnings highest it gives no clear answer. The hub has to rule on that.

    The Scotland working-age YAML case (council_tax_reduction_tax_deduction.yaml:20-48) only fails at main because of this choice. Under earnings-on-top or option (a) its CTR income is £25,954.53, the same as main.

    Replacement for the body's "Limitation: how the tax is split", first paragraph's last two sentences:

    The formula takes the uncounted income as the highest part of that slice. In the pensioner schemes this taxes the uncounted income at the extra tax it causes, as the ruling recorded on #2019 (d1424, option (a)) does for Pension Credit earnings. In Scotland's working-age scheme it puts earnings at the bottom, the reverse of that ruling: earnings take the personal allowance and the lowest bands first, which gives the smallest deduction of any ordering. Option (a) would also count the savings tax that earnings push into higher bands, and then CTR income would fall as savings rise. The hub has to rule on which ordering applies.

    Then replace the carer sentence with the table above, or with its first two rows.

    P1-2. Self-employed earnings without Universal Credit: the formula deducts the real liability, the law a notional one

    council_tax_reduction_tax_deduction.py:27,145-168. Without UC, reg 51(9) of SSI 2021/249 applies regs 37 and 38 of SSI 2012/303. Reg 38(1) prices tax "as if that income was assessable to income tax at the basic rate of tax applicable ... less only the personal relief". Reg 38(2) omits head (a) (Class 2) and limits Class 4 to chargeable income that "exceeds the lower limit but does not exceed the upper limit". SSI 2012/319 regs 36 and 37 say the same at pension age. The formula deducts the actual Scottish-band tax on profits plus all of ni_class_2 and ni_class_4, including the 2% above the upper limit. The body's "reg 51(2) (self-employed with UC) do the same" is true only with UC, and the body never says the non-UC rule differs.

    misc.py, Scotland, self_employment_income only:

    Household Head deduction Law (reg 38: 20% × (profit − £12,570) + 6% × (min(profit, £50,270) − £12,570)) Gap
    Working age, profit £15,000 £607.50 (tax £461.70 at 19%, Class 4 £145.80) £486.00 + £145.80 = £631.80 deduction £24.30 too low
    Working age, profit £60,000 £15,638.65 (tax £13,182.05, Class 4 £2,456.60) £9,486.00 + £2,262.00 = £11,748.00 deduction £3,890.65 too high
    Pension age, profit £15,000 £461.70 £486.00 £24.30 too low

    Main already has a precedent: pension_credit_self_employment_income_tax applies the matching Pension Credit notional rule (CER 1996 reg 14), and #2019's review records it as "basic or Scottish basic rate ... and main-rate Class 4 between the limits". The working-age figures don't depend on the split question, because a self-employed person with no other income gets the same tax under every ordering. Either implement reg 38 and SSI 2012/319 reg 37 for the no-UC and pension-age self-employed (council_tax_reduction_universal_credit_award would select reg 51(2) or 51(9)), or state it as a limitation. If the PR keeps the limitation, the body's Scotland bullet should read:

    Scotland, working age (SSI 2021/249). The formula deducts National Insurance on earnings and profits (Classes 1, 2 and 4) and the income tax on earnings ... For self-employed applicants without Universal Credit, reg 51(9) applies the notional tax of SSI 2012/303 reg 38 (basic rate on profit less the personal allowance, and Class 4 at the main rate between the limits); the formula deducts the real liability instead, which is £3,890.65 too much on a £60,000 profit and £24.30 too little on £15,000. SSI 2012/319 regs 36 and 37 do the same at pension age.

    and the law bullet should read "[reg 51(2)] (self-employed with UC) ... ; without UC, [reg 51(9)] applies SSI 2012/303 regs 37 and 38".

    P1-3. The body's 148 "with the loss" row and the Westminster sentence don't reproduce at the base

    At 2da212abc, miscellaneous_income_before_trading_allowance is max_(0, miscellaneous_income) (policyengine_uk/variables/gov/hmrc/income_tax/bases/miscellaneous_income_before_trading_allowance.py:40). The ring-fence is already on main, so the −£2,399,684 input changes nothing. table.py (pay £510,223, dividends £973,043, interest £108,067, age 40), as whole liability / deduction / CTR income / CTR:

    head 148 SCO  676082.25 244756.45 265466.56 0.0     (loss input)
    head 148n SCO 676082.25 244756.45 265466.56 0.0     (loss nil)
    head 148 WMN  659344.19 659344.19 0.0 2000.0        (Westminster, loss input)
    base 148 SCO  676082.25 676082.25 0.0 2000.0
    base 148 WMN  659344.19 659344.19 0.0 2000.0
    

    The body's row "148: ... £423,320.41 | £12,215.06 | £86,902.59 | £498,007.94 | £0 | £0" and the sentence "With the loss, 148 in Westminster's working-age scheme (unchanged) gives the same CTR income as Wales: £86,902.59 before and after" don't come out of the model at the base or the head. The "loss set to nil" rows do reproduce exactly, and so do all three 048 rows. Replace the 148-with-loss row and the two sentences after the table with:

    On main the model already ring-fences the miscellaneous loss (miscellaneous_income_before_trading_allowance floors it at nil), so 148 gives the same figures with or without it.

    P2

    P2-1. The finance-cost reduction on uncounted property income comes off the earnings tax

    council_tax_reduction_tax_deduction.py:79-95. tax_after_reductions_and_charges takes all Step 6 reductions off the counted part first, and property_finance_cost_relief is one of them (step_6_tax_reductions.yaml). In Scotland's working-age scheme property income is uncounted, so the relief for its finance costs cuts the tax deducted from pay. misc.py, pay £30,000 and property income £20,000:

    property_finance_costs 10,000: deduction 2845.47, property_finance_cost_relief 2000.0
    no finance costs:              deduction 4845.47
    

    PAYE on the pay doesn't change. ITTOIA ss.274A–274AA, cited in #1995's legacy_means_test_income_tax, give the reduction on property profits. #1995 takes it off property_income_tax first. Fix: take property_finance_cost_relief off the uncounted property tax first, and only any excess off the counted part. Docstring line 82, "The Step 6 reductions come off that part first", then needs "except the finance-cost reduction, which comes off the tax on property income first".

    P2-2. Benefits in kind at pension age: the formula drops tax that reg 33(2)(a) deducts

    council_tax_reduction_tax_deduction.py:20-24. At pension age benefits_in_kind sits in the uncounted top slice. SSI 2012/319 reg 33(2)(a) deducts "any amount deducted from those earnings by way of— (i) income tax". That is the same "deducted from" wording the branch reads at working age (reg 50(3)(a)) to keep benefits-in-kind tax with earnings, because PAYE collects it from the pay. misc.py, Scotland, age 70, pay £30,000, company_car_benefit £8,000: deduction £3,451.07, the tax on the pay alone. The £8,000 adds 8,000 × 21% = £1,680 that the formula doesn't deduct. At working age the same household gets £6,525.47, the whole liability. Judgment call 2 treats the two schemes in opposite ways under the same words. I couldn't check England and Wales (no text for their net-earnings rules). Either move benefits_in_kind out of PENSIONER_UNCOUNTED_NON_SAVINGS_INCOME for Scotland at least, or state in the body that reg 33(2)(a) reads like reg 50(3)(a) and the formula departs from it.

    P2-3. Invariant 5's "reads ... no family benefit" is false

    order.py traced council_tax_reduction_tax_deduction for each new YAML case. The tree reaches income_support, jsa_income, esa_income, universal_credit_pre_benefit_cap and child_benefit. The first four come through council_tax_reduction_pensioner → council_tax_reduction_relevant_income_based_benefit (council_tax_reduction_pensioner.py:67); child_benefit comes through income tax (HICBC). These are reads council_tax_reduction_applicable_income already made. Both orders give identical CTR and deductions in all five cases (for example 1,754.74 and 461.70 in the Scotland pensioner case), so there's no cycle. Replacement:

    1. Determinism and no cycle: council_tax_reduction and the deduction come out the same whichever is calculated first. Besides income tax and National Insurance, the deduction reads council_tax_reduction_pensioner, which reads the income-related benefits and Universal Credit, as council_tax_reduction_applicable_income already did; it reads no award that depends on Council Tax Reduction.

    P2-4. "The savings-credit-only routes do not deduct tax" is false

    council_tax_reduction_applicable_income.py takes pension_credit_income on that route, and pension_credit_income.py:53-67 deducts income_tax_before_winter_fuel_payment_charge and national_insurance. Replacement:

    The pensioner schemes' guarantee credit route deducts nothing, and the savings-credit-only route uses Pension Credit income, which still deducts the whole liability (#1954); this PR leaves both unchanged.

    P2-5. Overlap with #1995: the two readings disagree, and each is partly wrong

    git merge-tree --write-tree --name-only gives exactly the body's merge notes (outputs below). On substance, from hh.py, hh2.py and misc.py at 1b8f2ded (legacy_means_test_income_tax = earned_income_tax less reductions):

    Household This branch: deduction / CTR income / CTR #1995
    Scotland working age, pay £20,000, pension £10,000 £2,040.73 / £27,959.27 £4,045.47 / £25,954.53 (deducts the pension's tax)
    Carer, pay £9,000, pension £5,000, CSP, SCS £0 / £18,495.40 / £0 £1,267.09 / £17,228.31 / £48.82
    Pay £30,000, interest £90,000 £4,845.47 / £25,154.53 £6,945.47 / £23,054.53 (keeps the taper caused by interest)
    Pay £30,000, property £20,000 counts the property, deducts no tax on it: £45,154.53 doesn't count it: £25,154.53
    Pensioner, pension £14,000, CSP, SCS £1,145.41 / £17,349.99 / £1,693.16 £1,267.09 / £17,228.31 / £1,717.50 (deducts the SCS tax)

    The quoted law backs this branch on the working-age pension tax (reg 50(3)(a), and regs 57 to 65 with no deduction) and on the supplement (reg 27(1)(j)(xxib) and reg 31(12)). It backs #1995 on the finance-cost ordering (P2-1). Whether property income counts at all is #1995's own question, and none of the law quoted here settles it. Before both land, #1995 has to route the CTR line through council_tax_reduction_tax_deduction, not legacy_means_test_income_tax, because #1995's helper re-deducts the pension and supplement tax in Scotland. This branch has to adopt #1995's finance-cost ordering. The body's "Whichever lands second should route both through one helper" is right but should name these two points.

    P2-6. No test can fail on Class 3 (hand-off finding 5)

    Adding ni_class_3 back to NATIONAL_INSURANCE_ON_EARNINGS (line 27) leaves all 17 YAML cases and all 8 property tests passing (table below). misc.py shows the head gets it right: pay £20,000 with ni_class_3 £900 deducts £2,040.73, not £2,940.73. Add a YAML case: Scotland, age 40, employment_income: 20_000, ni_class_3: 900, would_claim_uc: false, expecting council_tax_reduction_tax_deduction: 2_040.73 (worked as in the first case: 1,446.33 + 594.40; Class 3 is voluntary and not charged on earnings) and council_tax_reduction_applicable_income: 17_959.27.

    P3

    1. Marriage Allowance. restored_allowance (line 57) shields the counted income from the personal-allowance taper but not from losing Marriage Allowance. props.py raised a Welsh pensioner partner's savings by £70,000 and added £40,000 of dividends, with the pension fixed. The partner stopped qualifying as recipient (marriage_allowance 1,260 → 0) and the benefit unit's deduction rose by £252.00. This is the same pattern as hand-off finding 3, through a different allowance, and Apply the Pension Credit earnings disregards (SPC Regs 2002 Sch VI) #2019 handled it ("Hold ... marriage_allowance ... consistently"). Fix it or name it in the docstring.
    2. Class 2. NATIONAL_INSURANCE_ON_EARNINGS includes ni_class_2, and reg 38(2)(a) and SSI 2012/319 reg 37(2)(a) omit it. ni_class_2 is £0 in 2026 for every self-employed case I ran, so no figure changes. Docstring line 25 should say "Class 2 contributions count only where the model charges them".
    3. Writing rules (regulations, documents and rules acting; passives). Replacements:
      • Body line 20: "Reg 49(6)(b) ... and reg 51(2) ... do the same" → "The formula applies the same deduction under [reg 49(6)(b)] (applicants with UC) and [reg 51(2)] (self-employed with UC)."
      • Body line 23 and YAML line 118: "SSI 2012/319 reg 27(1)(j)(xxib) excepts the Scottish Carer Supplement" → "The Scottish pensioner scheme does not count the Scottish Carer Supplement as income (SSI 2012/319 reg 27(1)(j)(xxib))."
      • Body line 27 and docstring line 124: "The regulations name the tax deducted from earnings ... they do not say how to apportion" → "Parliament and the Scottish Ministers set the deduction as the tax deducted from earnings or payable on counted income (regs 50(3)(a) and 31(12)); they gave no rule for apportioning one liability between kinds of non-savings income."
      • Body lines 14 and 83: "Issue Council Tax Reduction income deducts the family's whole income tax, not the tax the schemes allow #2090 quotes no provision for these" → "The hub has no text for these schemes' rules, so this PR leaves them open."
      • YAML line 5: "regs 49(6)(b) and 51(2) do the same, and the unearned income rules (regs 57 to 65) deduct no tax" → "the Scottish Ministers set the same rule with Universal Credit (regs 49(6)(b) and 51(2)) and gave no tax deduction for unearned income (regs 57 to 65)."
      • Docstring lines 33-40: "Savings and dividend income are taxed as the highest part of income ... its tax at the person's main rates is taken off ... is restored to it" → "HMRC taxes savings and dividend income as the highest part of income, so the formula takes the Step 5 tax on the rest as earned_income_tax plus property_income_tax. It treats top_slice as the highest part of non-savings income, prices it at the person's main rates and takes that tax off. It restores to the income below the part of the personal allowance that the top slice, savings and dividends withdraw by lifting adjusted net income above the taper threshold."
      • Docstring lines 84 and 122, "are shared in proportion" → "the formula shares ... in proportion"; line 120, "Tax on savings and dividend income is never deducted" → "The formula never deducts tax on savings and dividend income".
      • Changelog: "Council Tax Reduction income now deducts" → "The model now deducts from Council Tax Reduction income only the income tax and National Insurance each scheme allows: ..."
    4. Axiom packet.
      • Quotations: reg 50(3)(a) and reg 31(12) match the text word for word. SI 2012/2885 para 17(13) and WSI 2013/3029 para 11(13) read "a person’s income" with a curly apostrophe; the packet has "person's". Make it "person’s".
      • The hub now has the text of reg 49(6)(b), reg 51(2) step 3 and reg 27(1)(j)(xxib). The packet should quote them, and add reg 51(9) with SSI 2012/303 reg 38(1)–(2) given P1-2, in place of "Their text is not quoted here".
      • Companion case 2 says "The scheme does not take the interest into account as income". The English pensioner provisions quoted here don't say that, and SSI 2012/319 reg 27(1)(i) lists "income from capital other than capital disregarded under Part 1 of Schedule 4", whose Schedule nobody quoted. Mark this as resting on unquoted provisions.
      • Companion case 1's note "the only case where the regulations leave no apportionment to choose" is too strong: HMRC can code untaxed dividends into PAYE. Suggest "assuming PAYE deducts from the pay only the tax on the pay".
      • I worked all four companion values by hand and they're right (£2,040.73, £1,547.60, £1,486.00, £461.70). The model gives the same for case 1 (pay £20,000, dividends £9,000: 2,040.73) and for the YAML forms of cases 2 to 4.
    5. Outside this diff, both trees. A Scottish 70-year-old with pay £86,381, pension £38,831 and interest £150,000 gets pension_credit £2,660.16 (and CTR income 0 by the guarantee route) at the base and the head. Worth its own issue.

    Mutation checks

    The YAML set is council_tax_reduction_tax_deduction.yaml plus council_tax_reduction_carer_support_payment.yaml (17 cases). The property set is the two CTR property files (8 tests). Each mutant was applied to a scratch copy of the head with PYTHONPATH pinned to it, then restored (the restore diffs clean against the head).

    Mutant YAML (17) Property tests (8) Result
    Whole liability in every scheme (the author's) 5 failed (the 4 scheme cases, the CSP pension-age case) 4 failed killed; matches the hand-off
    Earnings tax pro rata to non-savings income 1 failed (Scotland working age) 2 failed (test_scottish_working_age_income_never_falls_..., test_council_tax_reduction_income_ignores_the_scottish_carer_supplement) killed
    Class 3 added to NATIONAL_INSURANCE_ON_EARNINGS 17 passed 8 passed survived (P2-6)
    Whole liability at pension age 4 failed (3 pensioner cases, CSP pension-age case) 2 failed (supplement test, test_pensioner_schemes_deduct_no_more_...) killed
    Tax on the Scottish Carer Supplement deducted at pension age 2 failed (Scotland pensioner case, CSP pension-age case) 2 failed (same two) killed
    restored_allowance removed 17 passed 2 failed (..._income_never_falls_..., test_pensioner_schemes_...) killed by properties only
    Float guard at line 76 removed 17 passed 1 failed (test_scottish_working_age_deducts_no_tax_without_earnings) killed by properties only

    The Class 3 mutant leaves every tested output unchanged, so its run (17 and 8 passed) is also the head's own result for these files.

    Checked and sound

    • Base vs head, new and changed YAML (policyengine-core test). Head: 17 passed. Base, with the new file minus its council_tax_reduction_tax_deduction outputs, plus the head's CSP file: 5 failed, 12 passed, matching the hand-off: [25954.527] differs from 27959.27, [17648.6] ... 18760.4, [17492.75] ... 18514.0, [14422.704] ... 14538.30, and the CSP pension-age case [17228.31] ... 17349.99. The Welsh guard passes at the base as intended.

    • By hand from the law. The Scotland working-age case: 7,430 taxable, 753.73 + 692.60 = 1,446.33; Class 1 (20,000 − 12,569.96) × 8% = 594.40; total 2,040.73, given the earnings-lowest choice. The England pensioner case: (20,308 − 12,570) × 20% = 1,547.60, by reg 31(12) / para 17(13). The Scotland SCS case: 2,430 × 19% = 461.70. The CSP pension-age case: 5,925.40 taxable → 753.73 + 391.68 = 1,145.41; CTR 2,000 − 0.2 × (17,349.99 − 15,815.80) = 1,693.16. That CSP expectation follows reg 27(1)(j)(xxib) and reg 31(12), not just the new code. The carer property file's tightened invariant (CTR income and award unchanged by the supplement) follows the same law. Its HB differential nets off the tax only HB deducts, which keeps HB's own over-deduction (Pension Credit income still omits IIDB, SDA, the AFCS guaranteed income payment and other countable income #1954) visible, not hidden.

    • Scheme map, read from simulated_council_tax_reduction_benunit.py, config.py and the local scheme files:

      • England pensioner (all councils, including the five local ones), Wales pensioner and Scotland pensioner take the counted-income branch.
      • Scotland working age takes the earnings branch.
      • Wales working age and the Merton, Kingston upon Thames, Newham, Westminster and Oxford working-age schemes take the whole liability (they read council_tax_reduction_applicable_income through _legacy.py or directly).
      • The English default working-age scheme isn't simulated: council_tax_reduction_scheme_supported falls back to reported CTR. Northern Ireland gets the whole liability.
      • Addresses #2090 and the open list agree with this.
    • The author's counterexample. Pay £30,000 with interest £60,000 and £90,000: deduction £4,845.47 in both (PA £12,570, then £2,570), CTR income £25,154.53. Main gives CTR income £5,308.53 and £0. By hand: 17,430 taxable → 753.73 + 2,597.80 + 99.54 = 3,451.07, plus Class 1 1,394.40 = 4,845.47.

    • My properties (props.py, 60 random cases each, earnings, self-employment and pension random, then one kind of uncounted income raised):

      • The deduction changed by at most ±£0.02 for Scotland working age (pension, interest, dividends, property, miscellaneous), Scotland pensioner (interest, dividends, miscellaneous), England pensioner (interest, dividends, miscellaneous) and Wales pensioner (interest, dividends).
      • Scottish working-age CTR income never fell by more than £0.02. It does fall at pension age, but only through a pre-existing Pension Credit route (P3-5); the deduction stays fixed.
      • Over 150 random households, the deduction minus the whole liability had a maximum of 0.0.
      • Scotland working age with no earnings: maximum deduction 0.0 (5 cases).
      • Partner's uncounted income: the deduction stays fixed apart from Marriage Allowance (P3-1).
      • The SCS case: hh2.py above; the deduction doesn't move with the supplement.
    • Float guard (line 76). It doesn't zero real pennies. Pay £12,570.00 / .10 / .50 / 1 / 5 / 20 with pension £10,000 gives deductions 0.0032 / 0.0301 / 0.1382 / 0.2732 / 1.3531 / 5.4031 (tax plus NI). Pensioner pension £12,570 + 0.10 / 0.50 / 1 / 5 gives 0.0189 / 0.095 / 0.19 / 0.95.

    • Rates. tax_at_main_rates uses Scottish rates where pays_scottish_income_tax, otherwise UK rates (Welsh rates equal UK rates in the model), with the same gift aid extension as earned_income_tax. The 2027-28 and 2028-29 property-rate note: an English pensioner with pension £30,000, property £20,000 and miscellaneous £15,000 gets deduction £8,286.00 with or without the miscellaneous income. That equals income tax before the winter fuel payment charge without it (income_tax £8,486 includes the £200 charge), so the main-rate pricing of the top slice leaves the counted tax exact there.

    • Class 3. ni_class_3 £900 on pay £20,000: deduction £2,040.73, unchanged.

    • Determinism (order.py). For each of the five new cases, council_tax_reduction first and the deduction first give identical results.

    • Merge-tree (git merge-tree --write-tree --name-only), head vs each and base vs each:

    • Fix evidence. python3 .github/check_fix_pr.py --title-file … --body-file … --labels-file (empty) --changes-file <(git diff -z --name-status 2da212abc...411dc0243) --repo-root . --head-sha 411dc024… gives Fix evidence: PASS ... Changed executable tests: 4. (exit 0). The title is 55 characters.

    • Lint. uvx ruff@0.17.2 format --check (4 files already formatted), ruff check (all passed), and git diff --check (clean) on the changed Python files.

    • 048 rows. England, Wales and Scotland reproduce exactly, before and after (for example England 2,659.40 → 1,547.60, 17,648.60 → 18,760.40, CTR 1,132.68 → 910.32). So do the two 148 "loss nil" rows.

    • CTR YAML directory (policyengine-core test policyengine_uk/tests/policy/baseline/gov/local_authorities/council_tax_reduction -c policyengine_uk): 336 passed at the head; 336 passed on a local merge of the head with main 46a60678 (clean merge; nothing pushed).

    What I couldn't check

    • SI 2012/2885 and WSI 2013/3029 net-earnings and self-employed provisions (the English and Welsh analogues of regs 33, 36 and 37): no text. P1-2 and P2-2 are shown for Scotland only.
    • SSI 2012/319 Sch 4 Part 1 and the English and Welsh capital provisions, which decide whether actual interest and dividends are "income taken into account" at pension age.
    • The English default working-age scheme and the Welsh working-age scheme: no text, and the model doesn't simulate the former.
    • The issue's 048 reference and law figures (£238.68, £213.33): the issue doesn't give the bill, area or capital behind them.
    • The hand-off's other runs (26 other YAML files, nine other property files, tests/code_health): not rerun.
    • Whether HMRC in practice codes CSP and State Pension tax into a claimant's employment PAYE code. The table gives the figures; the practice is a fact I can't cite.

    Generated by Claude Code

  8. MaxGhenis commented on Nov 2, 2026

    @MaxGhenis
    CollaboratorAuthor

    Picking this up for the UK hub. Reply here if you're mid-change and I'll stop.


    Generated by Claude Code

  9. MaxGhenis commented on Nov 2, 2026

    @MaxGhenis
    CollaboratorAuthor

    PR_TITLE.txt

    Deduct only the tax Council Tax Reduction schemes allow
    
    

    Generated by Claude Code

  10. MaxGhenis commented on Nov 2, 2026

    @MaxGhenis
    CollaboratorAuthor

    PR_BODY.md

    Addresses #2090
    
    Reproducer: policyengine_uk/tests/policy/baseline/gov/local_authorities/council_tax_reduction/council_tax_reduction_tax_deduction.yaml::England's pensioner scheme deducts no tax on savings interest
    
    axiom: hub fills this line
    
    ## What the code does now
    
    `council_tax_reduction_applicable_income` deducted every applicant's and partner's whole `income_tax_before_winter_fuel_payment_charge` and `national_insurance` in every scheme. It now deducts a new BenUnit variable, `council_tax_reduction_tax_deduction`, which holds the income tax and National Insurance each scheme allows.
    
    Write T for the applicant's and partner's (`is_council_tax_reduction_applicant_or_partner`) total income tax before the winter fuel payment charge, and T(X) for the same total with every person's X set to nil on a dropped branch (main's `income_tax_with_inputs_zeroed`). E is employed earnings: employment income and statutory sick, maternity and paternity pay. S is self-employment income. U is the taxed income the pensioner schemes do not count. The formula deducts:
    
    - **Scotland, working age, without Universal Credit** (SSI 2021/249 reg 50(3)(a) and reg 51(9)): max(0, T − T(E)), plus primary Class 1 contributions, plus the notional amount on S.
    - **Scotland, working age, with Universal Credit** (reg 49(6)(b) and reg 51(2) step 3): max(0, T − T(E, S)), plus the Class 1, 2 and 4 contributions charged. The formula takes "with Universal Credit" as the benefit unit's award going to the applicant (`applicant_has_universal_credit`).
    - **The pensioner schemes of England (SI 2012/2885), Wales (WSI 2013/3029) and Scotland (SSI 2012/319)**: max(0, T − T(E)) for employed earnings; plus T(E, S, U), the tax on the other counted income with the uncounted income above it; plus the notional amount on S, which replaces the tax the profit bears; plus primary Class 1 contributions.
    - **Unchanged:** the English working-age schemes the model runs (Merton, Kingston upon Thames, Newham, Westminster, Oxford), the Welsh working-age scheme and families outside Great Britain still deduct the whole liability and all National Insurance. The hub has no text for these schemes' rules, so this PR leaves them open.
    
    The formula reuses main's Pension Credit variables for the branches: `pension_credit_income_tax_without_employment_income` gives T(E) and `pension_credit_income_tax_without_earnings` gives T(E, S), person by person. A new Person variable, `council_tax_reduction_income_tax_on_other_counted_income`, gives T(E, S, U), building its branch only when someone has uncounted income; otherwise it returns T(E, S). The deduction reads each branch only when some benefit unit is in a scheme that uses it.
    
    U is the taxed income that `council_tax_reduction_applicable_income` leaves out on the pensioner route: the Scottish Carer Supplement, miscellaneous income, benefits in kind, savings interest, other investment income and dividends. The formula zeroes the inputs (`scottish_carer_supplement`, `miscellaneous_income`, `benefits_in_kind`, `savings_interest_income`, `other_investment_income`, `dividend_income`); a test shows each one, including the computed supplement, leaves income tax on the branch. The pensioner route counts Widowed Parent's Allowance less £15 a week, and the formula does not take that £15 out of T(E, S, U).
    
    E matches main's Pension Credit list (`gov.dwp.pension_credit.guarantee_credit.statutory_payments`: statutory sick, maternity and paternity pay). Each scheme also counts statutory adoption, shared parental, parental bereavement and neonatal care pay as earnings (reg 50(2)(j) and reg 49(4); SSI 2012/319 reg 32(1)(h) to (j); SI 2012/2885 Sch 1 para 18(1)(h) to (l); WSI 2013/3029 Sch 1 para 12(1)(h) to (jc)), and the Scottish working-age scheme the Northern Ireland equivalents; the model has no variables for those, as the Pension Credit list notes.
    
    ### How the tax is split
    
    No provision gives a rule for apportioning one income tax liability between kinds of income. Parliament and the Scottish Ministers set the deduction as the tax deducted from earnings or payable on counted income (regs 50(3)(a) and 31(12)). The formula follows the choice main's Pension Credit code records, settled on #2019 as option (a): the tax on earnings is the extra tax the earnings cause, with the earnings as the top slice of income. Self-employed profit sits beneath employed earnings, as main orders them for Pension Credit, so T(E) keeps S, and the pensioner formula leaves out the tax S bears, which the notional amount replaces.
    
    So the tax on earnings includes any tax the earnings add on savings, dividends and property income, and through the Marriage Allowance. At working age in Scotland the deduction now moves with uncounted savings, dividends and property income wherever earnings push that income into higher bands, and Council Tax Reduction income can fall as that income rises. Pay £30,000 with savings interest of £60,000 gives a deduction of £14,359.47 and CTR income of £15,640.53; with interest of £90,000 the deduction is £18,459.47 and CTR income £11,540.53. The build's first invariant (CTR income never falls as unearned income rises) no longer holds there, as the ruling intends.
    
    Benefits in kind stay in both terms of each difference, because no scheme counts a payment in kind as earnings (reg 50(3)(e); reg 49(2)(a); SSI 2012/319 reg 32(2)(a); SI 2012/2885 Sch 1 para 18(2)(a); WSI 2013/3029 Sch 1 para 12(2)(a)). A Scottish household with pay £30,000 and a £8,000 company car benefit gets a deduction of £6,525.47 at working age (income tax £5,131.07 and Class 1 £1,394.40) and £5,131.07 at age 70 (the same income tax; no Class 1 above pension age). The car benefit alone falls within the personal allowance, so in both schemes the deduction includes all the tax it adds. With a £15,000 car benefit, the £461.70 the car benefit would bear on its own comes off neither scheme's deduction (£7,814.75 at working age, £6,420.35 at age 70).
    
    Two consequences of the definition:
    
    - **Property finance costs.** Pay £30,000 and property income £20,000 in Scotland at working age: with no `property_finance_costs` the deduction is £8,930.12 and CTR income £41,069.88; with £10,000 of finance costs it is £8,376.45 and £31,623.55. With the pay, `property_finance_cost_relief` takes £2,000 off the tax. Without the pay, the property income bears only £1,446.33 of tax, and the reduction takes all of it. So the costs lower T by £2,000 and T(E) by £1,446.33, and the deduction falls by the £553.67 of reduction that only the pay's tax can absorb.
    - **Marriage Allowance at pension age.** A Welsh pensioner couple (pensions £9,000 and £30,000) whose recipient partner gains £70,000 of savings interest and £40,000 of dividends loses Marriage Allowance (£1,260 to nil). The deduction stays at £3,234 because T(E, S, U) zeroes everyone's uncounted income, so the branch keeps the allowance. The couple's CTR income still falls, from £35,766 to nil, because the larger tax takes them onto the Pension Credit guarantee credit route (the follow-up issue on Pension Credit's tax deduction covers that).
    
    ### Self-employed profit
    
    These rules set a notional amount, so no ordering choice arises.
    
    - **Scotland, working age, without Universal Credit.** Reg 51(9) applies SSI 2012/303 regs 37 and 38. Reg 38(1) prices income tax at the basic rate on chargeable income "less only the personal relief to which the applicant is entitled under section 35(1)"; reg 38(2)(b) prices Class 4 at the main rate between the lower and upper limits. The formula reads the s. 35(1) relief as the allowance s. 35(2) leaves after the taper, because s. 35(2) reduces "the allowance under subsection (1)".
    - **Scotland, pension age.** SSI 2012/319 reg 37 sets the same rule with the relief under ITA 2007 "sections 36 or 37". Finance Act 2014 omitted s. 36, and s. 37 gives "the section 35 amount" (where that exceeds £10,660) only to a person born before 6 April 1938. The formula reads the reference as the tapered s. 35 allowance for every applicant, including one born after 5 April 1938, for whom a literal reading would leave no relief at all. A new Person variable, `council_tax_reduction_scotland_self_employment_deductions`, prices both Scottish rules.
    - **England and Wales, pension age.** SI 2012/2885 Sch 1 para 30 and WSI 2013/3029 Sch 1 para 24 price income tax at the basic rate less the personal reliefs of ITA 2007 Part 3 Chapters 2, 3 and 3A (England adds the Scottish basic rate for a Scottish taxpayer), and Class 4 as in Scotland. Main's `pension_credit_self_employment_deductions` prices the same reliefs for Pension Credit, and the formula reuses it. The Welsh text has no Scottish clause; the model treats nobody living in Wales as a Scottish taxpayer, so the two give the same figures.
    - **Class 2.** Each rule had a Class 2 head, (a), that the current text omits. SI 2024/377 omitted it from SSI 2012/303 reg 38(2), SSI 2012/319 reg 37(2) and SI 2012/2885 Sch 1 para 30(3) on 6 April 2024; SI 2025/59 omitted it from WSI 2013/3029 Sch 1 para 24(3) for schemes made for financial years beginning on or after 1 April 2025. The Scottish variable counts Class 2 for years before 2024-25. The reused Pension Credit variable counts Class 2 until 6 April 2024; for Wales in 2024-25 that gives the same nil, because the model's compulsory Class 2 rate is nil from 6 April 2024. Class 2 also counts with Universal Credit wherever the model charges it.
    - **Bounds.** The notional amount can exceed the tax the person pays, as the law intends: a £15,000 profit in Scotland at working age gives £631.80 (£486 income tax and £145.80 Class 4) against the £607.50 the person pays. A £60,000 profit gives £11,748, against £15,638.65 paid.
    - **Child minders and partnerships.** SSI 2012/303 reg 38(3)(b) and the matching heads (SSI 2012/319 reg 37(3)(b), SI 2012/2885 Sch 1 para 30(4)(b), WSI 2013/3029 Sch 1 para 24(4)(b)) make a child minder's chargeable income one-third of the earnings. The model does not identify child minders, so it treats every profit as chargeable income in full. For a partnership the rules apply to the person's share of the profit; the model holds one `self_employment_income` per person and takes it as that share. It also sums a person's trades, where the rules treat each employment apart.
    
    ### Other limitations
    
    - The pensioner earnings disregard still reads `council_tax_reduction_net_earnings`, which apportions tax by earnings' share of all income (`person_net_earnings`). This PR does not change it.
    - The pensioner schemes' guarantee credit route deducts nothing, and the savings-credit-only route uses Pension Credit income, which still deducts the whole liability (#1954); this PR leaves both unchanged.
    
    ## The law
    
    - [SSI 2021/249 reg 50(3)(a)](https://www.legislation.gov.uk/ssi/2021/249/regulation/50): "Earnings do not include— (a) any amount deducted from them by way of income tax or primary Class 1 contributions under the 1992 Act". The formula applies the same deduction under [reg 49(6)(b)](https://www.legislation.gov.uk/ssi/2021/249/regulation/49) (applicants with UC) and [reg 51(2)](https://www.legislation.gov.uk/ssi/2021/249/regulation/51) step 3 (self-employed with UC). Without UC, [reg 51(9)](https://www.legislation.gov.uk/ssi/2021/249/regulation/51) applies SSI 2012/303 regs 37 and 38. Part 6 Chapter 4 (unearned income, regs 57 to 65) has no tax deduction.
    - [SSI 2012/303 reg 38](https://www.legislation.gov.uk/ssi/2012/303/regulation/38) and [SSI 2012/319 reg 37](https://www.legislation.gov.uk/ssi/2012/319/regulation/37): notional income tax at the basic rate less only the personal relief, and Class 4 between the limits.
    - [SSI 2012/319 reg 31(12)](https://www.legislation.gov.uk/ssi/2012/319/regulation/31): "In the case of any income taken into account for the purpose of calculating a person's income, any amount payable by way of tax must be disregarded." [Reg 33(2)(a)](https://www.legislation.gov.uk/ssi/2012/319/regulation/33) deducts "any amount deducted from those earnings by way of— (i) income tax; or (ii) primary Class 1 contributions under the 1992 Act".
    - [SI 2012/2885 Sch 1 para 17(13)](https://www.legislation.gov.uk/uksi/2012/2885/schedule/1/paragraph/17) and [WSI 2013/3029 Sch 1 para 11(13)](https://www.legislation.gov.uk/wsi/2013/3029/schedule/1/paragraph/11): "In the case of any income taken into account for the purpose of calculating a person’s income any amount payable by way of tax is disregarded." [SI 2012/2885 Sch 1 para 19(2)(a)](https://www.legislation.gov.uk/uksi/2012/2885/schedule/1/paragraph/19) and [WSI 2013/3029 Sch 1 para 13(2)(a)](https://www.legislation.gov.uk/wsi/2013/3029/schedule/1/paragraph/13) deduct the income tax and primary Class 1 deducted from earnings; [para 30](https://www.legislation.gov.uk/uksi/2012/2885/schedule/1/paragraph/30) and [para 24](https://www.legislation.gov.uk/wsi/2013/3029/schedule/1/paragraph/24) price self-employed profit notionally.
    - The Scottish pensioner scheme does not count the Scottish Carer Supplement as income (SSI 2012/319 reg 27(1)(j)(xxib)).
    
    ## The issue's households, before and after
    
    Single adults in 2026, council tax £2,000, no capital, built by hand from the figures in the issue's comment. The issue does not give the bill, the location or the capital behind scenario 048's interest, so the issue's reference (£238.68) and law (£213.33) figures are not reproduced here.
    
    | Household | Scheme | CTR tax deduction before | after | CTR income before | after | CTR before | after |
    |---|---|---|---|---|---|---|---|
    | 048: £20,308 pension, £6,559 interest, age 75 | England pensioner | £2,659.40 | £1,547.60 | £17,648.60 | £18,760.40 | £1,132.68 | £910.32 |
    | 048 | Wales pensioner | £2,659.40 | £1,547.60 | £17,648.60 | £18,760.40 | £1,132.68 | £910.32 |
    | 048 | Scotland pensioner | £2,619.73 | £1,507.93 | £17,688.27 | £18,800.07 | £1,124.75 | £902.39 |
    | 148: £510,223 pay, £973,043 dividends, £108,067 interest | Scotland working age | £676,082.25 | £259,296.41 | £0 | £250,926.59 | £2,000 | £0 |
    | 148 | Wales working age (unchanged) | £659,344.19 | £659,344.19 | £0 | £0 | £2,000 | £2,000 |
    
    The "before" deductions are the whole income tax before the winter fuel payment charge plus National Insurance. In 048 the £1,547.60 is (£20,308 − £12,570) × 20%, the figure the issue gives as deductible. In 148 the deduction is the tax the pay adds, including the tax it adds on the dividends and interest, plus £12,215.06 of Class 1. On `main` the model already ring-fences the miscellaneous loss (`miscellaneous_income_before_trading_allowance` floors it at nil), so 148 gives the same figures with or without it.
    
    ## Invariants
    
    The property tests check each one.
    
    1. At working age in Scotland without self-employment income, the deduction less primary Class 1 contributions equals `pension_credit_employment_income_tax` wherever the CTR applicant and partner are the Pension Credit claimant and partner (a differential test against main's Pension Credit code).
    2. In every pensioner scheme, with no employed earnings, the deduction does not change when any uncounted income changes, for either member of a couple, apart from the notional amount on profit, which reads the reliefs to which the person is entitled and so can taper.
    3. The deduction is never negative. Without self-employment income it never exceeds `income_tax_before_winter_fuel_payment_charge` plus `national_insurance`; with it, the notional amount can take it above that, as the law intends, but never above the liability plus the notional amount.
    4. At working age in Scotland, with no earnings and no profit, the deduction is nil.
    5. Raising employment income never raises `council_tax_reduction` at working age in Scotland without Universal Credit, except across a cliff in the income tax system. A Scottish couple whose pay rises from £43,661 to £43,662 loses Marriage Allowance (deduction up £264.89) and its reduction rises by £52.78; the personal savings allowance falling as a person enters a higher band does the same. Both are intended; the test exempts draws where `marriage_allowance` or `savings_allowance` changes.
    6. A non-dependant's income never changes the deduction.
    7. Determinism and no cycle: `council_tax_reduction` and the deduction come out the same whichever is calculated first. Besides income tax and National Insurance, the deduction reads `council_tax_reduction_pensioner`, which reads the income-related benefits and Universal Credit, as `council_tax_reduction_applicable_income` already did, and `universal_credit` for the Scottish working-age route; it reads no award that depends on Council Tax Reduction.
    
    The Scottish Carer Supplement leaves CTR income and the award unchanged under the general rules where the family has no earnings; with earnings it changes CTR income only through the deduction, and never lowers the award.
    
    ## Tests
    
    - `council_tax_reduction_tax_deduction.yaml` (17 cases, each worked by hand in a comment). At `main` (`2da212abc`, with the deduction outputs removed because the variable does not exist there) 15 fail and 2 pass: the Scottish working-age guard with pay £20,000 and a £10,000 pension, which now gives `main`'s figure (CTR income £25,954.53), and the Welsh working-age guard. The failing cases cover savings interest with pay (£14,359.47), property income with pay (£8,930.12), benefits in kind above the personal allowance (£7,814.75), notional tax on £15,000 and £60,000 of profit (£631.80 and £11,748), a Universal Credit family with profit and savings (£3,607.50), 2023-24 with Class 2 (£2,334.10), voluntary Class 3 (£2,040.73, not £2,940.73), the English, Welsh and Scottish pensioners with uncounted income, an English pensioner with pay and interest (£5,000), and pensioners with a £60,000 profit in each nation (£9,486).
    - `council_tax_reduction_carer_support_payment.yaml`: the pension-age Scottish carer case expects no deduction for the supplement's tax (deduction £1,145.41, CTR income £17,349.99, reduction £1,693.16); it fails at `main`.
    - `test_council_tax_reduction_tax_deduction_properties.py`: invariants 1 to 7, plus a test that the T(E, S, U) branch takes each uncounted income out of income tax, including the computed Scottish Carer Supplement. Each test records the scheme of each household as a Hypothesis event. Share of examples drawing each route (25 examples each): invariant 1, Scottish working age without UC 57%, with UC 43%; invariant 2, Scotland, Wales and England pensioners 48%, 44%, 37%; invariant 3, all seven routes (England working age 54%, Scotland pensioner 38%, Scotland working age without UC 19%, England pensioner 15%, Wales working age 15%, Wales pensioner 12%, Scotland working age with UC 8%); invariant 4, with UC 88%, without 84%; invariant 5, Scotland working age without UC 96%, with 15% crossing a tax cliff; invariant 6, all seven routes.
    - `test_council_tax_reduction_carer_income_properties.py`: the supplement invariant now allows the change in the deduction where the family has earnings.
    - `test_council_tax_reduction_pension_credit_properties.py` computed CTR income on the general route with the whole liability; it now reads `council_tax_reduction_tax_deduction`. `test_trading_loss_properties.py` held income tax as an input, which the branches then read unchanged; it now also holds the deduction from the with-loss side.
    - Mutants, each alone in a scratch copy, against the two YAML files (29 cases): the earlier earnings-lowest split, 12 fail; earnings as the top of non-savings income only, 3 fail (savings with pay, benefits in kind, English pensioner pay with interest); the tax the profit bears in place of the notional amount, 6 fail (every notional case); the earlier pensioner split with the uncounted income on top, 4 fail (pensioner pay with interest, three pensioner profit cases); Class 3 deducted, 1 fails (the Class 3 case); benefits in kind zeroed with the earnings, 1 fails (the benefits-in-kind case).
    - Runs at the head: CTR YAML directory 348 passed; 29 other YAML files that read CTR or the reused Pension Credit variables 345 passed; the new property file 8 passed; the carer property file 4 passed; 39 other Python test files that read CTR or the reused Pension Credit helpers 443 passed, 3 failed and 1 skipped, and after the two oracle changes above the two affected files 21 passed; the skip is `test_claims_all_entitled_benefits.py::test_survey_takeup_follows_reports_in_microdata`, which needs the survey dataset; `tests/code_health` 3,090 passed; `ruff@0.17.2` format and check, F811/F821 and `git diff --check` clean.
    - Timing: `council_tax_reduction` for one simulation of 500 generated households (mixed nations, ages and incomes) took 1.13 s at `2da212abc` and 0.97 to 1.01 s at the head, over two runs each.
    
    ## Merge notes
    
    `git merge-tree --write-tree --name-only` against this head:
    
    - `main` at `6c6e229a` and at `0080274d`: clean.
    - #1933's branch `fix-1933-ctr-pensioner-children` (`e8831fb6`): conflicts in `council_tax_reduction_applicable_income.py`. It merges cleanly with `main`, so this PR causes the conflict.
    - #1966 (`779f5dcf`): conflicts in `council_tax_reduction_carer_support_payment.yaml` (caused by this PR), and in `CHANGELOG.md`, `test_means_test_income_properties.py` and `pyproject.toml` (already conflicting with `main`).
    - #1995 (`1b8f2ded`): conflicts in six files, all already conflicting with `main`, including `council_tax_reduction_applicable_income.py` and `test_council_tax_reduction_pension_credit_properties.py`.
    - #2077 (`cf0475dd`): conflicts in nine files that already conflict with `main`, and in `council_tax_reduction_applicable_income.py`, which this PR adds.
    
    **Overlap with #1995.** #1995 replaces the same tax line with its own `legacy_means_test_income_tax` (`earned_income_tax` less reductions), which treats savings, dividends and property income as capital in every scheme. On Scottish households in 2026 (deduction, CTR income, CTR):
    
    | Household | This branch | #1995 |
    |---|---|---|
    | Working age, pay £20,000, pension £10,000 | £4,045.47 / £25,954.53 / £0 | CTR income £25,954.53 / £0 |
    | Carer, pay £9,000, pension £5,000, CSP, SCS | £1,267.09 / £17,228.31 / £48.82 | £17,228.31 / £48.82 |
    | Pay £30,000, interest £90,000 | £18,459.47 / £11,540.53 / £685.61 | £23,054.53 / £0 (deducts £6,945.47) |
    | Pay £30,000, property £20,000 | £8,930.12 / £41,069.88 / £0 | £25,154.53 / £0 (property not counted; deducts £4,845.47) |
    | The same with £10,000 finance costs | £8,376.45 / £31,623.55 / £0 | £25,154.53 / £0 |
    | Pensioner, pension £14,000, CSP, SCS | £1,145.41 / £17,349.99 / £1,693.16 | £17,228.31 / £1,717.50 (deducts the supplement's tax) |
    
    The two now agree on the first two rows. Before both land, #1995 has to route the CTR line through `council_tax_reduction_tax_deduction`, not `legacy_means_test_income_tax`: its helper deducts the supplement's tax at pension age and leaves out the savings tax that earnings cause at working age. On finance costs, the option (a) definition settles the ordering: T − T(E) counts only the finance-cost reduction the property income cannot use on its own (£553.67 in the row above), so this branch no longer needs #1995's ordering. Whether property income counts at all is #1995's own question.
    
    ## Open
    
    - The English working-age schemes (SI 2012/2886 and the local schemes the model runs) and the Welsh working-age scheme: the hub has no text for these schemes' rules, so they still deduct the whole liability.
    - Pension Credit income still deducts the tax on savings it does not count; a follow-up issue covers a household that gets guarantee credit on a gross income above £275,000.
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    

    Generated by Claude Code

  11. MaxGhenis commented on Nov 2, 2026

    @MaxGhenis
    CollaboratorAuthor

    AXIOM_ISSUE.md

    Title: Council Tax Reduction: deduct only the tax the schemes allow from income
    
    Labels: pe-parity
    
    ## Module and corpus
    
    - Proposed module path: `uk/local_authorities/council_tax_reduction/tax_deduction`
    - Corpus citations:
      - Council Tax Reduction (Scotland) Regulations 2021 (SSI 2021/249) regs 49(6)(b), 50(3)(a), 51(2) step 3 and 51(9), and Part 6 Chapter 4 (regs 57 to 65)
      - Council Tax Reduction (Scotland) Regulations 2012 (SSI 2012/303) regs 37 and 38, applied by SSI 2021/249 reg 51(9)
      - Council Tax Reduction (State Pension Credit) (Scotland) Regulations 2012 (SSI 2012/319) regs 27(1)(j)(xxib), 31(12), 33(2)(a) and 37
      - Council Tax Reduction Schemes (Prescribed Requirements) (England) Regulations 2012 (SI 2012/2885) Sch 1 paras 17(13), 19(2)(a) and 30
      - Council Tax Reduction Schemes and Prescribed Requirements (Wales) Regulations 2013 (WSI 2013/3029) Sch 1 paras 11(13), 13(2)(a) and 24
      - Income Tax Act 2007 ss. 35 and 37
    - PolicyEngine UK counterpart: `council_tax_reduction_tax_deduction`, read by `council_tax_reduction_applicable_income` (PolicyEngine/policyengine-uk issue #2090), with `council_tax_reduction_scotland_self_employment_deductions`, `council_tax_reduction_income_tax_on_other_counted_income` and Pension Credit's `pension_credit_self_employment_deductions`.
    
    ## Law (verbatim)
    
    SSI 2021/249 reg 49(6)(b):
    
    > (6) In calculating the amount of an applicant’s employed earnings in respect of an assessment period, there are to be deducted from the amount of general earnings or benefits specified in paragraphs (2) to (4)— ... (b) any amounts paid by the applicant in that period in respect of the employment by way of income tax or primary Class 1 contributions under section 6(1) of the 1992 Act,
    
    SSI 2021/249 reg 50(3)(a):
    
    > Earnings do not include— (a) any amount deducted from them by way of income tax or primary Class 1 contributions under the 1992 Act
    
    SSI 2021/249 reg 51(2), step 3:
    
    > Step 3 Deduct from the amount resulting from step 1 or (where applicable) step 2 any payment made by the applicant to HMRC in the assessment period by way of national insurance contributions or income tax in respect of any trade, profession or vocation carried on by the applicant. If the amount resulting from steps 1 to 3 is nil or a negative amount, the amount of the applicant’s self-employed earnings in respect of the assessment period is nil (and ignore the following steps).
    
    SSI 2021/249 reg 51(9):
    
    > (9) For the purpose of paragraph (5), steps 2 and 3 in calculating that applicant’s self-employed earnings are to ascertain the net profit of the employment as self-employed earnings, in accordance with regulations 37 and 38 (calculation of net profit, and deduction of tax and contributions) of the 2012 Regulations, but—
    > (a) reading all references in those regulations to—
    > (i) the “applicant” as referring to the applicant under these Regulations,
    > (ii) the “assessment period” as referring to the assessment period determined under regulation 44 of these Regulations,
    > (iii) “earnings” as referring to the gross income ascertained under Step 1 of this regulation,
    > (iv) the “qualifying premium” as referring to “relievable pension contributions” within the meaning of this Chapter (see regulation 46(1)), and
    > (b) reading the reference in regulation 37(2) of those Regulations to “Schedule 3” as a reference to schedule 3 of these Regulations.
    
    SSI 2012/303 reg 38(1) and (2), current text:
    
    > (1) The amount to be deducted in respect of income tax under regulation 37(1)(b)(i), (3)(b)(i) or (9)(a)(i) (calculation of net profit of self-employed earners) is to be calculated on the basis of the amount of chargeable income and as if that income was assessable to income tax at the basic rate of tax applicable to the assessment period less only the personal relief to which the applicant is entitled under section 35(1) of the Income Tax Act 2007 (personal allowance for those aged under 65) as is appropriate to the applicant's circumstances, but, if the assessment period is less than one year the earnings to which the basic rate of tax is to be applied and the amount of the personal reliefs deductible under this paragraph are to be calculated on a pro rata basis.
    > (2) The amount to be deducted in respect of social security contributions under regulation 37(1)(b)(i), (3)(b)(ii) or (9)(a)(ii) is the total of—
    > (a) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
    > (b) the amount of Class 4 contributions (if any) which would be payable under section 15 of the 1992 Act (Class 4 contributions recoverable under the Income Tax Acts) at the percentage rate applicable to the assessment period on so much of the chargeable income as exceeds the lower limit but does not exceed the upper limit of profits and gains applicable for the tax year applicable to the assessment period, but if the assessment period is less than one year those limits are to be reduced pro rata.
    
    SSI 2012/303 reg 38(2)(a), as in force on 5 April 2024:
    
    > (a) the amount of Class 2 contributions payable under section 11(2) or, as the case may be, 11(8) of the 1992 Act at the rate applicable to the assessment period except where the applicant's chargeable income is equal to or less than the amount specified in section 11(4)(a) of that Act (lower profits threshold) for the tax year applicable to the assessment period, but if the assessment period is less than one year, the amount specified for that tax year is to be reduced pro rata; and
    
    SSI 2012/319 reg 27(1)(j)(xxib):
    
    > (1) For the purposes of these Regulations “income” means income of any of the following descriptions ... (j) social security benefits other than— ... (xxib) the Scottish Carer Supplement component of Carer Support given under section 28 and schedule 2 of the Social Security (Scotland) Act 2018;
    
    SSI 2012/319 reg 31(12):
    
    > In the case of any income taken into account for the purpose of calculating a person's income, any amount payable by way of tax must be disregarded.
    
    SSI 2012/319 reg 33(2)(a):
    
    > (2) For the purposes of paragraph (1) net earnings must, except where paragraph (4) applies, be calculated by taking into account the gross earnings of the applicant from the employment over the assessment period, less—
    > (a) any amount deducted from those earnings by way of—
    > (i) income tax; or
    > (ii) primary Class 1 contributions under the 1992 Act;
    
    SSI 2012/319 reg 37(1) and (2), current text:
    
    > (1) The amount to be deducted in respect of income tax under regulation 36(1)(b)(i), (2)(b)(i) or (8)(a)(i) (calculation of net profit of self-employed earners) must be calculated on the basis of the amount of chargeable income and as if that income was assessable to income tax at the basic rate of tax applicable to the assessment period less only the personal relief to which the applicant is entitled under sections 36 or 37 of the Income Tax Act 2007 (personal allowances) as is appropriate to the applicant's circumstances, but if the assessment period is less than a year the earnings to which the basic rate of tax is to be applied and the amount of the personal reliefs deductible under this paragraph must be calculated on a pro rata basis.
    > (2) The amount to be deducted in respect of social security contributions under regulation 37(1)(b)(i), (2)(b)(ii) or (8)(a)(ii) is the total of—
    > (a) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
    > (b) the amount of Class 4 contributions (if any) which would be payable under section 15 of the 1992 Act at the percentage rate applicable to the assessment period on so much of the chargeable income as exceeds the lower limit but does not exceed the upper limit of profits and gains applicable for the tax year applicable to the assessment period, but if the assessment period is less than a year those limits must be reduced pro rata.
    
    SI 2012/2885 Sch 1 para 17(13) and WSI 2013/3029 Sch 1 para 11(13):
    
    > In the case of any income taken into account for the purpose of calculating a person’s income any amount payable by way of tax is disregarded.
    
    SI 2012/2885 Sch 1 para 19(2)(a):
    
    > (2) For the purposes of sub-paragraph (1) net earnings must, except where sub-paragraph (5) applies, be calculated by taking into account the gross earnings of the applicant from that employment over the assessment period, less—
    > (a) any amount deducted from those earnings by way of—
    > (i) income tax;
    > (ii) primary Class 1 contributions under the SSCBA;
    
    SI 2012/2885 Sch 1 para 30(1) to (3), current text:
    
    > (1) The amount to be deducted in respect of income tax under paragraph 29(1)(b)(i), (2)(b)(i) or (8)(a)(i) (calculation of net profit of self-employed earners) is to be calculated—
    > (a) on the basis of the amount of chargeable income; and
    > (b) as if that income were assessable to income tax at the basic rate , or in the case of a Scottish taxpayer, the Scottish basic rate, of tax applicable to the assessment period less only the personal reliefs to which the applicant is entitled under Chapters 2, 3 and 3A of Part 3 of the Income Tax Act 2007 as are appropriate to his circumstances.
    > (2) But, if the assessment period is less than a year, the earnings to which the basic rate , or the Scottish basic rate of tax is to be applied and the amount of the personal reliefs deductible under this paragraph must be calculated on a pro rata basis.
    > (3) The amount to be deducted in respect of national insurance contributions under paragraph 29(1)(b)(i), (2)(b)(ii) or (8)(a)(ii) is the total of—
    > (a) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
    > (b) the amount of Class 4 contributions (if any) which would be payable under section 15 of the SSCBA (Class 4 contributions recoverable under the Income Tax Acts) at the percentage rate applicable to the assessment period on so much of the chargeable income as exceeds the lower limit but does not exceed the upper limit of profits and gains applicable for the tax year applicable to the assessment period; but if the assessment period is less than a year, those limits must be reduced pro rata.
    
    WSI 2013/3029 Sch 1 para 13(2)(a):
    
    > (2) For the purposes of sub-paragraph (1) net earnings must, except where sub-paragraph (5) applies, be calculated by taking into account the gross earnings of the applicant from that employment over the assessment period, less—
    > (a) any amount deducted from those earnings by way of—
    > (i) income tax;
    > (ii) primary Class 1 contributions under the SSCBA;
    
    WSI 2013/3029 Sch 1 para 24(1) to (3), current text:
    
    > (1) The amount to be deducted in respect of income tax under paragraph 23(1)(b)(i), (2)(b)(i) or (8)(a)(i) (calculation of net profit of self-employed earners) must be calculated—
    > (a) on the basis of the amount of chargeable income, and
    > (b) as if that income were assessable to income tax at the basic rate of tax applicable to the assessment period less only the personal reliefs to which the applicant is entitled under Chapters 2, 3 and 3A of Part 3 of the Income Tax Act 2007 as is appropriate to the applicant’s circumstances.
    > (2) But, if the assessment period is less than a year, the earnings to which the basic rate of tax is to be applied and the amount of the personal reliefs deductible under this paragraph must be calculated on a pro rata basis.
    > (3) The amount to be deducted in respect of social security contributions under paragraph 23(1)(b)(i), (2)(b)(ii) or (8)(a)(ii) is the total of—
    > (a) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
    > (b) the amount of Class 4 contributions (if any) which would be payable under section 15 of the SSCBA (Class 4 contributions recoverable under the Income Tax Acts) at the percentage rate applicable to the assessment period on so much of the chargeable income as exceeds the lower limit but does not exceed the upper limit of profits and gains applicable for the tax year applicable to the assessment period; but if the assessment period is less than a year, those limits must be reduced pro rata.
    
    Income Tax Act 2007 s. 35(1) and (2):
    
    > (1) An individual who makes a claim is entitled to a personal allowance of £12,570 for a tax year if the individual meets the requirements of section 56 (residence etc).
    > (2) For an individual whose adjusted net income exceeds £100,000, the allowance under subsection (1) is reduced by one-half of the excess.
    
    Income Tax Act 2007 s. 37(1):
    
    > (1) An individual who makes a claim is entitled to a personal allowance of £10,660, or (if greater) the section 35 amount, for a tax year if the individual—
    > (a) was born before 6 April 1938, and
    > (b) meets the requirements of section 56 (residence etc).
    
    legislation.gov.uk shows ITA 2007 s. 36 as omitted. SI 2024/377 omitted head (a) of SSI 2012/303 reg 38(2), SSI 2012/319 reg 37(2) and SI 2012/2885 Sch 1 para 30(3) from 6 April 2024; WSI 2025/59 omitted head (a) of WSI 2013/3029 Sch 1 para 24(3) for schemes made for financial years beginning on or after 1 April 2025 (its reg 1(3)). Neither amending instrument's text is quoted here.
    
    ## Required outputs
    
    - `council_tax_reduction_tax_deduction` (benefit unit, annual, GBP): the income tax and National Insurance the scheme deducts from the applicant's and partner's income.
    - `council_tax_reduction_applicable_income` (benefit unit, annual, GBP), in so far as it depends on that deduction.
    
    ## Attribution
    
    No provision quoted above says how to split one income tax liability between kinds of income. PolicyEngine takes option (a), settled for Pension Credit on PolicyEngine/policyengine-uk#2019: the tax on earnings is the extra tax the earnings cause, with the earnings as the top slice of income and self-employed profit beneath them; in the pensioner schemes the tax on the other counted income is the tax it bears with the uncounted income above it. Each companion case below says whether its value rests on that choice or on the text.
    
    ## Companion cases
    
    Worked by hand with 2026-27 rates: personal allowance £12,570; UK basic rate 20% on the first £37,700 of taxable income; Scottish starter rate 19% on the first £3,967 and basic rate 20% to £16,956; dividend allowance £500 and dividend ordinary rate 10.75%; Class 1 primary contributions 8% above £12,569.96 a year; Class 4 main rate 6% from £12,570 to £50,270. Single adults, no Universal Credit or Pension Credit, no capital. The income tax rules tax savings and dividends above other income; that ordering comes from the Income Tax Acts, not quoted here.
    
    1. **Scotland, working age.** Pay £20,000, dividends £9,000. Tax with the pay: £7,430 taxable non-savings income gives £3,967 × 19% = £753.73 and £3,463 × 20% = £692.60, so £1,446.33; the dividends above it give (£9,000 − £500) × 10.75% = £913.75. Total £2,360.08. Tax without the pay: £9,000 of dividends falls within the personal allowance, so nil. Class 1: (£20,000 − £12,569.96) × 8% = £594.40. Deduction £2,954.48. **This rests on the attribution choice.** Reg 50(3)(a) deducts the tax "deducted from" the earnings; if PAYE deducts from the pay only the tax on the pay, the deduction would be £1,446.33 + £594.40 = £2,040.73. Under option (a) the £913.75 of dividend tax counts as tax on earnings, because without the pay the dividends would bear none.
    2. **England, pension age.** Private pension £20,308, savings interest £6,559. Tax on the pension: (£20,308 − £12,570) × 20% = £1,547.60. Deduction £1,547.60; applicable income from the pension £20,308 − £1,547.60 = £18,760.40. **This rests on unquoted provisions:** the English pensioner provisions quoted here do not say whether actual interest is income taken into account, and the Scottish analogue (SSI 2012/319 reg 27(1)(i)) counts "income from capital other than capital disregarded under Part 1 of Schedule 4", whose Schedule is not quoted. Given that the interest is not counted, the value follows from para 17(13) and the income tax ordering, with no attribution choice.
    3. **Wales, pension age.** Private pension £20,000, dividends £10,000. Tax on the pension: (£20,000 − £12,570) × 20% = £1,486. Deduction £1,486; applicable income from the pension £18,514. Like case 2, it assumes the scheme does not count the dividends, and needs no attribution choice.
    4. **Scotland, pension age.** Private pension £15,000, Scottish Carer Supplement £608.40 (£11.70 × 52). Reg 27(1)(j)(xxib) excepts the supplement, so the scheme counts the pension alone. Tax on the pension with the supplement above it: (£15,000 − £12,570) × 19% = £461.70. Deduction £461.70; applicable income £14,538.30. **This rests on the attribution choice:** the pension and the supplement are both non-savings income, and no provision says which takes the personal allowance. Total tax is (£15,608.40 − £12,570) × 19% = £577.30. With the supplement above the pension, the pension bears £461.70. With the supplement beneath it, the supplement uses £608.40 of the allowance and the pension bears all £577.30, which would be the deduction.
    5. **Scotland, working age, self-employed.** Profit £60,000, no Universal Credit. Reg 51(9) and SSI 2012/303 reg 38: income tax (£60,000 − £12,570) × 20% = £9,486; Class 4 (£50,270 − £12,570) × 6% = £2,262. Deduction £11,748; applicable income £48,252. This follows from the text with no attribution choice, reading the reg 38(1) relief as the s. 35 allowance (the person's adjusted net income does not exceed £100,000, so s. 35(2) does not bite).
    6. **Scotland, working age, self-employed.** Profit £15,000, no Universal Credit. Income tax (£15,000 − £12,570) × 20% = £486; Class 4 (£15,000 − £12,570) × 6% = £145.80. Deduction £631.80, more than the £607.50 the person pays (£2,430 × 19% = £461.70 and £145.80), as the notional rule intends.
    7. **England, pension age, self-employed.** Profit £60,000. SI 2012/2885 Sch 1 para 30: income tax (£60,000 − £12,570) × 20% = £9,486. No Class 4 contributions would be payable above State Pension age (a rule of the 1992 Act not quoted here). Deduction £9,486.
    
    ### review_finding (paste as-is)
    
    ```yaml
    review_finding:
      source: PolicyEngine/policyengine-uk#2090
      module: uk/local_authorities/council_tax_reduction/tax_deduction
      finding: >-
        PolicyEngine UK deducted the applicant's and partner's whole income tax
        and National Insurance from Council Tax Reduction income in every scheme.
        Scotland's working-age scheme deducts tax and primary Class 1
        contributions from earnings only (SSI 2021/249 regs 49(6)(b), 50(3)(a)
        and 51(2) step 3) and, without Universal Credit, a notional tax on
        self-employed profit (reg 51(9); SSI 2012/303 reg 38). The pensioner
        schemes deduct the tax deducted from earnings, disregard tax only on
        income taken into account, and price self-employed profit notionally
        (SSI 2012/319 regs 31(12), 33(2)(a) and 37; SI 2012/2885 Sch 1 paras
        17(13), 19(2)(a) and 30; WSI 2013/3029 Sch 1 paras 11(13), 13(2)(a)
        and 24).
      schemes_changed:
        - scotland_working_age
        - england_pension_age
        - wales_pension_age
        - scotland_pension_age
      schemes_open:
        - england_working_age_default_and_local
        - wales_working_age
      modelling_choice: >-
        No provision apportions one income tax liability between kinds of
        income. PolicyEngine UK takes option (a), settled for Pension Credit on
        PolicyEngine/policyengine-uk#2019: the tax on earnings is the extra tax
        the earnings cause, with earnings as the top slice of income and
        self-employed profit beneath them; in the pensioner schemes the tax on
        the other counted income is the tax it bears with the uncounted income
        above it.
      companion_cases:
        - scotland_working_age: {pay: 20000, dividends: 9000, deduction: 2954.48, rests_on_attribution: true}
        - england_pension_age: {private_pension: 20308, savings_interest: 6559, deduction: 1547.60, rests_on_unquoted_provisions: true}
        - wales_pension_age: {private_pension: 20000, dividends: 10000, deduction: 1486.00, rests_on_unquoted_provisions: true}
        - scotland_pension_age: {private_pension: 15000, scottish_carer_supplement: 608.40, deduction: 461.70, rests_on_attribution: true}
        - scotland_working_age_self_employed: {profit: 60000, deduction: 11748.00}
        - scotland_working_age_self_employed_low: {profit: 15000, deduction: 631.80}
        - england_pension_age_self_employed: {profit: 60000, deduction: 9486.00}
    ```
    
    ## Completion boundary
    
    An approved follow-up must:
    
    - **Ingest** the full text of SSI 2021/249 regs 49, 50, 51 and 57 to 65; SSI 2012/303 regs 37 and 38 (current and as in force on 5 April 2024); SSI 2012/319 regs 27, 31 to 33, 36 and 37 and Schedule 4 Part 1; SI 2012/2885 Sch 1 paras 17 to 19, 29 and 30; WSI 2013/3029 Sch 1 paras 11 to 13, 23 and 24 (current and as in force on 23 January 2025); ITA 2007 ss. 35 to 37; SI 2024/377 and WSI 2025/59; and the working-age provisions of SI 2012/2886 and WSI 2013/3029 that #2090 left unchecked.
    - **Encode** the deduction for each changed scheme in the module, with the notional self-employed rules as law and the apportionment of one liability between earnings and other income stated as a parameterised convention (option (a)), not as law.
    - **Prove** the seven companion cases; that with no earnings and no profit the Scottish working-age deduction is nil; that with no employed earnings the pensioner deduction does not move with uncounted income; and then compare with PolicyEngine UK's `council_tax_reduction_tax_deduction` on the same households.
    
    

    Generated by Claude Code

  12. MaxGhenis commented on Nov 2, 2026

    @MaxGhenis
    CollaboratorAuthor

    FOLLOWUP_ISSUE.md

    Title: Pension Credit income deducts the income tax on savings interest it does not count
    
    ## Household
    
    A single person in Scotland, age 70, in 2026: employment income £86,381, private pension £38,831, savings interest £150,000, no capital input (`savings` nil), council tax £2,000, no Universal Credit claim.
    
    ## Figures on `main` (`6c6e229a51fbd804dab2062dac1f94af04c609c2`)
    
    | Variable | Value |
    |---|---|
    | `income_tax_before_winter_fuel_payment_charge` | £115,236.11 |
    | `pension_credit_income_tax_without_employment_income` | £72,755.02 |
    | `pension_credit_employment_income_tax` | £42,481.09 |
    | `pension_credit_earnings_disregard` | £260.00 |
    | `pension_credit_income` | £9,715.89 |
    | `minimum_guarantee` | £12,376.00 |
    | `guarantee_credit` / `pension_credit` | £2,660.11 |
    | `council_tax_reduction_applicable_income` | £0 (the guarantee credit route) |
    
    ## What the code does
    
    `pension_credit_income` adds the claimant's and partner's income sources listed in `gov.dwp.pension_credit.guarantee_credit.income`. Savings interest is not among them: the list takes capital into account through `pension_credit_deemed_income` instead. The formula then deducts each member's whole `income_tax_before_winter_fuel_payment_charge` and `national_insurance` (with the notional self-employed amounts swapped in for the actual Class 2, Class 4 and profit tax). So it deducts the £72,755.02 of income tax that this person would pay without the pay, most of which falls on the £150,000 of interest it does not count.
    
    Here the counted income is £86,381 + £38,831 = £125,212. Less the whole £115,236.11 of tax and the £260 earnings disregard, it comes to £9,715.89, which is below the £12,376 minimum guarantee. The model therefore pays £2,660.11 of guarantee credit to someone whose gross income exceeds £275,000. That award also passports the person through Council Tax Reduction's guarantee credit route, which sets their CTR income to nil.
    
    The Council Tax Reduction pensioner schemes had the same problem, and #2090 fixes it for their general route by deducting only the extra tax earnings cause plus the tax on the other counted income, with the uncounted income above it. Pension Credit could use the same split (`pension_credit_income_tax_without_earnings` with the uncounted income also set to nil). The legal test for Pension Credit's tax deduction still has to be quoted from the State Pension Credit Regulations 2002 before anyone changes the formula.
    
    The model gives the same £2,660.11 at `2da212abcf2086337fc088a4a1236f4ae7b6af63`.
    
    

    Generated by Claude Code

  13. MaxGhenis commented on Nov 2, 2026

    @MaxGhenis
    CollaboratorAuthor

    Ready for hub review

    Branch claude/ctr-deductions-review-kpqmyj, head 7778076a4b611e99978fd44256d7d04a0f6c15c6. It branches from 411dc0243dbbadefd56d46389b4b2b6270591eda and adds five commits. Nothing was pushed to claude/council-tax-reduction-deductions-clzysl, and no PR is open. The title, body, Axiom packet and FOLLOWUP_ISSUE.md are in the four comments above.

    Before starting: the only push to the base branch was 411dc024 itself (15:53Z, the build this job reviews). No comment said anyone was mid-change. The pick-up comment went up before my first push.

    Findings and resolution

    P1-1, the split (item 1). I rewrote council_tax_reduction_tax_deduction.py to option (a) in every scheme that deducts tax from earnings:

    • T − T(E): line 101, read from pension_credit_income_tax_without_employment_income.
    • With UC, T − T(E, S) plus Class 1, 2 and 4: line 109, read from pension_credit_income_tax_without_earnings.
    • Without UC: line 125.
    • Pensioner schemes, T − T(E) + T(E, S, U) + notional + Class 1: lines 142–145.
    • Other schemes keep the whole liability.

    A new Person variable, council_tax_reduction_income_tax_on_other_counted_income, gives T(E, S, U) through main's income_tax_with_inputs_zeroed, unchanged. It builds a branch only when someone has uncounted income, and the deduction reads each branch only when some benefit unit is in a scheme that uses it.

    U comes from council_tax_reduction_applicable_income's pensioner route (..._income_tax_on_other_counted_income.py:12): scottish_carer_supplement, miscellaneous_income, benefits_in_kind, savings_interest_income, other_investment_income and dividend_income. One gap: the route counts Widowed Parent's Allowance less £15 a week, and the branch does not take that £15 out. The body names it.

    E equals main's statutory payments list. The schemes also count adoption, shared parental, parental bereavement and neonatal care pay, and the NI equivalents, but the model has no variables for those.

    tax_below_top_slice, restored_allowance, tax_after_reductions_and_charges and the float guard had no work left, and I removed them all. The DECISION text is cited from main's Pension Credit module.

    P2-2. Benefits in kind stay in both terms. For pay £30,000 plus a £8,000 company car benefit in Scotland:

    • working age: £6,525.47 (income tax £5,131.07 plus Class 1 £1,394.40);
    • age 70: £5,131.07.

    With a £15,000 car benefit it is £7,814.75 and £6,420.35. Neither scheme deducts the £461.70 the car benefit alone would bear.

    P2-1. Pay £30,000 plus property £20,000: deduction £8,930.12 without finance costs and £8,376.45 with £10,000 of them.

    • property_finance_cost_relief is £2,000 with the pay.
    • Without the pay the property alone bears £1,446.33, and the relief removes all of it.
    • So the deduction falls by £553.67, the part of the relief only the pay's tax can absorb.

    P3-1. The Welsh pensioner couple (pensions £9,000 and £30,000; partner adds £70,000 interest and £40,000 dividends) loses Marriage Allowance (£1,260 to nil). The deduction stays at £3,234, because the T(E, S, U) branch zeroes everyone's uncounted income. CTR income still falls, from £35,766 to nil, because Pension Credit's whole-tax deduction puts the couple on the guarantee credit route (P3-5).

    Invariant 1 of the build no longer holds at working age: pay £30,000 with interest £60,000 gives CTR income £15,640.53, and with £90,000 it gives £11,540.53. The body says so.

    P1-2 and item 2, self-employed. I added council_tax_reduction_scotland_self_employment_deductions, used for both Scottish schemes:

    • Rate: the basic rate (Scottish basic for a Scottish taxpayer) on profit less only personal_allowance (line 60).
    • Class 4: main rate between the limits, where liable.
    • Class 2: before 2024-25 only (line 77).

    Readings I took:

    • s. 35(1): the tapered allowance, because s. 35(2) reduces "the allowance under subsection (1)".
    • ss. 36/37: the same tapered s. 35 allowance for every applicant. A literal reading would give no relief to anyone born after 5 April 1938.
    • England and Wales: I reuse pension_credit_self_employment_deductions. Wales's text has no Scottish clause, but the model treats nobody in Wales as a Scottish taxpayer. Wales's Class 2 cutoff is FY 2025, while the Pension Credit variable stops at 6 April 2024. Both give nil in 2024 because the model's compulsory rate is nil from 6 April 2024.
    • Class 2 test: the old text's lower profits threshold uses class_2_liable (small profits threshold before 2022-23). I have only the 5 April 2024 text, so earlier years follow the then-current SSCBA test.

    The deduction exceeds the tax paid where the law says it should (£631.80 against £607.50); invariant 3 states and tests this. The body's self-employed section also covers child minders and partnerships.

    I put the Scottish variable in the CTR directory, not beside the Pension Credit file, so this PR changes nothing under gov/dwp/pension_credit.

    P1-3, item 3. I reran every evidence-table row at the head:

    • 048 in England, Wales and Scotland: unchanged.
    • 148 in Scotland: whole liability £676,082.25 before; now deduction £259,296.41, CTR income £250,926.59, CTR £0. The pay's extra tax includes what it adds on dividends and interest.
    • 148 in Wales: unchanged.

    Loss and no-loss give the same figures at both base and head. The review's ring-fence sentence replaces the old row.

    P2-3 and P2-4, item 4. I traced six cases at the head. The deduction reaches income_support, jsa_income, esa_income, universal_credit, universal_credit_pre_benefit_cap, child_benefit, council_tax_reduction_relevant_income_based_benefit and council_tax_reduction_pensioner. The UC self-employed case also reaches pension_credit and guarantee_credit; I did not trace which path. All six give the same result whichever variable is calculated first. Invariant 7 now names universal_credit for the Scottish route. P2-4 uses the review's text.

    P2-5, item 5, #1995. I reran the five households at the head and at 1b8f2ded (table in the body). They now agree on the working-age pension case and the carer case. They differ on:

    • interest £90,000: £11,540.53 here vs £23,054.53;
    • property, counted here and not there;
    • the pensioner supplement: £17,349.99 here vs £17,228.31.

    #1995 must route the CTR line through council_tax_reduction_tax_deduction. On finance costs, option (a) settles the ordering, so this branch does not adopt #1995's.

    P2-6, item 6. I added the Class 3 case (yaml line 265: £2,040.73 and £17,959.27, worked by hand). The Class 3 mutant now fails exactly that case.

    P3 (item 7).

    • P3-2: Class 2 counts with UC where charged, and in the notional amounts only before each omission.
    • P3-3: replacements applied where the sentence survived; new text written to the same rules.
    • P3-4: in the packet.
    • P3-5: reproduced on main 6c6e229a. Pension Credit is £2,660.11, not £2,660.16, and the same at 2da212abc. FOLLOWUP_ISSUE.md is posted.

    Item 8, main. git merge-tree is clean against 6c6e229a and against the newer main 0080274d, so I did not merge.

    Item 9, packet.

    • The apostrophe is fixed, and every listed provision is quoted from the brief's text.
    • Companion case 2 is marked as resting on unquoted provisions; so is case 3, for the same reason.
    • I reworked all cases by hand and added three self-employed ones.
    • Case 1 is now £2,954.48 under option (a), against £2,040.73 if PAYE takes only the pay's tax from the pay.
    • Case 4 (£461.70) also rests on the choice: £577.30 with the supplement beneath the pension.

    Tests

    Each count is from a clean run at the head unless stated.

    YAML

    • council_tax_reduction_tax_deduction.yaml (17 cases) plus the CSP file (12 cases): 29 passed.
    • At 2da212abc, with the deduction outputs stripped: 16 fail and 13 pass. The 13 are the two guards, as intended, and 11 CSP cases. The Scotland pay £20,000 / pension £10,000 case is kept as a guard, not a reproducer.
    • CTR YAML directory: 348 passed.
    • 29 other YAML files that read CTR or the reused Pension Credit variables: 345 passed.

    Python

    • New property file: 8 passed. Single-process with --hypothesis-show-statistics, 25 examples each; the per-scheme shares are in the body. Every route of each invariant is drawn, and 15% of invariant 5's draws crossed a tax cliff.
    • Carer property file: 4 passed.
    • 39 other Python files that read CTR or the reused Pension Credit helpers: 443 passed, 3 failed, 1 skipped. Two of the failures were in test_council_tax_reduction_pension_credit_properties.py, whose oracle deducted the whole liability. The third was test_trading_loss_properties.py::test_means_tests_see_the_loss_only_through_tax, which held income tax as an input that the branches then read unchanged. Both now read or hold council_tax_reduction_tax_deduction, and those two files then passed (21 tests). I did not rerun the other 37 files after that change, which touched only those two test files.
    • The skip is test_claims_all_entitled_benefits.py::test_survey_takeup_follows_reports_in_microdata, which needs the survey dataset.

    Checks

    • tests/code_health: 3,090 passed.
    • uvx ruff@0.17.2 format --check . (2,168 files formatted), ruff check ., F811/F821 and git diff --check: all clean.
    • .github/check_fix_pr.py on the final title and body: Fix evidence: PASS, changed executable tests 6, exit 0.

    Invariant 5 counterexample. I minimised one by hand. A Scottish couple whose pay rises from £43,661 to £43,662 loses Marriage Allowance: the deduction rises £264.89 and CTR rises £52.78 (council tax set to £15,000 so CTR is positive). The personal savings allowance falling from £1,000 to £500 does the same (CTR £7,902.21 at pay £47,270 against £7,920.41 at £47,300, with £3,000 of interest). Both are tax cliffs, labelled intended; the test exempts draws where marriage_allowance or savings_allowance changes. No other counterexample turned up.

    Timing. council_tax_reduction for one simulation of 500 generated households: 1.13 s at 2da212abc (two runs) and 1.01 s and 0.97 s at the head.

    Mutants

    Each was applied alone in a scratch copy with PYTHONPATH pinned to it, and run against the two YAML files (29 cases):

    Mutant Failed Cases that failed
    The build's earnings-lowest split 12
    Earnings as the top of non-savings income only 3 savings with pay; benefits in kind; English pensioner pay and interest
    Tax the profit bears in place of the notional amount 6 every notional case
    The build's pensioner split, uncounted income on top 4 English pensioner pay and interest; three pensioner profit cases
    Class 3 deducted 1 the Class 3 case
    Benefits in kind zeroed with the earnings 1 the benefits-in-kind case

    I did not run the mutants against the property tests.

    Skipped and judgment calls

    • Not checked: the English and Welsh working-age schemes (no text), and SSI 2012/319 Sch 4 (whether interest is counted at pension age).
    • Judgment calls:
      • the s. 35 and ss. 36/37 readings;
      • reusing the Pension Credit notional rule for Wales;
      • "with Universal Credit" read as applicant_has_universal_credit;
      • the Widowed Parent's Allowance £15 left in T(E, S, U);
      • the Scottish variable's location;
      • exempting tax cliffs in invariant 5;
      • invariant 2 compared net of the notional amount, which reads the tapered allowance and the Marriage Allowance and so can move with uncounted income;
      • the carer supplement invariant relaxed, where the family has earnings, to "changes CTR income only through the deduction".

    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions