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/hmrc-salary-sacrifice-relief-targets.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Restore the HMRC salary sacrifice income tax and NICs relief calibration targets. They had been lost since the July 2026 private pension statistics release, when the old HMRC CSV was withdrawn (410 Gone). The targets now come from the 2024-25 Tables 6.1 and 6.2, mapped to year 2024. A committed copy is used when the download fails, and a table for another tax year or without the expected rows fails the build. Income tax relief is the rise in tax on pay under the person's rUK or Scottish rates, relieved at each rate the sacrifice straddles; it had been assigned whole to one band by comparing adjusted net income with taxable-income thresholds. The NICs targets follow the Class 1 rates, including the employer rate rise to 15% from April 2025. The OBR-labelled NICs relief targets, which repeated HMRC's 2023-24 figures, and the separately rounded income tax relief total are removed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
"tax_year","income_tax_nics","contribution_type","nics_relief_class","sector_scheme","scheme_type","tax_rate","value_of_relief"
"2024 to 2025","Income Tax","Individual contributions to net pay arrangements","Not applicable","Total","Total","Total","7000"
"2024 to 2025","Income Tax","Individual contributions to relief at source schemes","Not applicable","Total","Total","Total","5900"
"2024 to 2025","Income Tax","Salary sacrificed contributions","Not applicable","Total","Total","Total","8800"
"2024 to 2025","Income Tax","Employer contributions to net pay arrangements plus deficit reduction contributions","Not applicable","Total","Total","Total","24800"
"2024 to 2025","Income Tax","Employer contributions to relief at source schemes","Not applicable","Total","Total","Total","9200"
"2024 to 2025","Income Tax","Individual contributions to net pay arrangements","Not applicable","Public sector occupational scheme","Total","Total","4500"
"2024 to 2025","Income Tax","Individual contributions to relief at source schemes","Not applicable","Public sector occupational scheme","Total","Total","200"
"2024 to 2025","Income Tax","Salary sacrificed contributions","Not applicable","Public sector occupational scheme","Total","Total","600"
"2024 to 2025","Income Tax","Employer contributions to net pay arrangements plus deficit reduction contributions","Not applicable","Public sector occupational scheme","Total","Total","14000"
"2024 to 2025","Income Tax","Employer contributions to relief at source schemes","Not applicable","Public sector occupational scheme","Total","Total","400"
"2024 to 2025","Income Tax","Individual contributions to net pay arrangements","Not applicable","Personal or private sector occupational scheme","Total","Total","2500"
"2024 to 2025","Income Tax","Individual contributions to relief at source schemes","Not applicable","Personal or private sector occupational scheme","Total","Total","5700"
"2024 to 2025","Income Tax","Salary sacrificed contributions","Not applicable","Personal or private sector occupational scheme","Total","Total","8300"
"2024 to 2025","Income Tax","Employer contributions to net pay arrangements plus deficit reduction contributions","Not applicable","Personal or private sector occupational scheme","Total","Total","10800"
"2024 to 2025","Income Tax","Employer contributions to relief at source schemes","Not applicable","Personal or private sector occupational scheme","Total","Total","8800"
"2024 to 2025","Income Tax","Individual contributions to net pay arrangements","Not applicable","Total","Defined benefit","Total","5200"
"2024 to 2025","Income Tax","Individual contributions to relief at source schemes","Not applicable","Total","Defined benefit","Total","0"
"2024 to 2025","Income Tax","Salary sacrificed contributions","Not applicable","Total","Defined benefit","Total","1500"
"2024 to 2025","Income Tax","Employer contributions to net pay arrangements plus deficit reduction contributions","Not applicable","Total","Defined benefit","Total","16600"
"2024 to 2025","Income Tax","Employer contributions to relief at source schemes","Not applicable","Total","Defined benefit","Total","0"
"2024 to 2025","Income Tax","Individual contributions to net pay arrangements","Not applicable","Total","Defined contribution","Total","1800"
"2024 to 2025","Income Tax","Individual contributions to relief at source schemes","Not applicable","Total","Defined contribution","Total","5900"
"2024 to 2025","Income Tax","Salary sacrificed contributions","Not applicable","Total","Defined contribution","Total","7400"
"2024 to 2025","Income Tax","Employer contributions to net pay arrangements plus deficit reduction contributions","Not applicable","Total","Defined contribution","Total","8200"
"2024 to 2025","Income Tax","Employer contributions to relief at source schemes","Not applicable","Total","Defined contribution","Total","9200"
"2024 to 2025","Income Tax","Individual contributions to net pay arrangements","Not applicable","Total","Total","Basic Rate","2400"
"2024 to 2025","Income Tax","Individual contributions to relief at source schemes","Not applicable","Total","Total","Basic Rate","3200"
"2024 to 2025","Income Tax","Salary sacrificed contributions","Not applicable","Total","Total","Basic Rate","1600"
"2024 to 2025","Income Tax","Employer contributions to net pay arrangements plus deficit reduction contributions","Not applicable","Total","Total","Basic Rate","6700"
"2024 to 2025","Income Tax","Employer contributions to relief at source schemes","Not applicable","Total","Total","Basic Rate","2200"
"2024 to 2025","Income Tax","Individual contributions to net pay arrangements","Not applicable","Total","Total","Higher Rate","3800"
"2024 to 2025","Income Tax","Individual contributions to relief at source schemes","Not applicable","Total","Total","Higher Rate","1600"
"2024 to 2025","Income Tax","Salary sacrificed contributions","Not applicable","Total","Total","Higher Rate","5500"
"2024 to 2025","Income Tax","Employer contributions to net pay arrangements plus deficit reduction contributions","Not applicable","Total","Total","Higher Rate","15600"
"2024 to 2025","Income Tax","Employer contributions to relief at source schemes","Not applicable","Total","Total","Higher Rate","5200"
"2024 to 2025","Income Tax","Individual contributions to net pay arrangements","Not applicable","Total","Total","Additional Rate","900"
"2024 to 2025","Income Tax","Individual contributions to relief at source schemes","Not applicable","Total","Total","Additional Rate","1100"
"2024 to 2025","Income Tax","Salary sacrificed contributions","Not applicable","Total","Total","Additional Rate","1800"
"2024 to 2025","Income Tax","Employer contributions to net pay arrangements plus deficit reduction contributions","Not applicable","Total","Total","Additional Rate","2500"
"2024 to 2025","Income Tax","Employer contributions to relief at source schemes","Not applicable","Total","Total","Additional Rate","1700"
"2024 to 2025","NICs","Employer contributions to net pay arrangements and on employer deficit reduction contributions","Class 1 Primary (employee)","Total","Total","Total","3600"
"2024 to 2025","NICs","Employer contributions to relief at source schemes","Class 1 Primary (employee)","Total","Total","Total","1200"
"2024 to 2025","NICs","Salary sacrificed contributions","Class 1 Primary (employee)","Total","Total","Total","1000"
"2024 to 2025","NICs","Employer contributions to net pay arrangements and on employer deficit reduction contributions","Class 1 Secondary (employer)","Total","Total","Total","10600"
"2024 to 2025","NICs","Employer contributions to relief at source schemes","Class 1 Secondary (employer)","Total","Total","Total","3800"
"2024 to 2025","NICs","Salary sacrificed contributions","Class 1 Secondary (employer)","Total","Total","Total","3400"
"2024 to 2025","NICs","Employer contributions to net pay arrangements and on employer deficit reduction contributions","Class 1 Primary (employee)","Public sector occupational scheme","Total","Total","2300"
"2024 to 2025","NICs","Employer contributions to relief at source schemes","Class 1 Primary (employee)","Public sector occupational scheme","Total","Total","900"
"2024 to 2025","NICs","Salary sacrificed contributions","Class 1 Primary (employee)","Public sector occupational scheme","Total","Total","100"
"2024 to 2025","NICs","Employer contributions to net pay arrangements and on employer deficit reduction contributions","Class 1 Secondary (employer)","Public sector occupational scheme","Total","Total","6300"
"2024 to 2025","NICs","Employer contributions to relief at source schemes","Class 1 Secondary (employer)","Public sector occupational scheme","Total","Total","200"
"2024 to 2025","NICs","Salary sacrificed contributions","Class 1 Secondary (employer)","Public sector occupational scheme","Total","Total","200"
"2024 to 2025","NICs","Employer contributions to net pay arrangements and on employer deficit reduction contributions","Class 1 Primary (employee)","Personal or private sector occupational scheme","Total","Total","1300"
"2024 to 2025","NICs","Employer contributions to relief at source schemes","Class 1 Primary (employee)","Personal or private sector occupational scheme","Total","Total","300"
"2024 to 2025","NICs","Salary sacrificed contributions","Class 1 Primary (employee)","Personal or private sector occupational scheme","Total","Total","900"
"2024 to 2025","NICs","Employer contributions to net pay arrangements and on employer deficit reduction contributions","Class 1 Secondary (employer)","Personal or private sector occupational scheme","Total","Total","4300"
"2024 to 2025","NICs","Employer contributions to relief at source schemes","Class 1 Secondary (employer)","Personal or private sector occupational scheme","Total","Total","3600"
"2024 to 2025","NICs","Salary sacrificed contributions","Class 1 Secondary (employer)","Personal or private sector occupational scheme","Total","Total","3100"
"2024 to 2025","NICs","Employer contributions to net pay arrangements and on employer deficit reduction contributions","Class 1 Primary (employee)","Total","Defined benefit","Total","2500"
"2024 to 2025","NICs","Employer contributions to relief at source schemes","Class 1 Primary (employee)","Total","Defined benefit","Total","0"
"2024 to 2025","NICs","Salary sacrificed contributions","Class 1 Primary (employee)","Total","Defined benefit","Total","200"
"2024 to 2025","NICs","Employer contributions to net pay arrangements and on employer deficit reduction contributions","Class 1 Secondary (employer)","Total","Defined benefit","Total","7200"
"2024 to 2025","NICs","Employer contributions to relief at source schemes","Class 1 Secondary (employer)","Total","Defined benefit","Total","0"
"2024 to 2025","NICs","Salary sacrificed contributions","Class 1 Secondary (employer)","Total","Defined benefit","Total","600"
"2024 to 2025","NICs","Employer contributions to net pay arrangements and on employer deficit reduction contributions","Class 1 Primary (employee)","Total","Defined contribution","Total","1100"
"2024 to 2025","NICs","Employer contributions to relief at source schemes","Class 1 Primary (employee)","Total","Defined contribution","Total","1200"
"2024 to 2025","NICs","Salary sacrificed contributions","Class 1 Primary (employee)","Total","Defined contribution","Total","800"
"2024 to 2025","NICs","Employer contributions to net pay arrangements and on employer deficit reduction contributions","Class 1 Secondary (employer)","Total","Defined contribution","Total","3300"
"2024 to 2025","NICs","Employer contributions to relief at source schemes","Class 1 Secondary (employer)","Total","Defined contribution","Total","3800"
"2024 to 2025","NICs","Salary sacrificed contributions","Class 1 Secondary (employer)","Total","Defined contribution","Total","2800"
"2024 to 2025","NICs","Employer contributions to net pay arrangements and on employer deficit reduction contributions","Class 1 Primary (employee)","Total","Total","Main Rate","2800"
"2024 to 2025","NICs","Employer contributions to relief at source schemes","Class 1 Primary (employee)","Total","Total","Main Rate","900"
"2024 to 2025","NICs","Salary sacrificed contributions","Class 1 Primary (employee)","Total","Total","Main Rate","600"
"2024 to 2025","NICs","Employer contributions to net pay arrangements and on employer deficit reduction contributions","Class 1 Secondary (employer)","Total","Total","Main Rate","10600"
"2024 to 2025","NICs","Employer contributions to relief at source schemes","Class 1 Secondary (employer)","Total","Total","Main Rate","3800"
"2024 to 2025","NICs","Salary sacrificed contributions","Class 1 Secondary (employer)","Total","Total","Main Rate","3400"
"2024 to 2025","NICs","Employer contributions to net pay arrangements and on employer deficit reduction contributions","Class 1 Primary (employee)","Total","Total","Additional Rate","800"
"2024 to 2025","NICs","Employer contributions to relief at source schemes","Class 1 Primary (employee)","Total","Total","Additional Rate","300"
"2024 to 2025","NICs","Salary sacrificed contributions","Class 1 Primary (employee)","Total","Total","Additional Rate","300"
"2024 to 2025","NICs","Employer contributions to net pay arrangements and on employer deficit reduction contributions","Class 1 Secondary (employer)","Total","Total","Additional Rate","[z]"
"2024 to 2025","NICs","Employer contributions to relief at source schemes","Class 1 Secondary (employer)","Total","Total","Additional Rate","[z]"
"2024 to 2025","NICs","Salary sacrificed contributions","Class 1 Secondary (employer)","Total","Total","Additional Rate","[z]"
2 changes: 0 additions & 2 deletions policyengine_uk_data/targets/build_loss_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,7 @@ def _compute_column(target: Target, ctx: _SimContext, year: int) -> np.ndarray |
# Salary sacrifice NI relief
if name in (
"hmrc/salary_sacrifice_employee_nics_relief",
"obr/salary_sacrifice_employee_ni_relief",
"hmrc/salary_sacrifice_employer_nics_relief",
"obr/salary_sacrifice_employer_ni_relief",
):
return compute_ss_ni_relief(target, ctx)

