From 116ef6daf42180353577bceff01fcb8e06ae0446 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 8 Nov 2026 01:32:14 -0500 Subject: [PATCH 1/2] Model Montana's working military retirement and survivor benefit exemption MCA 15-30-2120(3)(n) and (8), from tax year 2024: the lesser of half the return's military retirement pay or its Montana earned income (Form WMRE lines 2-5), plus half of military survivor benefits. An input records the section (9) residency and five-year conditions. Co-Authored-By: Claude Opus 5.5 --- ...-mt-military-retirement-exemption.added.md | 1 + .../military_retirement/in_effect.yaml | 14 ++ .../military_retirement/rate.yaml | 12 ++ .../military_retirement/survivor_rate.yaml | 12 ++ .../tax/income/subtractions/subtractions.yaml | 9 +- .../mt_military_retirement_exemption.yaml | 200 ++++++++++++++++++ .../mt_military_retirement_exemption.py | 49 +++++ ..._military_retirement_exemption_eligible.py | 23 ++ .../retirement/military_retirement_pay.py | 2 - 9 files changed, 317 insertions(+), 5 deletions(-) create mode 100644 changelog.d/fix-mt-military-retirement-exemption.added.md create mode 100644 policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/in_effect.yaml create mode 100644 policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/rate.yaml create mode 100644 policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/survivor_rate.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/subtractions/mt_military_retirement_exemption.yaml create mode 100644 policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption.py create mode 100644 policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_eligible.py diff --git a/changelog.d/fix-mt-military-retirement-exemption.added.md b/changelog.d/fix-mt-military-retirement-exemption.added.md new file mode 100644 index 00000000000..651f95c59e3 --- /dev/null +++ b/changelog.d/fix-mt-military-retirement-exemption.added.md @@ -0,0 +1 @@ +Montana's working military retirement and survivor benefit exemption (MCA 15-30-2120(3)(n)) from tax year 2024: the lesser of half the return's military retirement pay or its Montana earned income, plus half of military survivor benefits. diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/in_effect.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/in_effect.yaml new file mode 100644 index 00000000000..d53050eec98 --- /dev/null +++ b/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/in_effect.yaml @@ -0,0 +1,14 @@ +description: Montana allows the working military retirement and survivor benefit exemption when this is true. +values: + 0000-01-01: false + # 15-30-2120(3)(n) first applies to tax year 2024. + 2024-01-01: true +metadata: + unit: bool + period: year + label: Montana military retirement exemption in effect + reference: + - title: MCA 15-30-2120(3)(n) + href: https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html + - title: Montana Revenue Interim Committee, Tax Benefits for Veterans (November 2025), p. 1 + href: https://archive.legmt.gov/content/Committees/Interim/2025-2026/RIC/Meetings/November_12_13_2025/veteran-tax-benefits.pdf#page=1 diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/rate.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/rate.yaml new file mode 100644 index 00000000000..cb9dddfa8c7 --- /dev/null +++ b/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/rate.yaml @@ -0,0 +1,12 @@ +description: Montana subtracts this share of military retirement pay, up to the filer's Montana earned income, under the working military retirement exemption. +values: + 2024-01-01: 0.5 +metadata: + unit: /1 + period: year + label: Montana working military retirement exemption rate + reference: + - title: MCA 15-30-2120(3)(n)(i) and (8)(a) + href: https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html + - title: 2025 Montana Form WMRE, Part II, line 7 + href: https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=1 diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/survivor_rate.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/survivor_rate.yaml new file mode 100644 index 00000000000..c54ff092ade --- /dev/null +++ b/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/survivor_rate.yaml @@ -0,0 +1,12 @@ +description: Montana subtracts this share of military survivor benefits under the survivor benefit exemption. +values: + 2024-01-01: 0.5 +metadata: + unit: /1 + period: year + label: Montana military survivor benefit exemption rate + reference: + - title: MCA 15-30-2120(3)(n)(ii) + href: https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html + - title: 2025 Montana Form WMRE, Part III, line 2 + href: https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=1 diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/subtractions.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/subtractions.yaml index 78b1cee6d27..4143ba52d47 100644 --- a/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/subtractions.yaml +++ b/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/subtractions.yaml @@ -15,12 +15,11 @@ values: - salt_refund_income # Form 2 Subtractions Schedule - mt_other_subtractions 2024-01-01: - # MCA 15-30-2120(3)(n) allows exempting up to 50% of military retirement pay - # (capped at MT earned income, (3)(n)(i)) and up to 50% of military survivor - # benefits regardless of other income ((3)(n)(ii), Form WMRE); not yet modeled. - mt_interest_exemption_person - mt_tuition_subtraction_person - mt_old_age_subtraction + # MCA 15-30-2120(3)(n), Form WMRE + - mt_military_retirement_exemption - mt_disability_income_exclusion_person - salt_refund_income # MCA 15-30-2120 / Form 2 Subtractions Schedule - mt_other_subtractions @@ -32,6 +31,8 @@ values: - mt_interest_exemption_person - mt_tuition_subtraction_person - mt_old_age_subtraction + # MCA 15-30-2120(3)(n), Form WMRE + - mt_military_retirement_exemption - mt_disability_income_exclusion_person # TODO: Remove this subtraction starting in 2029 because the federal # Schedule 1-A deductions expire after 2028. @@ -53,3 +54,5 @@ metadata: href: https://leg.mt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0100/0150-0300-0210-0100.html - title: 2025 Montana Form 2 Instructions href: https://revenuefiles.mt.gov/files/Forms/Montana-Individual-Income-Tax-Return-Form-2-Instructions/2025_Montana_Individual_Income_Tax_Return_Form_2_Instructions.pdf#page=21 + - title: 2025 Montana Form WMRE + href: https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=1 diff --git a/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/subtractions/mt_military_retirement_exemption.yaml b/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/subtractions/mt_military_retirement_exemption.yaml new file mode 100644 index 00000000000..d252bd25754 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/subtractions/mt_military_retirement_exemption.yaml @@ -0,0 +1,200 @@ +# MCA 15-30-2120(3)(n), (8) and (9); 2025 Montana Form WMRE. + +- name: A working retiree exempts half the military retirement pay + period: 2026 + input: + people: + head: + age: 45 + military_retirement_pay: 30_000 + employment_income: 60_000 + spouse: + age: 43 + tax_units: + tax_unit: + members: [head, spouse] + households: + household: + members: [head, spouse] + state_name: MT + output: + # Form WMRE line 8: the lesser of 60,000 and 0.5 * 30,000. + mt_military_retirement_exemption: [15_000, 0] + mt_subtractions: [15_000, 0] + +- name: Montana earned income limits the retirement exemption + period: 2025 + input: + people: + head: + age: 50 + military_retirement_pay: 30_000 + employment_income: 8_000 + tax_units: + tax_unit: + members: [head] + households: + household: + members: [head] + state_name: MT + output: + mt_military_retirement_exemption: 8_000 + +- name: A retiree with no Montana earned income gets no retirement exemption + period: 2026 + input: + people: + head: + age: 67 + military_retirement_pay: 45_000 + social_security_retirement: 30_000 + taxable_interest_income: 5_000 + spouse: + age: 65 + tax_units: + tax_unit: + members: [head, spouse] + households: + household: + members: [head, spouse] + state_name: MT + output: + mt_military_retirement_exemption: [0, 0] + +- name: A survivor exempts half the survivor benefits with no earned income + period: 2025 + input: + people: + head: + age: 70 + military_retirement_pay_survivors: 10_000 + tax_units: + tax_unit: + members: [head] + households: + household: + members: [head] + state_name: MT + output: + mt_military_retirement_exemption: 5_000 + +- name: Retirement pay and survivor benefits on one return each get their exemption + period: 2026 + input: + people: + head: + age: 60 + military_retirement_pay: 20_000 + self_employment_income: 5_000 + spouse: + age: 58 + military_retirement_pay_survivors: 10_000 + tax_units: + tax_unit: + members: [head, spouse] + households: + household: + members: [head, spouse] + state_name: MT + output: + # min(0.5 * 20,000, 5,000) + 0.5 * 10,000 + mt_military_retirement_exemption: [10_000, 0] + +- name: The spouse's military pay counts against the return's wages + period: 2026 + input: + people: + head: + age: 50 + employment_income: 60_000 + spouse: + age: 48 + military_retirement_pay: 30_000 + tax_units: + tax_unit: + members: [head, spouse] + households: + household: + members: [head, spouse] + state_name: MT + output: + mt_military_retirement_exemption: [15_000, 0] + +- name: A business loss does not reduce wages in the earned income limit + period: 2026 + input: + people: + head: + age: 50 + military_retirement_pay: 30_000 + employment_income: 6_000 + self_employment_income: -4_000 + tax_units: + tax_unit: + members: [head] + households: + household: + members: [head] + state_name: MT + output: + # Form WMRE line 3 enters a business loss as 0. + mt_military_retirement_exemption: 6_000 + +- name: A dependent's military pay does not count on the filer's return + period: 2026 + input: + people: + head: + age: 70 + employment_income: 40_000 + dependent: + age: 45 + is_tax_unit_dependent: true + military_retirement_pay: 20_000 + tax_units: + tax_unit: + members: [head, dependent] + households: + household: + members: [head, dependent] + state_name: MT + output: + mt_military_retirement_exemption: [0, 0] + +- name: A filer who fails the residency or timing conditions gets no exemption + period: 2026 + input: + people: + head: + age: 45 + military_retirement_pay: 30_000 + employment_income: 60_000 + mt_military_retirement_exemption_eligible: false + tax_units: + tax_unit: + members: [head] + households: + household: + members: [head] + state_name: MT + output: + mt_military_retirement_exemption: 0 + +- name: Montana has no military retirement exemption before 2024 + period: 2023 + input: + people: + head: + age: 45 + military_retirement_pay: 30_000 + employment_income: 60_000 + tax_units: + tax_unit: + members: [head] + households: + household: + members: [head] + state_name: MT + output: + mt_military_retirement_exemption: 0 + mt_subtractions: 0 diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption.py new file mode 100644 index 00000000000..27000fa5546 --- /dev/null +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption.py @@ -0,0 +1,49 @@ +from policyengine_us.model_api import * + + +class mt_military_retirement_exemption(Variable): + value_type = float + entity = Person + label = "Montana working military retirement and survivor benefit exemption" + unit = USD + definition_period = YEAR + documentation = ( + "Form WMRE computes the exemption for the whole return, so the tax " + "unit head carries it." + ) + reference = ( + "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html", + "https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=1", + ) + defined_for = StateCode.MT + + def formula(person, period, parameters): + p = parameters(period).gov.states.mt.tax.income.subtractions.military_retirement + tax_unit = person.tax_unit + filer = person("is_tax_unit_head_or_spouse", period) + eligible = filer & person("mt_military_retirement_exemption_eligible", period) + retirement_pay = tax_unit.sum( + eligible * person("military_retirement_pay", period) + ) + survivor_benefits = tax_unit.sum( + eligible * person("military_retirement_pay_survivors", period) + ) + # 15-30-2120(8): the lesser of the return's Montana source wage + # income or the rate times the military retirement pay. Form WMRE + # lines 2 to 5 count wages and the net income of a business, a + # partnership or S corporation, and a farm, each at least zero. + earned_income = 0 + for source in [ + "irs_employment_income", + "self_employment_income", + "partnership_s_corp_income", + "farm_income", + ]: + earned_income = earned_income + max_( + 0, tax_unit.sum(filer * person(source, period)) + ) + retirement_exemption = min_(p.rate * retirement_pay, earned_income) + # 15-30-2120(3)(n)(ii): survivor benefits need no earned income. + survivor_exemption = p.survivor_rate * survivor_benefits + is_head = person("is_tax_unit_head", period) + return p.in_effect * is_head * (retirement_exemption + survivor_exemption) diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_eligible.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_eligible.py new file mode 100644 index 00000000000..2a3cbc2fb1d --- /dev/null +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_eligible.py @@ -0,0 +1,23 @@ +from policyengine_us.model_api import * + + +class mt_military_retirement_exemption_eligible(Variable): + value_type = bool + entity = Person + label = "Meets the residency and timing conditions of the Montana military retirement exemption" + definition_period = YEAR + default_value = True + documentation = ( + "MCA 15-30-2120(9): the retiree or survivor became a Montana resident " + "after June 30, 2023, or lived in Montana before the military " + "retirement pay or survivor benefits began; claims the exemption " + "within five consecutive years of meeting that condition (tax years " + "2024 through 2028 for residents from before July 2023); and has not " + "claimed it before moving out of Montana. Set this to false for a " + "filer who fails any of these conditions." + ) + reference = ( + "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html", + "https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=2", + ) + defined_for = StateCode.MT diff --git a/policyengine_us/variables/household/income/person/retirement/military_retirement_pay.py b/policyengine_us/variables/household/income/person/retirement/military_retirement_pay.py index 8a9a5539c9e..f8d83955e8a 100644 --- a/policyengine_us/variables/household/income/person/retirement/military_retirement_pay.py +++ b/policyengine_us/variables/household/income/person/retirement/military_retirement_pay.py @@ -15,8 +15,6 @@ class military_retirement_pay(Variable): "such as CRSC and VA Dependency and Indemnity Compensation (DIC) should be reported " "under veterans_benefits. Included in federal gross income under 26 U.S.C. § 61(a)(10).\n\n" "Known limitations:\n" - "- Montana (MCA 15-30-2120(3)(n)): allows a deduction of up to 50% of military retired pay " - "(capped at Montana earned income) starting in 2024; this deduction is not yet modeled.\n" "- North Carolina (N.C. Gen. Stat. § 105-153.5(b)(5a)): deduction requires either 20 years of military " "service or medical retirement; entering military_retirement_pay alone without service record " "variables (years_in_military or is_permanently_disabled_veteran) defaults to no deduction." From 3b2bcd51b02c6494cbb5003f3c17454e5eb50121 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 8 Nov 2026 01:38:25 -0500 Subject: [PATCH 2/2] Date the Montana residency condition as the statute does (on or after June 30, 2023) Co-Authored-By: Claude Opus 5.5 --- .../mt_military_retirement_exemption_eligible.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_eligible.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_eligible.py index 2a3cbc2fb1d..63147c59a80 100644 --- a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_eligible.py +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_eligible.py @@ -8,8 +8,8 @@ class mt_military_retirement_exemption_eligible(Variable): definition_period = YEAR default_value = True documentation = ( - "MCA 15-30-2120(9): the retiree or survivor became a Montana resident " - "after June 30, 2023, or lived in Montana before the military " + "MCA 15-30-2120(9): the retiree or survivor became a Montana resident on " + "or after June 30, 2023, or lived in Montana before the military " "retirement pay or survivor benefits began; claims the exemption " "within five consecutive years of meeting that condition (tax years " "2024 through 2028 for residents from before July 2023); and has not "