Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/2130.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Corrected the Scottish 48% top-rate threshold to £125,140 of taxable income for 2024–25, 2025–26 and 2026–27, accounting for the fully withdrawn personal allowance.
17 changes: 10 additions & 7 deletions docs/engineering/gift-aid.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ non-savings income, it also increases the Scottish basic-rate upper limit and
every limit above it; the starter-rate upper limit remains unchanged. Savings
and dividends use the extended UK limits for Scottish taxpayers too.

The Scottish top-rate limit is £125,140 of taxable income in each of
[2024-25](https://www.parliament.scot/chamber-and-committees/votes-and-motions/S6M-12252),
[2025-26](https://www.parliament.scot/chamber-and-committees/votes-and-motions/S6M-16531)
and [2026-27](https://www.parliament.scot/chamber-and-committees/votes-and-motions/S6M-20844).
The personal allowance is fully withdrawn at that income, so £12,570 is not
subtracted from this limit, as the [Scottish Government's explanatory
note](https://www.gov.scot/publications/scottish-rate-resolution-2026-2027-draft-motion-explanatory-note/pages/3/)
explains. Gift Aid extends this taxable-income limit by the gross gift.

The model extends limits where band amounts are calculated. For variables that
use a complete rate scale, `calc_income_tax_with_gift_aid` in
`policyengine_uk/utils/income_tax.py` applies an equivalent correction to the
Expand Down Expand Up @@ -53,14 +62,8 @@ including s. 12B(8) for Scottish taxpayers, with s. 414(2)(b)).

## Existing limitations

Zero-gift calculations retain their existing behavior. Several inherited
limitations remain relevant when interpreting mixed-income results:
Several limitations remain relevant when interpreting mixed-income results:

- The Scottish top-rate threshold parameter is £112,570 of income after
allowances for 2024 onwards. The [HMRC rates and allowances
table](https://www.gov.uk/government/publications/rates-and-allowances-income-tax/income-tax-rates-and-allowances-current-and-past)
gives £125,140 after allowances. The Gift Aid correction extends the model's
existing threshold and does not repair it.
- Adjusted net income still omits other adjustments in s. 58, including the
deduction for pension contributions relieved at source in Step 3.
- Gifts are assumed to qualify. The model does not charge the donor for a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,11 @@ brackets:
- threshold:
values:
2017-04-06: null
# Top rate threshold: £125,140 total income = £112,570 above PA
# (£125,140 - £12,570 personal allowance)
2024-04-06: 112_570
2025-04-06: 112_570
# Scottish Budget 2025-26 announced freeze through 2026-27
2026-04-06: 112_570
# The personal allowance is fully withdrawn at £125,140, so the
# taxable-income top limit equals total income: do not subtract PA.
2024-04-06: 125_140
2025-04-06: 125_140
2026-04-06: 125_140
metadata:
uprating: gov.economic_assumptions.indices.obr.consumer_price_index
rate:
Expand All @@ -89,6 +88,14 @@ metadata:
rate_unit: /1
label: Scottish Income Tax rates
reference:
- title: Scottish Rate Resolution 2024-25 (S6M-12252), paragraphs (a)-(f)
href: https://www.parliament.scot/chamber-and-committees/votes-and-motions/S6M-12252
- title: Scottish Rate Resolution 2025-26 (S6M-16531), paragraphs (a)-(f)
href: https://www.parliament.scot/chamber-and-committees/votes-and-motions/S6M-16531
- title: Scottish Rate Resolution 2026-27 (S6M-20844), paragraphs (a)-(f)
href: https://www.parliament.scot/chamber-and-committees/votes-and-motions/S6M-20844
- title: Scottish Rate Resolution 2026-27 explanatory note - personal allowance and top limit
href: https://www.gov.scot/publications/scottish-rate-resolution-2026-2027-draft-motion-explanatory-note/pages/3/
- title: GOV.UK
href: https://www.gov.uk/government/publications/rates-and-allowances-income-tax/income-tax-rates-and-allowances-current-and-past
- title: Scottish Budget 2025-26 - Higher rate threshold freeze
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
period: 2025
absolute_error_margin: 0
input:
# Top rate (48%) starts at 125,140 total income (112,570 above PA)
# At this income, PA is fully tapered, so taxable income = 125,140
# This exceeds the top rate threshold of 112,570
# The personal allowance is fully withdrawn at £125,140; the taxable
# top-rate limit is £125,140 too. tax_band classification is separate
# from the amount of income charged at 48% (see #2350).
adjusted_net_income: 125140
region: SCOTLAND
output:
Expand All @@ -25,10 +25,105 @@
absolute_error_margin: 0
input:
# 100,000 income is above advanced rate threshold (62,430 above PA)
# but below top rate threshold (112,570 above PA)
# but below the £125,140 taxable top-rate threshold
# PA at 100,000 is 12,570 (not yet tapered), taxable = 87,430
adjusted_net_income: 100000
region: SCOTLAND
output:
# TaxBand enum uses ADDITIONAL for both Advanced (45%) and Top (48%) rates
tax_band: ADDITIONAL

- name: Scottish 2024 pay of 120000 has no tax at the 48 percent rate
period: 2024
absolute_error_margin: 0.01
input:
age: 45
employment_income: 120000
region: SCOTLAND
output:
# S6M-12252: 45% continues to £125,140 of taxable income.
# https://www.parliament.scot/chamber-and-committees/votes-and-motions/S6M-12252
earned_taxable_income: 117430
earned_income_tax: 44278.31
income_tax: 44278.31

- name: Scottish 2024 pay of 150000 has exactly 24860 taxed at 48 percent
period: 2024
absolute_error_margin: 0.01
input:
age: 45
employment_income: 150000
region: SCOTLAND
output:
# Lower bands: £47,747.81; top band: £24,860 * 48% = £11,932.80.
earned_taxable_income: 150000
earned_income_tax: 59680.61
income_tax: 59680.61

- name: Scottish 2025 pay of 120000 has no tax at the 48 percent rate
period: 2025
absolute_error_margin: 0.01
input:
age: 45
employment_income: 120000
region: SCOTLAND
output:
# S6M-16531: 45% continues to £125,140 of taxable income.
# https://www.parliament.scot/chamber-and-committees/votes-and-motions/S6M-16531
earned_taxable_income: 117430
earned_income_tax: 44263.80
income_tax: 44263.80

- name: Scottish 2025 pay of 150000 has exactly 24860 taxed at 48 percent
period: 2025
absolute_error_margin: 0.01
input:
age: 45
employment_income: 150000
region: SCOTLAND
output:
# Lower bands: £47,733.30; top band: £24,860 * 48% = £11,932.80.
earned_taxable_income: 150000
earned_income_tax: 59666.10
income_tax: 59666.10

- name: Scottish 2026 pay of 120000 has no tax at the 48 percent rate
period: 2026
absolute_error_margin: 0.01
input:
age: 45
employment_income: 120000
region: SCOTLAND
output:
# S6M-20844: 45% continues to £125,140 of taxable income.
# https://www.parliament.scot/chamber-and-committees/votes-and-motions/S6M-20844
earned_taxable_income: 117430
earned_income_tax: 44232.05
income_tax: 44232.05

- name: Scottish 2026 pay of 150000 has exactly 24860 taxed at 48 percent
period: 2026
absolute_error_margin: 0.01
input:
age: 45
employment_income: 150000
region: SCOTLAND
output:
# Lower bands: £47,701.55; top band: £24,860 * 48% = £11,932.80.
earned_taxable_income: 150000
earned_income_tax: 59634.35
income_tax: 59634.35

- name: Scottish 2026 pay of 130000 has exactly 4860 taxed at 48 percent
period: 2026
absolute_error_margin: 0.01
input:
age: 45
employment_income: 130000
region: SCOTLAND
output:
# S6M-20844: lower bands £47,701.55 plus £4,860 * 48% = £2,332.80.
# Companion to Axiom scot_e130k_top_rate_pa_tapered.
earned_taxable_income: 130000
earned_income_tax: 50034.35
income_tax: 50034.35
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,11 @@
employment_income: [150_000, 150_000]
gift_aid: [0, 800]
output:
# S6M-20844: £47,701.55 in the lower bands, plus £24,860 at 48%.
# https://www.parliament.scot/chamber-and-committees/votes-and-motions/S6M-20844
# s.414 raises the £125,140 top limit to £126,140 for the donor.
# Rate steps 1%, 21%, 3% and 3% on £1,000 gross give £280 relief.
income_tax: [60_011.45, 59_731.45]
income_tax: [59_634.35, 59_354.35]

- name: A large Gift Aid gift can cross several Scottish bands
period: 2026
Expand Down
21 changes: 11 additions & 10 deletions policyengine_uk/tests/test_gift_aid.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
https://www.legislation.gov.uk/ukpga/2007/3/section/415
https://www.legislation.gov.uk/ukpga/2007/3/section/58

The differential integrates the model's existing rate schedules independently.
It preserves their unrelated baseline policy choices, including the Scottish
top-rate threshold, to isolate the effect of extending limits for Gift Aid.
The differential integrates the model's rate schedules independently to
isolate the effect of extending limits for Gift Aid.
"""

import numpy as np
Expand Down Expand Up @@ -267,15 +266,17 @@ def test_explicit_zero_gift_matches_omitted_input(sim, omitted_sim, drawn):
assert before.tobytes() == after.tobytes(), variable


def test_zero_gift_preserves_main_outputs_bit_for_bit():
"""Freeze main's intermediate and final outputs, including mixed income.
def test_zero_gift_preserves_baseline_outputs_bit_for_bit():
"""Freeze intermediate and final outputs, including mixed income.

Frozen from main at 3381500f4 (after #2352 put savings and dividends
above property income, and the Scottish personal savings allowance
moved to the UK bands). Re-freeze from main when main moves these.
moved to the UK bands). The Scottish £150,000 case uses the corrected
£125,140 top-rate limit from S6M-20844 (#2130), giving £59,634.35:
https://www.parliament.scot/chamber-and-committees/votes-and-motions/S6M-20844

Gift Aid's zero-input compatibility also applies to inherited baseline
choices about property stacking, the Scottish schedule and taxpayer bands.
choices about property stacking and taxpayer bands.
Exact float32 expectations catch changes hidden by a tax-level tolerance.
"""
rows = [
Expand Down Expand Up @@ -319,7 +320,7 @@ def test_zero_gift_preserves_main_outputs_bit_for_bit():
28_032,
3451.070068359375,
13182.0498046875,
60011.44921875,
59634.3515625,
3451.070068359375,
0,
31407.05078125,
Expand All @@ -336,7 +337,7 @@ def test_zero_gift_preserves_main_outputs_bit_for_bit():
28_032,
3451.070068359375,
13182.0498046875,
60011.44921875,
59634.3515625,
14043.3203125,
3307.25,
31407.05078125,
Expand Down Expand Up @@ -408,7 +409,7 @@ def test_explicit_adjusted_net_income_preserves_tax_base(ani, net_gift):
"scottish",
),
"Scotland, six rates": (
[0, 3_967, 16_956, 31_092, 62_430, 112_570],
[0, 3_967, 16_956, 31_092, 62_430, 125_140],
[0.19, 0.20, 0.21, 0.42, 0.45, 0.48],
"scottish",
),
Expand Down
17 changes: 14 additions & 3 deletions policyengine_uk/tests/test_scottish_income_tax_rates.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
import pytest

from policyengine_uk.system import system


def test_scottish_income_tax_thresholds_updated_for_2026():
rates = system.parameters.gov.hmrc.income_tax.rates.scotland.rates("2026-04-06")
@pytest.mark.parametrize(
"year, thresholds",
[
# Scottish Rate Resolutions S6M-12252, S6M-16531 and S6M-20844.
(2024, [0, 2306, 13991, 31092, 62430, 125140]),
(2025, [0, 2827, 14921, 31092, 62430, 125140]),
(2026, [0, 3967, 16956, 31092, 62430, 125140]),
],
)
def test_scottish_income_tax_thresholds_match_the_resolution(year, thresholds):
rates = system.parameters.gov.hmrc.income_tax.rates.scotland.rates(f"{year}-04-06")

assert rates.thresholds == [0.0, 3967, 16956, 31092, 62430, 112570]
assert rates.thresholds == thresholds
Loading
Loading