Expand Down
73 changes: 49 additions & 24 deletions policyengine_uk_data/targets/compute/income.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,59 @@ def compute_income_band(target, ctx) -> np.ndarray:
return ctx.household_from_person(income_df[variable] * in_band)


def compute_ss_it_relief(target, ctx) -> np.ndarray:
"""Compute salary sacrifice IT relief by tax band."""
it_base = ctx.sim.calculate("income_tax")
it_cf = ctx.counterfactual_sim.calculate("income_tax", ctx.time_period)
it_relief = it_cf - it_base
def tax_by_band(income: np.ndarray, thresholds, rates) -> dict:
"""Tax on ``income`` within each of HMRC's rate categories.

HMRC's Table 6.1 groups relief by marginal rate: basic (with the Scottish
starter and intermediate rates), higher and additional. Brackets taxed
below 30% are basic, brackets at the scale's top rate are additional (the
rUK additional rate, the Scottish top rate) and the rest are higher (the
Scottish higher and advanced rates, which cover the income range of the
rUK higher rate). The categories sum to the scale's tax on ``income``.
"""
income = np.asarray(income, dtype=float)
thresholds = [t for t, r in zip(thresholds, rates) if r is not None]
rates = [r for r in rates if r is not None]
uppers = thresholds[1:] + [np.inf]
bands = {"basic": 0.0, "higher": 0.0, "additional": 0.0}
for lower, upper, rate in zip(thresholds, uppers, rates):
band = (
"basic" if rate < 0.3 else "additional" if rate == rates[-1] else "higher"
)
bands[band] = bands[band] + rate * np.clip(income - lower, 0, upper - lower)
return bands

