diff --git a/changelog.d/2866.fixed.md b/changelog.d/2866.fixed.md new file mode 100644 index 0000000000..fb46a424d4 --- /dev/null +++ b/changelog.d/2866.fixed.md @@ -0,0 +1 @@ +Corrected Scottish income tax on earned and property income, including allowance allocation, for 2015-16 and 2016-17. diff --git a/policyengine_uk/tests/policy/baseline/gov/hmrc/income_tax/scotland_pre_2017.yaml b/policyengine_uk/tests/policy/baseline/gov/hmrc/income_tax/scotland_pre_2017.yaml new file mode 100644 index 0000000000..6e64066b0c --- /dev/null +++ b/policyengine_uk/tests/policy/baseline/gov/hmrc/income_tax/scotland_pre_2017.yaml @@ -0,0 +1,345 @@ +# Annual labels follow the model's fiscal-year parameter convention: +# 2015 means 2015-16; 2016 means 2016-17. +# FA 2014 Sch. 38 para. 12 and SI 2015/2000 art. 3 start the Scottish rate +# provisions in 2016-17. ITA 2007 s. 11A (2016-04-06), subsections (1)-(3), +# follows the UK bands for non-savings, non-dividend income in that year. +# Parliament's 11 February 2016 resolution sets the Scottish component at 10%. +# HMRC's 2016-17 employer table confirms combined rates of 20%, 40% and 45%, +# a personal allowance of 11,000 and a basic rate limit of 32,000 for both +# Scotland and the rest of the UK. +# https://www.legislation.gov.uk/ukpga/2014/26/schedule/38/paragraph/12 +# https://www.legislation.gov.uk/uksi/2015/2000/article/3/made +# https://www.legislation.gov.uk/ukpga/2007/3/section/11A/2016-04-06 +# https://www.gov.uk/guidance/rates-and-thresholds-for-employers-2016-to-2017 +# For 2015-16, FA 2015 s. 1 sets 20%/40%/45%; FA 2014 s. 2 as amended +# by FA 2015 s. 3 sets the personal allowance at 10,600 and the basic rate +# limit at 31,785. The 31,600 tested here lies below that statutory limit. +# https://www.legislation.gov.uk/ukpga/2015/11/section/1/enacted +# https://www.legislation.gov.uk/ukpga/2014/26/section/2 +# https://www.legislation.gov.uk/ukpga/2015/11/section/3/enacted +# Each person is single, age 40, in their own benefit unit and household. +# No pension contributions, gifts, finance costs, savings or dividends. +# property_income supplies net property-business profit. Gross rental +# receipts remain unknown; the baseline gives no additional property +# allowance deduction for a profit above the allowance. These cases do not +# certify the history of the property allowance or expense/election rules. + +- name: Case 1, Scottish and English pay uses UK bands in 2015-16. + period: 2015 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 40 + employment_income: 42_200 + person2: + age: 40 + employment_income: 42_200 + benunits: + benunit1: + members: [person1] + benunit2: + members: [person2] + households: + household1: + members: [person1] + country: SCOTLAND + household2: + members: [person2] + country: ENGLAND + output: + # 42,200 - 10,600 = 31,600; 31,600 x 20% = 6,320. + income_tax: [6_320, 6_320] + personal_allowance: [10_600, 10_600] + earned_taxable_income: [31_600, 31_600] + earned_income_tax: [6_320, 6_320] + +- name: Case 2, Scottish and English pay at the UK basic limit in 2016-17. + period: 2016 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 40 + employment_income: 43_000 + person2: + age: 40 + employment_income: 43_000 + benunits: + benunit1: + members: [person1] + benunit2: + members: [person2] + households: + household1: + members: [person1] + country: SCOTLAND + household2: + members: [person2] + country: ENGLAND + output: + # 43,000 - 11,000 = 32,000; 32,000 x 20% = 6,400. + income_tax: [6_400, 6_400] + personal_allowance: [11_000, 11_000] + earned_taxable_income: [32_000, 32_000] + earned_income_tax: [6_400, 6_400] + +- name: Case 3, Scottish and English pay above the UK basic limit in 2016-17. + period: 2016 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 40 + employment_income: 43_001 + person2: + age: 40 + employment_income: 43_001 + benunits: + benunit1: + members: [person1] + benunit2: + members: [person2] + households: + household1: + members: [person1] + country: SCOTLAND + household2: + members: [person2] + country: ENGLAND + output: + # 43,001 - 11,000 = 32,001; 32,000 x 20% + 1 x 40% = 6,400.40. + income_tax: [6_400.40, 6_400.40] + earned_taxable_income: [32_001, 32_001] + earned_income_tax: [6_400.40, 6_400.40] + +- name: Case 4, Scottish and English pay plus property uses UK bands in 2015-16. + period: 2015 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 40 + employment_income: 30_000 + property_income: 12_200 + person2: + age: 40 + employment_income: 30_000 + property_income: 12_200 + benunits: + benunit1: + members: [person1] + benunit2: + members: [person2] + households: + household1: + members: [person1] + country: SCOTLAND + household2: + members: [person2] + country: ENGLAND + output: + # Pay: (30,000 - 10,600) x 20% = 3,880. + # Property: 12,200 x 20% = 2,440. Total: 31,600 x 20% = 6,320. + income_tax: [6_320, 6_320] + personal_allowance: [10_600, 10_600] + earned_taxable_income: [19_400, 19_400] + taxable_property_income_after_allowances: [12_200, 12_200] + earned_income_tax: [3_880, 3_880] + property_income_tax: [2_440, 2_440] + +- name: Case 5, Scottish and English pay plus property uses UK bands in 2016-17. + period: 2016 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 40 + employment_income: 30_000 + property_income: 13_000 + person2: + age: 40 + employment_income: 30_000 + property_income: 13_000 + benunits: + benunit1: + members: [person1] + benunit2: + members: [person2] + households: + household1: + members: [person1] + country: SCOTLAND + household2: + members: [person2] + country: ENGLAND + output: + # Pay: (30,000 - 11,000) x 20% = 3,800. + # Property: 13,000 x 20% = 2,600. Total: 32,000 x 20% = 6,400. + income_tax: [6_400, 6_400] + personal_allowance: [11_000, 11_000] + earned_taxable_income: [19_000, 19_000] + taxable_property_income_after_allowances: [13_000, 13_000] + earned_income_tax: [3_800, 3_800] + property_income_tax: [2_600, 2_600] + +- name: Case 6, Scottish and English property alone uses UK bands in 2016-17. + period: 2016 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 40 + property_income: 43_000 + person2: + age: 40 + property_income: 43_000 + benunits: + benunit1: + members: [person1] + benunit2: + members: [person2] + households: + household1: + members: [person1] + country: SCOTLAND + household2: + members: [person2] + country: ENGLAND + output: + # The allowance covers property: (43,000 - 11,000) x 20% = 6,400. + income_tax: [6_400, 6_400] + personal_allowance: [11_000, 11_000] + earned_taxable_income: [0, 0] + taxable_property_income_after_allowances: [32_000, 32_000] + earned_income_tax: [0, 0] + property_income_tax: [6_400, 6_400] + +- name: Case 7, existing Scottish and English routing remains in 2017-18. + # Pinned-main parameter/routing control, not a new 2017-18 legal audit. + period: 2017 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 40 + employment_income: 43_500 + property_income: 1_500 + person2: + age: 40 + employment_income: 43_500 + property_income: 1_500 + benunits: + benunit1: + members: [person1] + benunit2: + members: [person2] + households: + household1: + members: [person1] + country: SCOTLAND + household2: + members: [person2] + country: ENGLAND + output: + # Baseline PA 11,500 leaves pay 32,000 and property 1,500. + # Scotland: pay 31,500 x 20% + 500 x 40% = 6,500; property 600. + # England: pay 32,000 x 20% = 6,400; property 1,500 x 20% = 300. + income_tax: [7_100, 6_700] + personal_allowance: [11_500, 11_500] + earned_taxable_income: [32_000, 32_000] + taxable_property_income_after_allowances: [1_500, 1_500] + earned_income_tax: [6_500, 6_400] + property_income_tax: [600, 300] + +- name: Case 8, country determines the Scottish flag before the 2016 start. + # Pinned-main geography/flag contract, not a 2015 Scottish-rate law claim. + period: 2015 + input: + people: + person1: + age: 40 + employment_income: 42_200 + person2: + age: 40 + employment_income: 42_200 + benunits: + benunit1: + members: [person1] + benunit2: + members: [person2] + households: + household1: + members: [person1] + country: SCOTLAND + household2: + members: [person2] + country: ENGLAND + output: + pays_scottish_income_tax: [true, false] + +- name: Case 9, country determines the Scottish flag in 2016-17. + # Pinned-main geography/flag contract, separate from currency tolerances. + period: 2016 + input: + people: + person1: + age: 40 + employment_income: 43_000 + person2: + age: 40 + employment_income: 43_000 + benunits: + benunit1: + members: [person1] + benunit2: + members: [person2] + households: + household1: + members: [person1] + country: SCOTLAND + household2: + members: [person2] + country: ENGLAND + output: + pays_scottish_income_tax: [true, false] + +- name: Case 10, Scottish and English taxpayers minimise tax on pay and savings in 2016-17. + # ITA 2007 s. 25(2) requires the allowance allocation giving the least tax. + # FA 2016 s. 4 inserts ss. 12A and 12B from 2016-17: savings nil rate + # and a 500 allowance where there is higher-rate but no additional-rate + # income, using UK bands for Scottish taxpayers too (s. 12B(8)(b)(iv)). + # https://www.legislation.gov.uk/ukpga/2007/3/section/25/2016-04-06 + # https://www.legislation.gov.uk/ukpga/2016/24/section/4/enacted + period: 2016 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 40 + employment_income: 42_500 + savings_interest_income: 1_500 + person2: + age: 40 + employment_income: 42_500 + savings_interest_income: 1_500 + benunits: + benunit1: + members: [person1] + benunit2: + members: [person2] + households: + household1: + members: [person1] + country: SCOTLAND + household2: + members: [person2] + country: ENGLAND + output: + # One minimum: PA 10,500 against pay and 500 against savings leaves + # pay 32,000 (tax 6,400) and savings 1,000 (500 nil + 500 x 40% = 200). + # Total 6,600. PA 10,000 against pay and 1,000 against savings also + # gives 6,600, so the component split is not asserted. + income_tax: [6_600, 6_600] + personal_allowance: [11_000, 11_000] + savings_allowance: [500, 500] diff --git a/policyengine_uk/tests/test_tax_band_scottish_properties.py b/policyengine_uk/tests/test_tax_band_scottish_properties.py index e8e7dcae64..1a78474eee 100644 --- a/policyengine_uk/tests/test_tax_band_scottish_properties.py +++ b/policyengine_uk/tests/test_tax_band_scottish_properties.py @@ -25,7 +25,7 @@ The Marriage Allowance income conditions do not read the band. With the baseline nil-rate amounts and with reformed limits and amounts, for every -single person in England, and in Scotland from 2017-18, they hold exactly when +single person in England and Scotland, they hold exactly when the liability charges no income at a rate s. 55B(2)(b) forbids and, with the dividend allowance removed (s. 55B(2)(ba)), none at the dividend upper or additional rate. So savings at the savings nil rate or the starting rate for @@ -321,14 +321,9 @@ def test_savings_allowance_does_not_read_the_band(): # The Marriage Allowance income conditions against the liability, with the # baseline nil-rate amounts and with reformed limits and amounts: people # alternate between Scotland and England, from 2016-17, the first year of the -# savings and dividend nil rates. Before 2017-18 the model charges a Scottish -# taxpayer's non-savings income on its 2017-18 Scottish scale, where Parliament -# charged it on the rest-of-UK limits (s. 11A(1)). The Marriage Allowance test -# uses the basic rate limit there, as Parliament did, so this test leaves those -# people out. +# savings and dividend nil rates. MA_YEARS = list(range(2016, 2027)) MA_COUNTRIES = ["SCOTLAND", "ENGLAND"] -FIRST_SCOTTISH_LIMITS_YEAR = 2017 # The rates Parliament forbids in s. 55B(2)(b), other than the dividend rates: # the Scottish higher, advanced and top rates, the higher and additional rates, # and the savings higher and additional rates. Each person pays at most one of @@ -431,15 +426,8 @@ def test_marriage_allowance_follows_the_liability_with_nil_rates( forbidden = charged_at(sim, period, FORBIDDEN) with law(sim, period, {DIVIDEND_ALLOWANCE: 0}): dividends_above_basic = charged_at(sim, period, DIVIDEND_UPPER) - checked = np.array( - [ - period >= FIRST_SCOTTISH_LIMITS_YEAR - or MA_COUNTRIES[i % len(MA_COUNTRIES)] != "SCOTLAND" - for i in range(PEOPLE) - ] - ) np.testing.assert_array_equal( - meets[checked], - ((forbidden < SOME) & (dividends_above_basic < SOME))[checked], + meets, + (forbidden < SOME) & (dividends_above_basic < SOME), err_msg=f"{drawn} in {period} with {changes}", ) diff --git a/policyengine_uk/utils/income_tax_allocation.py b/policyengine_uk/utils/income_tax_allocation.py index 41014b0f1a..5aa513caff 100644 --- a/policyengine_uk/utils/income_tax_allocation.py +++ b/policyengine_uk/utils/income_tax_allocation.py @@ -478,7 +478,11 @@ def values(variable): pension=values("pension_contributions_relief"), earned_exclusions=earned_exclusions, gift=values("gift_aid_grossed_up"), - scottish=np.asarray(person("pays_scottish_income_tax", period)), + # Scotland used the UK non-savings bands before 2017-18. + scottish=( + np.asarray(person("pays_scottish_income_tax", period)) + & (period.start.year >= 2017) + ), savings_allowance=values("savings_allowance"), marriage_allowance_reduction=values("marriage_allowance_reduction_at_stake"), rate_test_non_savings_limit=np.asarray(limits.non_savings, dtype=np.float64), diff --git a/policyengine_uk/variables/gov/hmrc/income_tax/earned_income_tax.py b/policyengine_uk/variables/gov/hmrc/income_tax/earned_income_tax.py index 30f71c00ed..d0a0f03540 100644 --- a/policyengine_uk/variables/gov/hmrc/income_tax/earned_income_tax.py +++ b/policyengine_uk/variables/gov/hmrc/income_tax/earned_income_tax.py @@ -10,13 +10,43 @@ class earned_income_tax(Variable): entity = Person label = "Income tax on earned income" definition_period = YEAR - reference = dict( - title="Income Tax Act 2007, s. 10", - href="https://www.legislation.gov.uk/ukpga/2007/3/section/10", + documentation = ( + "Earned taxable income uses the UK main scale before 2017-18. " + "From 2017-18, Scottish taxpayers use the Scottish scale and other " + "UK taxpayers use the UK main scale. Gift Aid extends the " + "applicable tax bands." + ) + reference = ( + dict( + title="Income Tax Act 2007, s. 10", + href="https://www.legislation.gov.uk/ukpga/2007/3/section/10", + ), + dict( + title="Income Tax Act 2007, s. 11A as at 6 April 2016", + href="https://www.legislation.gov.uk/ukpga/2007/3/section/11A/2016-04-06", + ), + dict( + title=( + "The Scotland Act 2012, Section 25 (Appointed Years) Order 2015, art. 3" + ), + href="https://www.legislation.gov.uk/uksi/2015/2000/article/3/made", + ), + dict( + title="Scottish Rate of Income Tax Resolution 2016-17 (S4M-15497)", + href="https://www.parliament.scot/chamber-and-committees/official-report/" + "search-what-was-said-in-parliament/meeting-of-parliament-11-02-2016" + "?iob=95367&meeting=10365", + ), ) unit = GBP def formula(person, period, parameters): + rates = parameters(period).gov.hmrc.income_tax.rates + income = person("earned_taxable_income", period) + gross_gift = person("gift_aid_grossed_up", period) + return calc_income_tax_with_gift_aid(rates.uk, income, gross_gift) + + def formula_2017(person, period, parameters): rates = parameters(period).gov.hmrc.income_tax.rates income = person("earned_taxable_income", period) gross_gift = person("gift_aid_grossed_up", period) diff --git a/policyengine_uk/variables/gov/hmrc/income_tax/liability/property_income_tax.py b/policyengine_uk/variables/gov/hmrc/income_tax/liability/property_income_tax.py index 1181eae828..3e80667847 100644 --- a/policyengine_uk/variables/gov/hmrc/income_tax/liability/property_income_tax.py +++ b/policyengine_uk/variables/gov/hmrc/income_tax/liability/property_income_tax.py @@ -6,16 +6,19 @@ class property_income_tax(Variable): - """Tax on property income, following main UK rates before 2027-28 and - separate property rates thereafter for rUK taxpayers; Scottish - taxpayers retain the model's Scottish rate treatment. - """ + documentation = ( + "Property income uses the UK main scale before 2017-18. From " + "2017-18, Scottish taxpayers use the Scottish main scale. Other " + "UK taxpayers use the UK main scale until separate property rates " + "apply from 2027-28. Property income is stacked after other " + "non-savings income." + ) value_type = float entity = Person label = "Income tax on property income" definition_period = YEAR - reference = [ + reference = ( dict( title="Income Tax (Trading and Other Income) Act 2005, s. 268", href="https://www.legislation.gov.uk/ukpga/2005/5/section/268", @@ -36,10 +39,43 @@ class property_income_tax(Variable): title="Budget 2026, paragraph 6.246 (property rates of 24%, 44% and 49%)", href="https://assets.publishing.service.gov.uk/media/6ae1ec57bdb574cf1c9b3f12/E03668986_HMT_Budget_2026_ELAY__2_.pdf#page=142", ), - ] + dict( + title="Income Tax Act 2007, s. 11A as at 6 April 2016", + href="https://www.legislation.gov.uk/ukpga/2007/3/section/11A/2016-04-06", + ), + dict( + title=( + "The Scotland Act 2012, Section 25 (Appointed Years) Order 2015, art. 3" + ), + href="https://www.legislation.gov.uk/uksi/2015/2000/article/3/made", + ), + dict( + title="Scottish Rate of Income Tax Resolution 2016-17 (S4M-15497)", + href="https://www.parliament.scot/chamber-and-committees/official-report/" + "search-what-was-said-in-parliament/meeting-of-parliament-11-02-2016" + "?iob=95367&meeting=10365", + ), + ) unit = GBP def formula(person, period, parameters): + rates = parameters(period).gov.hmrc.income_tax.rates + property_after_allowances = person( + "taxable_property_income_after_allowances", period + ) + other_earned_taxable = max_( + 0, + person("non_savings_income_after_allowances", period) + - property_after_allowances, + ) + gross_gift = person("gift_aid_grossed_up", period) + return calc_income_tax_with_gift_aid( + rates.uk, + other_earned_taxable + property_after_allowances, + gross_gift, + ) - calc_income_tax_with_gift_aid(rates.uk, other_earned_taxable, gross_gift) + + def formula_2017(person, period, parameters): """Before 2027-28, property income uses the applicable main scale.""" rates = parameters(period).gov.hmrc.income_tax.rates property_after_allowances = person(