adj_net_income_cf = ctx.counterfactual_sim.calculate(
"adjusted_net_income", ctx.time_period
)

params = ctx.sim.tax_benefit_system.parameters.gov.hmrc.income_tax.rates.uk
basic_thresh = params[0].threshold(ctx.time_period)
higher_thresh = params[1].threshold(ctx.time_period)
additional_thresh = params[2].threshold(ctx.time_period)
def ss_it_relief_by_band(ctx) -> dict:
"""Person-level salary sacrifice income tax relief in each rate category.

HMRC applies income tax rates to employees' pay (ASHE), so relief is the
rise in tax on earned income when the sacrifice is paid as salary, under
the person's rUK or Scottish rates. Contributions that straddle a band
boundary are relieved partly at each rate, as in HMRC's estimates.
"""
period = ctx.time_period
rates = ctx.sim.tax_benefit_system.parameters(period).gov.hmrc.income_tax.rates
scottish = np.asarray(ctx.sim.calculate("pays_scottish_income_tax", period))
base = np.asarray(ctx.sim.calculate("earned_taxable_income", period))
cf = np.asarray(ctx.counterfactual_sim.calculate("earned_taxable_income", period))
relief = {}
for scale, in_scale in ((rates.uk, ~scottish), (rates.scotland.rates, scottish)):
band_cf = tax_by_band(cf, scale.thresholds, scale.rates)
band_base = tax_by_band(base, scale.thresholds, scale.rates)
for band in band_cf:
relief[band] = relief.get(band, 0) + in_scale * (
band_cf[band] - band_base[band]
)
return relief

name = target.name
if "basic" in name:
mask = (adj_net_income_cf > basic_thresh) & (adj_net_income_cf <= higher_thresh)
elif "higher" in name:
mask = (adj_net_income_cf > higher_thresh) & (
adj_net_income_cf <= additional_thresh
)
elif "additional" in name:
mask = adj_net_income_cf > additional_thresh
else:
mask = np.ones_like(it_relief, dtype=bool)

return ctx.household_from_person(it_relief * mask)
def compute_ss_it_relief(target, ctx) -> np.ndarray:
"""Compute salary sacrifice income tax relief at one rate."""
band = target.name.removeprefix("hmrc/salary_sacrifice_it_relief_")
return ctx.household_from_person(
ss_it_relief_by_band(ctx)[band.removesuffix("_rate")]
)


def compute_ss_contributions(target, ctx) -> np.ndarray:
Expand Down
4 changes: 3 additions & 1 deletion policyengine_uk_data/targets/sources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ hmrc:
spi_geography: "https://assets.publishing.service.gov.uk/media/69f1f17cc42061e837e3ac3b/Collated_Tables_3_12_to_3_15a_2324.ods"
income_tax_liabilities: "https://www.gov.uk/government/statistics/income-tax-liabilities-statistics-tax-year-2022-to-2023-to-tax-year-2025-to-2026"
capital_gains_statistics: "https://www.gov.uk/government/statistics/capital-gains-tax-statistics"
salary_sacrifice_table_6: "https://assets.publishing.service.gov.uk/media/687a294e312ee8a5f0806b6d/Tables_6_1_and_6_2.csv"
# Private pension statistics, July 2026 (tax year 2024-25). Refresh with
# storage/hmrc_pension_relief_tables_6_1_6_2_*.csv (hmrc_salary_sacrifice.py).
salary_sacrifice_table_6: "https://assets.publishing.service.gov.uk/media/6a673e0e5e87122783093901/Tables_6_1_and_6_2.csv"

dwp:
stat_xplore_api: "https://stat-xplore.dwp.gov.uk/webapi/rest/v1"
Expand Down
Loading
Loading