From 116ef6daf42180353577bceff01fcb8e06ae0446 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 8 Nov 2026 01:32:14 -0500 Subject: [PATCH 01/12] 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 02/12] 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 " From 09ed698f28106771b57d7dab0961348593f83304 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Wed, 11 Nov 2026 12:47:39 -0500 Subject: [PATCH 03/12] Count SSTB and Schedule F income in Montana's military retirement cap MCA 15-30-2120(8)(b) counts net income from a trade, business, profession or occupation and net farming income. The cap read self_employment_income (non-SSTB Schedule C only) and farm_income (the Schedule J averaging input, outside AGI). A new earned_income_sources parameter lists irs_employment_income, total_self_employment_income, partnership_s_corp_income and farm_operations_income, and the formula loops over it with the per-source zero floor. Also records three readings as source-conflict candidates (Schedule E income, both subtractions on one return, the per-source loss floor), pins the 2024 subtractions entry, the partnership and farm sources, the filer mask on earnings and the eligibility mask on survivor benefits, adds the ARM 42.15.1510(3)(a) and (b) examples, documents the armed forces scope, passive income and when the eligibility default stops being exact, drops page text from the RIC memo title, adds the 2024 Form 2 instructions as a source for the 2024 start, and removes the stale Montana limitation from military_retirement_pay_survivors. Co-Authored-By: Claude Opus 5.5 --- .../earned_income_sources.yaml | 24 ++ .../military_retirement/in_effect.yaml | 4 +- .../mt_military_retirement_exemption.yaml | 247 ++++++++++++++++++ .../mt_military_retirement_exemption.py | 22 +- ..._military_retirement_exemption_eligible.py | 29 +- .../military_retirement_pay_survivors.py | 2 - source_conflicts/candidates.yaml | 124 +++++++++ 7 files changed, 435 insertions(+), 17 deletions(-) create mode 100644 policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml new file mode 100644 index 00000000000..257a937124d --- /dev/null +++ b/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml @@ -0,0 +1,24 @@ +description: Montana counts these income sources as the Montana source wage income that limits the working military retirement exemption. +values: + 2024-01-01: + # 15-30-2120(8)(b)(i); Form WMRE line 2: wages on Form 1040 line 1z. + - irs_employment_income + # (8)(b)(ii); line 3: Schedule 1 line 3, which nets all Schedule C + # income, including a specified service trade or business. + - total_self_employment_income + # (8)(b)(ii); line 4: partnership and S corporation income. + - partnership_s_corp_income + # (8)(b)(iii); line 5: net farming income, which PolicyEngine holds as + # Schedule F income. + - farm_operations_income +metadata: + unit: list + period: year + label: Montana working military retirement exemption earned income sources + reference: + - title: MCA 15-30-2120(8)(b) + href: https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html + - title: ARM 42.15.1501(2) + href: https://www.law.cornell.edu/regulations/montana/Mont-Admin-r-42.15.1501 + - title: "2025 Montana Form WMRE, Part II, lines 2 to 5 and their instructions #page 1,3" + 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/in_effect.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/in_effect.yaml index d53050eec98..9e59406de6e 100644 --- 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 @@ -10,5 +10,7 @@ metadata: 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 + - title: 2024 Montana Form 2 instructions, Other Legislation Affecting Tax Year 2024 (Senate Bill 104) + href: https://revenue.mt.gov/files/forms/Montana-Individual-Income-Tax-Return-Form-2-Instructions/2024_Montana_Individual_Income_Tax_Return_Form_2_Instructions.pdf#page=6 + - title: Montana Revenue Interim Committee, Tax Benefits for Veterans (November 2025) 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/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 index d252bd25754..3ee74536568 100644 --- 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 @@ -198,3 +198,250 @@ output: mt_military_retirement_exemption: 0 mt_subtractions: 0 + +- name: The exemption joins Montana's subtractions in tax year 2024 + period: 2024 + input: + people: + head: + age: 50 + military_retirement_pay: 30_000 + employment_income: 50_000 + tax_units: + tax_unit: + members: [head] + households: + household: + members: [head] + state_name: MT + output: + # The lesser of 50,000 and 0.5 * 30,000. + mt_military_retirement_exemption: 15_000 + mt_subtractions: 15_000 + +- name: Income from a specified service business counts as earned income + period: 2026 + input: + people: + head: + age: 55 + military_retirement_pay: 30_000 + sstb_self_employment_income: 40_000 + tax_units: + tax_unit: + members: [head] + households: + household: + members: [head] + state_name: MT + output: + # 15-30-2120(8)(b)(ii) counts a profession; Form WMRE line 3 takes all + # of Schedule 1 line 3. The lesser of 40,000 and 0.5 * 30,000. + mt_military_retirement_exemption: 15_000 + +- name: A loss in one sole proprietorship offsets income from another before the floor + period: 2026 + input: + people: + head: + age: 55 + military_retirement_pay: 30_000 + self_employment_income: 10_000 + sstb_self_employment_income: -4_000 + tax_units: + tax_unit: + members: [head] + households: + household: + members: [head] + state_name: MT + output: + # Form WMRE line 3 is Schedule 1 line 3: 10,000 - 4,000 = 6,000. + mt_military_retirement_exemption: 6_000 + +- name: Partnership and S corporation income counts as earned income + period: 2025 + input: + people: + head: + age: 50 + military_retirement_pay: 30_000 + partnership_income: 5_000 + s_corp_income: 4_000 + tax_units: + tax_unit: + members: [head] + households: + household: + members: [head] + state_name: MT + output: + # Form WMRE line 4: the lesser of 9,000 and 0.5 * 30,000. + mt_military_retirement_exemption: 9_000 + +- name: Schedule F farm income counts as earned income + period: 2026 + input: + people: + head: + age: 55 + military_retirement_pay: 30_000 + farm_operations_income: 40_000 + tax_units: + tax_unit: + members: [head] + households: + household: + members: [head] + state_name: MT + output: + # 15-30-2120(8)(b)(iii); Form WMRE line 5. The lesser of 40,000 and + # 0.5 * 30,000. + mt_military_retirement_exemption: 15_000 + +- name: The Schedule J income averaging input is not earned income + period: 2026 + input: + people: + head: + age: 55 + military_retirement_pay: 30_000 + farm_income: 40_000 + tax_units: + tax_unit: + members: [head] + households: + household: + members: [head] + state_name: MT + output: + # farm_income is the Schedule J input, which is not in adjusted gross + # income; farm_operations_income holds Schedule F net income. + mt_military_retirement_exemption: 0 + +- name: Rents, royalties, farm rent and estate income are not earned income + period: 2026 + input: + people: + head: + age: 60 + military_retirement_pay: 30_000 + rental_income: 20_000 + farm_rent_income: 10_000 + estate_income: 10_000 + tax_units: + tax_unit: + members: [head] + households: + household: + members: [head] + state_name: MT + output: + # 15-30-2120(8)(b)(ii) counts net income from a trade, business, + # profession or occupation. These amounts share Schedule 1 line 5 with + # partnership and S corporation income, and none of them is that. + mt_military_retirement_exemption: 0 + +- name: A dependent's wages do not count on the filer's return + period: 2026 + input: + people: + head: + age: 50 + military_retirement_pay: 30_000 + dependent: + age: 17 + is_tax_unit_dependent: true + employment_income: 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 survivor who fails the residency or timing conditions gets no exemption + period: 2026 + input: + people: + head: + age: 70 + military_retirement_pay_survivors: 10_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: A retiree who is also a survivor takes both exemptions beside an ineligible spouse + period: 2026 + input: + people: + head: + age: 62 + military_retirement_pay: 24_000 + military_retirement_pay_survivors: 8_000 + spouse: + age: 60 + employment_income: 50_000 + military_retirement_pay: 10_000 + mt_military_retirement_exemption_eligible: false + tax_units: + tax_unit: + members: [head, spouse] + households: + household: + members: [head, spouse] + state_name: MT + output: + # The spouse's wages are on the return, and the spouse's own pay does + # not qualify: min(0.5 * 24,000, 50,000) + 0.5 * 8,000. + mt_military_retirement_exemption: [16_000, 0] + +- name: ARM 42.15.1510(3)(a), a retiree working a full-time job + period: 2025 + input: + people: + head: + age: 45 + military_retirement_pay: 40_000 + employment_income: 50_000 + tax_units: + tax_unit: + members: [head] + households: + household: + members: [head] + state_name: MT + output: + # The rule's example excludes 20,000, the lesser of 50,000 and + # 0.5 * 40,000. + mt_military_retirement_exemption: 20_000 + +- name: ARM 42.15.1510(3)(b), a retiree with seasonal self-employment income + period: 2025 + input: + people: + head: + age: 45 + military_retirement_pay: 40_000 + self_employment_income: 18_000 + tax_units: + tax_unit: + members: [head] + households: + household: + members: [head] + state_name: MT + output: + # The rule's example limits the exclusion to the 18,000 of Schedule C + # income. + mt_military_retirement_exemption: 18_000 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 index 27000fa5546..d86cb3934f5 100644 --- 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 @@ -9,10 +9,23 @@ class mt_military_retirement_exemption(Variable): definition_period = YEAR documentation = ( "Form WMRE computes the exemption for the whole return, so the tax " - "unit head carries it." + "unit head carries it. MCA 15-30-2120(3)(n)(i) covers retired members " + "of the armed forces as 10 U.S.C. 101 defines them (the Army, Navy, " + "Air Force, Marine Corps, Space Force and Coast Guard), the National " + "Guard and the reserve components. military_retirement_pay and " + "military_retirement_pay_survivors cover every uniformed service, so " + "this variable assumes that none of the pay comes from the NOAA " + "Corps or the Public Health Service. ARM 42.15.1501(2) leaves income " + "from a passive activity (26 U.S.C. 469(c)) out of the Montana " + "source wage income that limits a retiree's exemption. PolicyEngine " + "does not record material participation, so all of the return's " + "Schedule C, partnership, S corporation and Schedule F income counts." ) reference = ( "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html", + "https://www.law.cornell.edu/regulations/montana/Mont-Admin-r-42.15.1501", + "https://www.law.cornell.edu/regulations/montana/Mont-Admin-r-42.15.1510", + # PDF pages 1, 3 "https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=1", ) defined_for = StateCode.MT @@ -33,12 +46,7 @@ def formula(person, period, parameters): # 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", - ]: + for source in p.earned_income_sources: earned_income = earned_income + max_( 0, tax_unit.sum(filer * person(source, period)) ) 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 63147c59a80..f28e57d76f1 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,16 +8,31 @@ 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 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 " - "claimed it before moving out of Montana. Set this to false for a " - "filer who fails any of these conditions." + "MCA 15-30-2120(9): the retiree or survivor became a Montana resident " + "after June 30, 2023 (on or after that date for tax years from 2026, " + "under 2025 Mont. Laws ch. 586), or was a Montana resident before the " + "military retirement pay or survivor benefits began and has remained " + "one; claims the exemption within five consecutive years of meeting " + "that condition (tax years 2024 through 2028 for a resident from " + "before July 2023, by the Form WMRE instructions); and has not " + "claimed it and then moved out of Montana. Set this to false for a " + "filer who fails any of these conditions. PolicyEngine has no other " + "input for these facts, so the default of true overstates the " + "exemption in two known ways. From 2024, it includes a resident from " + "before July 2023 whose " + "pay or benefits began while living in another state. From 2029, it " + "also includes every filer whose five years have run out, starting " + "with those whose five years began in 2024. As a benchmark for " + "microsimulation totals, the Montana Revenue Interim Committee's " + "November 2025 memo reports 1,711 resident claimants and $24.8 " + "million for tax year 2024 (more than 1,783 claimants and $25.5 " + "million with nonresidents and part-year residents)." ) reference = ( "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html", + "https://archive.legmt.gov/bills/2023/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html", + "https://archive.legmt.gov/content/Sessions/69th/Contractor_index/CH0586.pdf#page=6", "https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=2", + "https://archive.legmt.gov/content/Committees/Interim/2025-2026/RIC/Meetings/November_12_13_2025/veteran-tax-benefits.pdf#page=1", ) defined_for = StateCode.MT diff --git a/policyengine_us/variables/household/income/person/retirement/military_retirement_pay_survivors.py b/policyengine_us/variables/household/income/person/retirement/military_retirement_pay_survivors.py index 2cc783b8a4e..39369f2d668 100644 --- a/policyengine_us/variables/household/income/person/retirement/military_retirement_pay_survivors.py +++ b/policyengine_us/variables/household/income/person/retirement/military_retirement_pay_survivors.py @@ -15,8 +15,6 @@ class military_retirement_pay_survivors(Variable): "which should be reported under veterans_benefits (see IRS Pub 525 (2024), p. 16). " "Included in federal gross income under 26 U.S.C. § 61(a)(10) and § 72.\n\n" "Known limitations:\n" - "- Montana (MCA 15-30-2120(3)(n)(ii)): allows exempting up to 50% of military survivor benefits " - "regardless of other income starting in 2024 (Form WMRE); 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_survivors alone without survivor " "eligibility variables (nc_military_retirement_survivor_eligible) defaults to no deduction." diff --git a/source_conflicts/candidates.yaml b/source_conflicts/candidates.yaml index 2674b4e9be5..81967286943 100644 --- a/source_conflicts/candidates.yaml +++ b/source_conflicts/candidates.yaml @@ -6701,6 +6701,130 @@ candidates: Montana AGI (Itemized Deductions Schedule line 1b), and from 2024 the federal floor on federal AGI applies (mt_medical_expense_deduction_joint.py, itemized/state_specific_deduction_applies.yaml); the joint standard deduction also uses pooled Montana AGI (mt_standard_deduction_joint.py). Verify the incorporated federal provision against the form''s AGI choice.' +- id: us-mt:military-retirement-and-survivor-exemptions-same-return + program: income-tax + years: + from: 2024 + type: tax + question: Can one Montana return take both the working military retiree subtraction and the military survivor benefit subtraction, + or only the one whose box the filer marks on Form WMRE? + sources: + - kind: statute + citation: MCA 15-30-2120(3)(n), (8)(a) and (9) + url: https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html + - kind: regulation + citation: ARM 42.15.1510(1) and (2) + url: https://www.law.cornell.edu/regulations/montana/Mont-Admin-r-42.15.1510 + - kind: form + citation: 2025 Form WMRE, taxpayer boxes and Part I, PDF page 1 + url: https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=1 + - kind: instructions + citation: 2025 Form WMRE instructions, Taxpayer Information, PDF page 3 + url: https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=3 + readings: + statute: (3)(n)(i) and (3)(n)(ii) are two subtractions joined by "and", each "subject to subsection (9)", and (8)(a) caps + only "the subtraction in subsection (3)(n)(i)". No provision makes a filer choose between them, so a return with an + eligible retiree's pay and an eligible survivor's benefits takes both. ARM 42.15.1510(1) and (2) state the two exclusions + separately. + other: The form says "Mark the appropriate box" (Military Retiree, or Beneficiary Receiving Military Survivor Benefits) + and "complete either Part II or Part III, as appropriate". Its instructions say "If you mark the Military Retiree box, + complete Parts I and II. If you mark the Beneficiary Receiving Military Survivor Benefits box, complete Parts I and + III" and "If filing jointly and both spouses qualify for the exemption, complete only one form", which gives a return + one of the two amounts. + example: In 2026 a head with $20,000 of military retired pay and $5,000 of business income, whose spouse has $10,000 of + survivor benefits, subtracts min(0.5 × 20,000, 5,000) + 0.5 × 10,000 = $10,000 under the statute. One form with one box + gives $5,000, from either Part II or Part III. + pe_us: + follows: statute + code: + - policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption.py + prs: + - https://github.com/PolicyEngine/policyengine-us/pull/10713 + state: ruled + note: PE-US adds the two amounts on the return (mt_military_retirement_exemption.py). The cases "Retirement pay and survivor + benefits on one return each get their exemption" and "A retiree who is also a survivor takes both exemptions beside an + ineligible spouse" in mt_military_retirement_exemption.yaml pin the reading. Neither the form nor its instructions addresses + a return that holds both retired pay and survivor benefits. +- id: us-mt:military-retirement-exemption-business-loss-floor + program: income-tax + years: + from: 2024 + type: tax + question: Does a net loss from a business, a partnership or S corporation, or a farm reduce the Montana source wage income + that limits the working military retiree subtraction, or does each source count as at least zero? + sources: + - kind: statute + citation: MCA 15-30-2120(8)(a)(i) and (8)(b) + url: https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html + - kind: form + citation: 2025 Form WMRE, Part II, lines 2 to 6, PDF page 1 + url: https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=1 + readings: + statute: (8)(a)(i) caps the subtraction at "the amount of Montana source wage income on the return", which (8)(b) defines + as wages and other compensation, "net income from a trade, business, profession, or occupation" and "net income from + farming activities". It does not say whether a net loss in one of these reduces the others. + other: Form WMRE lines 3, 4 and 5 each say "If zero or less, enter 0", and line 6 adds lines 2 through 5, so a loss in + one source reduces no other source. Line 3 takes Form 1040 Schedule 1 line 3, which nets every sole proprietorship on + the return before the floor applies. + example: A 2026 retiree with $30,000 of military retired pay, $6,000 of wages and a $4,000 business loss subtracts min(0.5 + × 30,000, 6,000) = $6,000 under the form. Netting the loss against the wages would give $2,000. + pe_us: + follows: gap-fill + code: + - policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption.py + prs: + - https://github.com/PolicyEngine/policyengine-us/pull/10713 + state: ruled + note: PE-US sums each of the four sources over the head and spouse and floors each sum at zero (mt_military_retirement_exemption.py). + The cases "A business loss does not reduce wages in the earned income limit" and "A loss in one sole proprietorship offsets + income from another before the floor" in mt_military_retirement_exemption.yaml pin the reading. +- id: us-mt:military-retirement-exemption-schedule-e-income + program: income-tax + years: + from: 2024 + type: tax + question: Does the Montana source wage income that limits the working military retiree subtraction count all of Form 1040 + Schedule 1 line 5 (rents, royalties, estates and trusts as well as partnerships and S corporations), or only net income + from a trade, business, profession or occupation? + sources: + - kind: statute + citation: MCA 15-30-2120(8)(b) + url: https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html + - kind: regulation + citation: ARM 42.15.1501(2) + url: https://www.law.cornell.edu/regulations/montana/Mont-Admin-r-42.15.1501 + - kind: form + citation: 2025 Form WMRE, Part II, line 4, PDF page 1 + url: https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=1 + - kind: instructions + citation: 2025 Form WMRE instructions, line 4, PDF page 3 + url: https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=3 + readings: + statute: (8)(b) counts "wages, salary, tips, and other compensation for services performed in the state", "net income + from a trade, business, profession, or occupation carried on in the state" and "net income from farming activities carried + on in the state". ARM 42.15.1501(2) adds that the term "does not include income from any passive activity as that term + is defined in 26 USC 469(c)", and 469(c)(2) includes any rental activity. Rents, royalties and estate or trust income + are none of the three, so they stay out. The form's own line 4 label is "Montana source partnership and S corporation + income". + other: The line 4 instruction says "Residents actively engaged in a business as an owner of a partnership or S corporation, + enter the amount from Form 1040, Schedule 1, line 5". That line also carries rental real estate, royalties, estates, + trusts and Form 4835 farm rent, so all of it would count. + example: A 2026 retiree with $30,000 of military retired pay, $20,000 of rents, $10,000 of Form 4835 farm rent and $10,000 + of estate income, and no other earnings, subtracts $0 under the statute and min(0.5 × 30,000, 40,000) = $15,000 if all + of Schedule 1 line 5 counts. + pe_us: + follows: statute + code: + - policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml + - policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption.py + prs: + - https://github.com/PolicyEngine/policyengine-us/pull/10713 + state: ruled + note: The source list holds wages, all Schedule C income, partnership and S corporation income and Schedule F income (earned_income_sources.yaml); + rental_income, farm_rent_income and estate_income stay out. The case "Rents, royalties, farm rent and estate income are + not earned income" in mt_military_retirement_exemption.yaml pins the reading. PE-US has no input for material participation, + so it counts all Schedule C, partnership, S corporation and Schedule F income, including any that ARM 42.15.1501(2) would + leave out as passive. - id: us-nc:lieap-gross-versus-net-income program: liheap years: From e65f906ee7609fedb4477ca55ec2423a1f9e971a Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Fri, 13 Nov 2026 09:24:17 -0500 Subject: [PATCH 04/12] Capture the 2025 Montana Form WMRE text for the three source-conflict candidates Co-Authored-By: Claude Opus 5.5 --- .../sources/us-mt/form-wmre-2025.txt | 285 ++++++++++++++++++ 1 file changed, 285 insertions(+) create mode 100644 source_conflicts/sources/us-mt/form-wmre-2025.txt diff --git a/source_conflicts/sources/us-mt/form-wmre-2025.txt b/source_conflicts/sources/us-mt/form-wmre-2025.txt new file mode 100644 index 00000000000..e278c4f2b75 --- /dev/null +++ b/source_conflicts/sources/us-mt/form-wmre-2025.txt @@ -0,0 +1,285 @@ +Source: https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf +2025 Montana Form WMRE (V1 6/2025), form and instructions. Pages 1-3, text extracted with pdftotext 26.09.0 (poppler), reading order, with -remove-hyphens none so line-end hyphens stay as printed. PDF fetched 2026-11-13 (Last-Modified: Mon, 29 Dec 2025 19:48:49 GMT; 292,318 bytes; sha256 a6a5c425a6924cc5bd37346baf68b178057d865459c237f91cfd7dac5975781c). + +2025 Montana Working Military Retirement and +Survivor Benefit Exemption + +Form WMRE +V1 6/2025 +Clear Form + +15-30-2120(3)(n) + +First Name + +Initial Last Name + +Mark the appropriate box. +Military Retiree +Beneficiary Receiving Military Survivor Benefits + +Social Security Number +First tax year the exemption was taken: + +Part I. Residency Information + +Date you became a Montana resident. +If you became a resident before July 1, 2023, enter the date you began receiving military +retirement income or began receiving military survivor benefits. + +MM D D Y Y Y Y +MM D D Y Y Y Y + +► If you were a resident before July 1, 2023, and the date you began receiving military retirement income or survivor +benefits was before the date you became a Montana resident, stop here. You do not qualify for this exemption. +► If you do qualify for this exemption, complete either Part II or Part III, as appropriate. + +Part II. Working Military Retiree Exemption + +1 +2 +3 +4 +5 +6 +7 + +00 +00 +00 +00 +00 +00 +00 + +8 + +00 + +1 Taxable military survivor benefits from Form 1099-R from Defense Finance and +Accounting Service, line 2a +1 +2 Multiply line 1 by 50% (0.50). Enter here and on Form 2, Schedule I, Part I, line 13. +This your Military Survivor Benefit Exemption. 2 + +00 + +1 +2 +3 +4 +5 +6 +7 +8 + +Taxable military retirement income +Montana source wages +Montana source business income. If zero or less, enter 0. +Montana source partnership and S corporation income. If zero or less, enter 0. (See instructions) +Montana source farming income. If zero or less, enter 0. +Add lines 2 through 5 +Multiply line 1 by 50% (0.50) +Enter the lesser of line 6 or line 7 here and on Form 2, Schedule I, Part I, line 13. +This is your Working Military Retirement Exemption. + +Part III. Survivor Benefit Exemption + +2025 Montana Working Military Retirement and Survivor Benefit Exemption + +00 + +Page 1 of 3 + + 2025 Montana Working Military Retirement and +Survivor Benefit Exemption Instructions +What’s New +This exemption was set to expire on December 31, 2033. +Senate Bill 124, passed in 2025, repealed this +expiration date. + +Purpose of Form + +Beneficiaries receiving military survivor benefits under +the U.S. Department of Defense’s Survivor Benefit +Plan can exempt 50% of their military survivor benefits +from Montana taxable income. Death benefits paid to a +survivor beneficiary do not qualify for this exemption. + +Use Form WMRE to calculate the amount of military +retirement income or military survivor benefits you can +exempt from your Montana taxable income. You must +attach this form to your Montana Individual Income +Tax Form (Form 2) to claim this exemption. + +The exemption can only be claimed for five consecutive +years after meeting the eligibility requirements. For +eligible retirees or beneficiaries who were residents +before July 1, 2023, the exemption is available for five +years beginning with tax year 2024. The last year these +taxpayers can claim the exemption will be tax year 2028. + +Residency Requirements + +Examples + +This exemption is available to military retirees, and +beneficiaries receiving military survivors benefits, +who became Montana residents after June 30, 2023; +or were residents before July 1, 2023, and began +receiving military retirement income or survivor +benefits while a Montana resident. +The exemption is not available to retirees or beneficiaries +that became residents before July 1, 2023, and began +receiving military retirement income or survivor benefits +before they became a Montana resident. If the taxpayer +became a resident before July 1, 2023, the taxpayer must +have established residency before receiving the military +retirement income or survivor benefits. Additionally, +retirees or beneficiaries that become nonresidents after +having been a Montana resident are not eligible to claim +the exemption. + +Exemption +The retirement income or survivor benefits must +be received for service in the U.S. Armed Forces, +Army National Guard, Air National Guard, or a +U.S. Reserve Component. U.S. Armed Forces +includes the Army, Navy, Marine Corps, Air Force, +Space Force, and Coast Guard. +For military retirees, the exemption is the lesser of: +● 50% of the taxpayer’s military retirement income +received from service in the U.S. Armed Forces, +Army National Guard, Air National Guard, or U.S. +Reserve Component, or +● the total Montana source income from: +○ Wages, salary, and tips from compensation +performed in Montana +○ Net income from a trade or business +in Montana +○ Net income from farming activities in Montana + +Sarah, a military retiree, moved to Montana on +August 1, 2023, to work for a business in Montana. +Because she moved to Montana after June 30, 2023, +she can exempt the lesser of half of her military +retirement income or all of her wages earned from +working at the business. +Jack served at a military installation in Montana +until December 31, 2022, when he retired. During +his service he established residency in Montana. +After his retirement, he opened a restaurant in the +state. Because he became a resident before he +began receiving his military retirement income and +before July 1, 2023, he is eligible for a deduction of +the lesser of half of his military retirement income or +all of the income earned from his Montana restaurant. +Albert, a military retiree, moved to Montana in 2021 to +work for a business in Montana. He began receiving +his military retirement income when he was a resident +of Georgia in 2020. Because he was not a resident +before receiving his retirement, and he did not become +a Montana resident after June 30, 2023, he is not +eligible for the exemption. +Jim, who receives military survivor benefits, moved to +Montana on January 1, 2025. In addition to his survivor +benefits, he receives income from owning a Montana +business. His business income is less than his survivor +benefits. However, because Jim is receiving survivor +benefits, he can only exempt half of his survivor benefits. +Mary, a military retiree, became a Montana resident in +August of 2023. She claims the exemption on her 2024 +and 2025 tax returns. She becomes a resident of another +state in 2026. She is no longer eligible for the exemption, +even if she reestablishes residency in Montana in a later +tax year, because she became a nonresident after having +already claimed the exemption. + +2025 Montana Working Military Retirement and Survivor Benefit Exemption + +Page 2 of 3 + + Line Instructions +Taxpayer Information +You must include a copy of Form WMRE with your +Form 2 to claim this exemption. If filing jointly and +both spouses qualify for the exemption, complete only +one form. Enter the name and Social Security Number +of the taxpayer listed first on the Form 2, page 1. +Mark the box for the type of exemption you will take. +If you mark the Military Retiree box, complete +Parts I and II. If you mark the Beneficiary Receiving +Military Survivor Benefits box, complete Parts I and III. + +Part I. Residency Information +Report the date you became a Montana resident. +If you have always been a Montana resident, enter +your birthdate. +If you became a Montana resident from any other +state before July 1, 2023, enter the date you became +a resident. Generally, this is the date you reported on +the first Montana Form 2 you filed. If you do not have +that date, you may enter an approximation of the date +you became a Montana resident. For example, you +can report the date you obtained a Montana driver’s +license or purchased a residence in Montana. + +Part II. Military Retiree Exemption +If you are a resident military retiree that did not earn +Montana source income from working a job, running +a business, or operating a farm, you do not qualify for +this exemption. +Line 1 – Military retirement income. Residents +enter the taxable amount of retirement income +received from service in the U.S. Armed Forces, Army +National Guard, Air National Guard, or U.S. Reserves. +This amount is reported on a Form 1099-R in box 2a +with a code of 7 in box 7. Part-year residents enter the +amount of the military retirement income received while +a Montana resident. + +Line 2 – Montana source wages. Residents enter +the total wages included on Form 1040, line 1z. +Part-year residents enter the Montana source wages +earned while working in Montana as a resident. +Line 3 – Montana source business income. +Residents that materially participate in a business +as a sole proprietor enter the total business income +included on Form 1040, Schedule 1, line 3. Part-year +residents that materially participate in a business as +a sole proprietor enter the Montana source business +income earned while a Montana resident. +Line 4 – Montana source partnership and S +corporation income. Residents actively engaged +in a business as an owner of a partnership or +S corporation, enter the amount from Form 1040, +Schedule 1, line 5. Part-year residents enter the +Montana source business income from a partnership +or S corporation earned while a Montana resident. +Line 5 – Montana source farming income. +Residents enter the farming income from Form 1040, +Schedule 1, line 11. Part-year residents enter the +Montana source farming income received while a +resident of Montana. + +Part III. Survivor Benefits Exemption +Line 1 – Survivor benefits. Residents enter the taxable +amount of survivor benefits received from under the +U.S. Department of Defense’s Survivor Benefit Plan. +This amount is reported on the Form 1099-R received +from DFAS in box 2a with a code of 7 in box 7. Part- +year residents enter the amount of the survivor benefits +received from DFAS while a Montana resident. +Do not report death benefits reported on a Form 1099-R +with a code of 4 in box 7, on this line. Death benefits do +not qualify for the exemption. +Administrative Rules of Montana. +ARM 42.15.1501 and 42.15.1512. +Questions? Call us at (406) 444-6900 or Montana +Relay at 711 for hearing impaired. + +2025 Montana Working Military Retirement and Survivor Benefit Exemption + +Page 3 of 3 + + \ No newline at end of file From ceb2f71466d8ddcacac1d0e5c613b3cb69e0d555 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 21 Nov 2026 13:55:15 +0100 Subject: [PATCH 05/12] Reflow the Montana Form WMRE capture to one paragraph per line Pages 2 and 3 follow the form's column order, one paragraph or list item per line, and page 1 follows its visual reading order, so every quoted WMRE excerpt matches the capture verbatim. Co-Authored-By: Claude Opus 5.5 --- .../sources/us-mt/form-wmre-2025.txt | 285 ++++-------------- 1 file changed, 52 insertions(+), 233 deletions(-) diff --git a/source_conflicts/sources/us-mt/form-wmre-2025.txt b/source_conflicts/sources/us-mt/form-wmre-2025.txt index e278c4f2b75..64dfe8fdf78 100644 --- a/source_conflicts/sources/us-mt/form-wmre-2025.txt +++ b/source_conflicts/sources/us-mt/form-wmre-2025.txt @@ -1,285 +1,104 @@ Source: https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf -2025 Montana Form WMRE (V1 6/2025), form and instructions. Pages 1-3, text extracted with pdftotext 26.09.0 (poppler), reading order, with -remove-hyphens none so line-end hyphens stay as printed. PDF fetched 2026-11-13 (Last-Modified: Mon, 29 Dec 2025 19:48:49 GMT; 292,318 bytes; sha256 a6a5c425a6924cc5bd37346baf68b178057d865459c237f91cfd7dac5975781c). - -2025 Montana Working Military Retirement and -Survivor Benefit Exemption +2025 Montana Form WMRE (V1 6/2025), form and instructions. Pages 1-3, extracted with pdftotext 26.09.0 (Poppler) and -remove-hyphens none. Page 1 uses -layout, with wrapped form labels and directions joined in reading order. Pages 2-3 are transcribed in column order with one paragraph or list item per line. PDF fetched 2026-11-13 (Last-Modified: Mon, 29 Dec 2025 19:48:49 GMT; 292,318 bytes; sha256 a6a5c425a6924cc5bd37346baf68b178057d865459c237f91cfd7dac5975781c). +2025 Montana Working Military Retirement and Survivor Benefit Exemption Form WMRE V1 6/2025 Clear Form - 15-30-2120(3)(n) First Name - Initial Last Name +Social Security Number Mark the appropriate box. Military Retiree Beneficiary Receiving Military Survivor Benefits -Social Security Number First tax year the exemption was taken: Part I. Residency Information +Date you became a Montana resident. MM D D Y Y Y Y +If you became a resident before July 1, 2023, enter the date you began receiving military retirement income or began receiving military survivor benefits. MM D D Y Y Y Y -Date you became a Montana resident. -If you became a resident before July 1, 2023, enter the date you began receiving military -retirement income or began receiving military survivor benefits. - -MM D D Y Y Y Y -MM D D Y Y Y Y - -► If you were a resident before July 1, 2023, and the date you began receiving military retirement income or survivor -benefits was before the date you became a Montana resident, stop here. You do not qualify for this exemption. +► If you were a resident before July 1, 2023, and the date you began receiving military retirement income or survivor benefits was before the date you became a Montana resident, stop here. You do not qualify for this exemption. ► If you do qualify for this exemption, complete either Part II or Part III, as appropriate. Part II. Working Military Retiree Exemption - -1 -2 -3 -4 -5 -6 -7 - -00 -00 -00 -00 -00 -00 -00 - -8 - -00 - -1 Taxable military survivor benefits from Form 1099-R from Defense Finance and -Accounting Service, line 2a -1 -2 Multiply line 1 by 50% (0.50). Enter here and on Form 2, Schedule I, Part I, line 13. -This your Military Survivor Benefit Exemption. 2 - -00 - -1 -2 -3 -4 -5 -6 -7 -8 - -Taxable military retirement income -Montana source wages -Montana source business income. If zero or less, enter 0. -Montana source partnership and S corporation income. If zero or less, enter 0. (See instructions) -Montana source farming income. If zero or less, enter 0. -Add lines 2 through 5 -Multiply line 1 by 50% (0.50) -Enter the lesser of line 6 or line 7 here and on Form 2, Schedule I, Part I, line 13. -This is your Working Military Retirement Exemption. +1 Taxable military retirement income 1 00 +2 Montana source wages 2 00 +3 Montana source business income. If zero or less, enter 0. 3 00 +4 Montana source partnership and S corporation income. If zero or less, enter 0. (See instructions) 4 00 +5 Montana source farming income. If zero or less, enter 0. 5 00 +6 Add lines 2 through 5 6 00 +7 Multiply line 1 by 50% (0.50) 7 00 +8 Enter the lesser of line 6 or line 7 here and on Form 2, Schedule I, Part I, line 13. This is your Working Military Retirement Exemption. 8 00 Part III. Survivor Benefit Exemption +1 Taxable military survivor benefits from Form 1099-R from Defense Finance and Accounting Service, line 2a 1 00 +2 Multiply line 1 by 50% (0.50). Enter here and on Form 2, Schedule I, Part I, line 13. This your Military Survivor Benefit Exemption. 2 00 2025 Montana Working Military Retirement and Survivor Benefit Exemption - -00 - Page 1 of 3 - 2025 Montana Working Military Retirement and -Survivor Benefit Exemption Instructions +2025 Montana Working Military Retirement and Survivor Benefit Exemption Instructions + What’s New -This exemption was set to expire on December 31, 2033. -Senate Bill 124, passed in 2025, repealed this -expiration date. +This exemption was set to expire on December 31, 2033. Senate Bill 124, passed in 2025, repealed this expiration date. Purpose of Form - -Beneficiaries receiving military survivor benefits under -the U.S. Department of Defense’s Survivor Benefit -Plan can exempt 50% of their military survivor benefits -from Montana taxable income. Death benefits paid to a -survivor beneficiary do not qualify for this exemption. - -Use Form WMRE to calculate the amount of military -retirement income or military survivor benefits you can -exempt from your Montana taxable income. You must -attach this form to your Montana Individual Income -Tax Form (Form 2) to claim this exemption. - -The exemption can only be claimed for five consecutive -years after meeting the eligibility requirements. For -eligible retirees or beneficiaries who were residents -before July 1, 2023, the exemption is available for five -years beginning with tax year 2024. The last year these -taxpayers can claim the exemption will be tax year 2028. +Use Form WMRE to calculate the amount of military retirement income or military survivor benefits you can exempt from your Montana taxable income. You must attach this form to your Montana Individual Income Tax Form (Form 2) to claim this exemption. Residency Requirements - -Examples - -This exemption is available to military retirees, and -beneficiaries receiving military survivors benefits, -who became Montana residents after June 30, 2023; -or were residents before July 1, 2023, and began -receiving military retirement income or survivor -benefits while a Montana resident. -The exemption is not available to retirees or beneficiaries -that became residents before July 1, 2023, and began -receiving military retirement income or survivor benefits -before they became a Montana resident. If the taxpayer -became a resident before July 1, 2023, the taxpayer must -have established residency before receiving the military -retirement income or survivor benefits. Additionally, -retirees or beneficiaries that become nonresidents after -having been a Montana resident are not eligible to claim -the exemption. +This exemption is available to military retirees, and beneficiaries receiving military survivors benefits, who became Montana residents after June 30, 2023; or were residents before July 1, 2023, and began receiving military retirement income or survivor benefits while a Montana resident. +The exemption is not available to retirees or beneficiaries that became residents before July 1, 2023, and began receiving military retirement income or survivor benefits before they became a Montana resident. If the taxpayer became a resident before July 1, 2023, the taxpayer must have established residency before receiving the military retirement income or survivor benefits. Additionally, retirees or beneficiaries that become nonresidents after having been a Montana resident are not eligible to claim the exemption. Exemption -The retirement income or survivor benefits must -be received for service in the U.S. Armed Forces, -Army National Guard, Air National Guard, or a -U.S. Reserve Component. U.S. Armed Forces -includes the Army, Navy, Marine Corps, Air Force, -Space Force, and Coast Guard. +The retirement income or survivor benefits must be received for service in the U.S. Armed Forces, Army National Guard, Air National Guard, or a U.S. Reserve Component. U.S. Armed Forces includes the Army, Navy, Marine Corps, Air Force, Space Force, and Coast Guard. For military retirees, the exemption is the lesser of: -● 50% of the taxpayer’s military retirement income -received from service in the U.S. Armed Forces, -Army National Guard, Air National Guard, or U.S. -Reserve Component, or +● 50% of the taxpayer’s military retirement income received from service in the U.S. Armed Forces, Army National Guard, Air National Guard, or U.S. Reserve Component, or ● the total Montana source income from: -○ Wages, salary, and tips from compensation -performed in Montana -○ Net income from a trade or business -in Montana +○ Wages, salary, and tips from compensation performed in Montana +○ Net income from a trade or business in Montana ○ Net income from farming activities in Montana -Sarah, a military retiree, moved to Montana on -August 1, 2023, to work for a business in Montana. -Because she moved to Montana after June 30, 2023, -she can exempt the lesser of half of her military -retirement income or all of her wages earned from -working at the business. -Jack served at a military installation in Montana -until December 31, 2022, when he retired. During -his service he established residency in Montana. -After his retirement, he opened a restaurant in the -state. Because he became a resident before he -began receiving his military retirement income and -before July 1, 2023, he is eligible for a deduction of -the lesser of half of his military retirement income or -all of the income earned from his Montana restaurant. -Albert, a military retiree, moved to Montana in 2021 to -work for a business in Montana. He began receiving -his military retirement income when he was a resident -of Georgia in 2020. Because he was not a resident -before receiving his retirement, and he did not become -a Montana resident after June 30, 2023, he is not -eligible for the exemption. -Jim, who receives military survivor benefits, moved to -Montana on January 1, 2025. In addition to his survivor -benefits, he receives income from owning a Montana -business. His business income is less than his survivor -benefits. However, because Jim is receiving survivor -benefits, he can only exempt half of his survivor benefits. -Mary, a military retiree, became a Montana resident in -August of 2023. She claims the exemption on her 2024 -and 2025 tax returns. She becomes a resident of another -state in 2026. She is no longer eligible for the exemption, -even if she reestablishes residency in Montana in a later -tax year, because she became a nonresident after having -already claimed the exemption. +Beneficiaries receiving military survivor benefits under the U.S. Department of Defense’s Survivor Benefit Plan can exempt 50% of their military survivor benefits from Montana taxable income. Death benefits paid to a survivor beneficiary do not qualify for this exemption. +The exemption can only be claimed for five consecutive years after meeting the eligibility requirements. For eligible retirees or beneficiaries who were residents before July 1, 2023, the exemption is available for five years beginning with tax year 2024. The last year these taxpayers can claim the exemption will be tax year 2028. -2025 Montana Working Military Retirement and Survivor Benefit Exemption +Examples +Sarah, a military retiree, moved to Montana on August 1, 2023, to work for a business in Montana. Because she moved to Montana after June 30, 2023, she can exempt the lesser of half of her military retirement income or all of her wages earned from working at the business. +Jack served at a military installation in Montana until December 31, 2022, when he retired. During his service he established residency in Montana. After his retirement, he opened a restaurant in the state. Because he became a resident before he began receiving his military retirement income and before July 1, 2023, he is eligible for a deduction of the lesser of half of his military retirement income or all of the income earned from his Montana restaurant. +Albert, a military retiree, moved to Montana in 2021 to work for a business in Montana. He began receiving his military retirement income when he was a resident of Georgia in 2020. Because he was not a resident before receiving his retirement, and he did not become a Montana resident after June 30, 2023, he is not eligible for the exemption. +Jim, who receives military survivor benefits, moved to Montana on January 1, 2025. In addition to his survivor benefits, he receives income from owning a Montana business. His business income is less than his survivor benefits. However, because Jim is receiving survivor benefits, he can only exempt half of his survivor benefits. +Mary, a military retiree, became a Montana resident in August of 2023. She claims the exemption on her 2024 and 2025 tax returns. She becomes a resident of another state in 2026. She is no longer eligible for the exemption, even if she reestablishes residency in Montana in a later tax year, because she became a nonresident after having already claimed the exemption. +2025 Montana Working Military Retirement and Survivor Benefit Exemption Page 2 of 3 - Line Instructions +Line Instructions + Taxpayer Information -You must include a copy of Form WMRE with your -Form 2 to claim this exemption. If filing jointly and -both spouses qualify for the exemption, complete only -one form. Enter the name and Social Security Number -of the taxpayer listed first on the Form 2, page 1. -Mark the box for the type of exemption you will take. -If you mark the Military Retiree box, complete -Parts I and II. If you mark the Beneficiary Receiving -Military Survivor Benefits box, complete Parts I and III. +You must include a copy of Form WMRE with your Form 2 to claim this exemption. If filing jointly and both spouses qualify for the exemption, complete only one form. Enter the name and Social Security Number of the taxpayer listed first on the Form 2, page 1. +Mark the box for the type of exemption you will take. If you mark the Military Retiree box, complete Parts I and II. If you mark the Beneficiary Receiving Military Survivor Benefits box, complete Parts I and III. Part I. Residency Information -Report the date you became a Montana resident. -If you have always been a Montana resident, enter -your birthdate. -If you became a Montana resident from any other -state before July 1, 2023, enter the date you became -a resident. Generally, this is the date you reported on -the first Montana Form 2 you filed. If you do not have -that date, you may enter an approximation of the date -you became a Montana resident. For example, you -can report the date you obtained a Montana driver’s -license or purchased a residence in Montana. +Report the date you became a Montana resident. If you have always been a Montana resident, enter your birthdate. +If you became a Montana resident from any other state before July 1, 2023, enter the date you became a resident. Generally, this is the date you reported on the first Montana Form 2 you filed. If you do not have that date, you may enter an approximation of the date you became a Montana resident. For example, you can report the date you obtained a Montana driver’s license or purchased a residence in Montana. Part II. Military Retiree Exemption -If you are a resident military retiree that did not earn -Montana source income from working a job, running -a business, or operating a farm, you do not qualify for -this exemption. -Line 1 – Military retirement income. Residents -enter the taxable amount of retirement income -received from service in the U.S. Armed Forces, Army -National Guard, Air National Guard, or U.S. Reserves. -This amount is reported on a Form 1099-R in box 2a -with a code of 7 in box 7. Part-year residents enter the -amount of the military retirement income received while -a Montana resident. - -Line 2 – Montana source wages. Residents enter -the total wages included on Form 1040, line 1z. -Part-year residents enter the Montana source wages -earned while working in Montana as a resident. -Line 3 – Montana source business income. -Residents that materially participate in a business -as a sole proprietor enter the total business income -included on Form 1040, Schedule 1, line 3. Part-year -residents that materially participate in a business as -a sole proprietor enter the Montana source business -income earned while a Montana resident. -Line 4 – Montana source partnership and S -corporation income. Residents actively engaged -in a business as an owner of a partnership or -S corporation, enter the amount from Form 1040, -Schedule 1, line 5. Part-year residents enter the -Montana source business income from a partnership -or S corporation earned while a Montana resident. -Line 5 – Montana source farming income. -Residents enter the farming income from Form 1040, -Schedule 1, line 11. Part-year residents enter the -Montana source farming income received while a -resident of Montana. +If you are a resident military retiree that did not earn Montana source income from working a job, running a business, or operating a farm, you do not qualify for this exemption. +Line 1 – Military retirement income. Residents enter the taxable amount of retirement income received from service in the U.S. Armed Forces, Army National Guard, Air National Guard, or U.S. Reserves. This amount is reported on a Form 1099-R in box 2a with a code of 7 in box 7. Part-year residents enter the amount of the military retirement income received while a Montana resident. +Line 2 – Montana source wages. Residents enter the total wages included on Form 1040, line 1z. Part-year residents enter the Montana source wages earned while working in Montana as a resident. +Line 3 – Montana source business income. Residents that materially participate in a business as a sole proprietor enter the total business income included on Form 1040, Schedule 1, line 3. Part-year residents that materially participate in a business as a sole proprietor enter the Montana source business income earned while a Montana resident. +Line 4 – Montana source partnership and S corporation income. Residents actively engaged in a business as an owner of a partnership or S corporation, enter the amount from Form 1040, Schedule 1, line 5. Part-year residents enter the Montana source business income from a partnership or S corporation earned while a Montana resident. +Line 5 – Montana source farming income. Residents enter the farming income from Form 1040, Schedule 1, line 11. Part-year residents enter the Montana source farming income received while a resident of Montana. Part III. Survivor Benefits Exemption -Line 1 – Survivor benefits. Residents enter the taxable -amount of survivor benefits received from under the -U.S. Department of Defense’s Survivor Benefit Plan. -This amount is reported on the Form 1099-R received -from DFAS in box 2a with a code of 7 in box 7. Part- -year residents enter the amount of the survivor benefits -received from DFAS while a Montana resident. -Do not report death benefits reported on a Form 1099-R -with a code of 4 in box 7, on this line. Death benefits do -not qualify for the exemption. -Administrative Rules of Montana. -ARM 42.15.1501 and 42.15.1512. -Questions? Call us at (406) 444-6900 or Montana -Relay at 711 for hearing impaired. +Line 1 – Survivor benefits. Residents enter the taxable amount of survivor benefits received from under the U.S. Department of Defense’s Survivor Benefit Plan. This amount is reported on the Form 1099-R received from DFAS in box 2a with a code of 7 in box 7. Part-year residents enter the amount of the survivor benefits received from DFAS while a Montana resident. +Do not report death benefits reported on a Form 1099-R with a code of 4 in box 7, on this line. Death benefits do not qualify for the exemption. -2025 Montana Working Military Retirement and Survivor Benefit Exemption +Administrative Rules of Montana. ARM 42.15.1501 and 42.15.1512. +Questions? Call us at (406) 444-6900 or Montana Relay at 711 for hearing impaired. +2025 Montana Working Military Retirement and Survivor Benefit Exemption Page 3 of 3 - - \ No newline at end of file From a944005d0d9c9eb0832d3e0753a6f8bcc19425c5 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 29 Nov 2026 09:48:45 -0500 Subject: [PATCH 06/12] Record Montana's wage-location reading for military retirement MCA 15-30-2120(8)(b) counts only Montana-source wages and business income, while Form WMRE takes all wages and Schedule 1 line 3 income. Adds a source-conflict candidate and a documentation sentence, an end-to-end 2026 case, the exemption in mt_other_subtractions' list, and calls the committee's $24.8 million income exempted. Co-Authored-By: Claude Opus 5.5 --- .../mt_military_retirement_exemption.yaml | 27 +++++++++++ .../mt_military_retirement_exemption.py | 6 ++- ..._military_retirement_exemption_eligible.py | 7 ++- .../subtractions/mt_other_subtractions.py | 1 + source_conflicts/candidates.yaml | 47 +++++++++++++++++++ 5 files changed, 85 insertions(+), 3 deletions(-) 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 index 3ee74536568..216aea49fe4 100644 --- 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 @@ -445,3 +445,30 @@ # The rule's example limits the exclusion to the 18,000 of Schedule C # income. mt_military_retirement_exemption: 18_000 + +- name: An eligible single filer's Montana taxable income and tax + period: 2026 + absolute_error_margin: 0.01 + input: + people: + head: + age: 45 + military_retirement_pay: 30_000 + employment_income: 50_000 + tax_units: + tax_unit: + members: [head] + households: + household: + members: [head] + state_name: MT + output: + # Form WMRE line 8: the lesser of 50,000 and 0.5 * 30,000. + mt_military_retirement_exemption: 15_000 + mt_subtractions: 15_000 + # Federal taxable income is 80,000 of AGI less the 16,100 standard + # deduction, or 63,900. Montana subtracts the 15,000 exemption. + mt_taxable_income_joint: 48_900 + # 0.047 * 47,500 + 0.0565 * (48,900 - 47,500) = 2,232.50 + 79.10. + # No Montana credit applies. + mt_income_tax: 2_311.6 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 index d86cb3934f5..d1d564eb467 100644 --- 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 @@ -19,7 +19,11 @@ class mt_military_retirement_exemption(Variable): "from a passive activity (26 U.S.C. 469(c)) out of the Montana " "source wage income that limits a retiree's exemption. PolicyEngine " "does not record material participation, so all of the return's " - "Schedule C, partnership, S corporation and Schedule F income counts." + "Schedule C, partnership, S corporation and Schedule F income counts. " + "PolicyEngine has no input for where work is done, so it counts wages " + "and business or farm income from outside Montana, as Form WMRE lines " + "2 to 5 do, though 15-30-2120(8)(b) counts only Montana work and " + "business." ) reference = ( "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html", 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 f28e57d76f1..69b06a2701f 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 @@ -25,8 +25,11 @@ class mt_military_retirement_exemption_eligible(Variable): "with those whose five years began in 2024. As a benchmark for " "microsimulation totals, the Montana Revenue Interim Committee's " "November 2025 memo reports 1,711 resident claimants and $24.8 " - "million for tax year 2024 (more than 1,783 claimants and $25.5 " - "million with nonresidents and part-year residents)." + "million exempted for tax year 2024 (more than 1,783 claimants and " + "$25.5 million with nonresidents and part-year residents). The memo " + "calls these amounts a loss of revenue, but at about $14,500 per " + "resident claimant they match income exempted rather than tax, so " + "compare them with the exemption, not the change in tax." ) reference = ( "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html", diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/mt_other_subtractions.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/mt_other_subtractions.py index b68dbeae0cb..9bb96c707cf 100644 --- a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/mt_other_subtractions.py +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/mt_other_subtractions.py @@ -12,6 +12,7 @@ class mt_other_subtractions(Variable): "Montana other subtractions reported on Form 2, Schedule I, " "Line 21 (Other subtractions; line 23 in 2024), entered as a positive amount. " "Do not include interest exemptions, tuition subtractions, old age/disability exclusions, " + "the military retirement and survivor benefit exemption (Form WMRE), " "federal deductions, or state tax refunds, which PolicyEngine computes separately." ) reference = "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=27" diff --git a/source_conflicts/candidates.yaml b/source_conflicts/candidates.yaml index ee7a3894314..e9147fda9be 100644 --- a/source_conflicts/candidates.yaml +++ b/source_conflicts/candidates.yaml @@ -8794,6 +8794,53 @@ candidates: not earned income" in mt_military_retirement_exemption.yaml pins the reading. PE-US has no input for material participation, so it counts all Schedule C, partnership, S corporation and Schedule F income, including any that ARM 42.15.1501(2) would leave out as passive. +- id: us-mt:military-retirement-exemption-wage-location + program: income-tax + years: + from: 2024 + type: tax + question: Does the Montana source wage income that limits a full-year resident's working military retiree subtraction count + only wages for services performed in Montana and business or farm income from activity carried on in Montana, or all of + the return's wages and business income wherever the work is done? + sources: + - kind: statute + citation: MCA 15-30-2120(8)(a)(i) and (8)(b) + url: https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html + - kind: regulation + citation: ARM 42.15.1501(2), effective January 25, 2025 + url: https://rules.mt.gov/api/policy-library-public/collections/aec52c46-128e-4279-9068-8af5d5432d74/policies/3e7310ba-441e-4b10-ac7a-48770622f709/document/87309b9d-15b9-4c4a-b962-91c8ebd32ad3 + - kind: instructions + citation: 2025 Form WMRE instructions, Exemption, PDF page 2, and Part II, lines 2 to 5, PDF page 3 + url: https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=3 + readings: + statute: (8)(a)(i) caps the subtraction at "the amount of Montana source wage income on the return", and (8)(b) defines + that term as "wages, salary, tips, and other compensation for services performed in the state", "net income from a + trade, business, profession, or occupation carried on in the state" and "net income from farming activities carried + on in the state". ARM 42.15.1501(2) keeps that definition and adds that it "is not the same as the definition of Montana + source income in 15-30-2101, MCA". A resident's wages for work done in another state, and income from a business or + farm carried on there, stay out. + other: The line 2 instruction says "Residents enter the total wages included on Form 1040, line 1z", line 3 takes "the + total business income included on Form 1040, Schedule 1, line 3", and lines 4 and 5 take Schedule 1 lines 5 and 11, with + no test of where the work is done or the business is carried on. Only part-year residents enter "the Montana source wages + earned while working in Montana as a resident". The Exemption section on PDF page 2 restates the statute's test, "Wages, + salary, and tips from compensation performed in Montana". + example: A full-year resident in 2026 with $30,000 of military retired pay and $40,000 of wages from a job performed in + North Dakota subtracts $0 under the statute and min(0.5 × 30,000, 40,000) = $15,000 under the line instructions, which + is what PE-US computes. + pe_us: + follows: conflicting-source + code: + - policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml + - policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption.py + prs: + - https://github.com/PolicyEngine/policyengine-us/pull/10713 + state: open + note: PE-US has no input for where a person works or where a business or farm is carried on, so it sums all of the head's + and spouse's irs_employment_income, total_self_employment_income, partnership_s_corp_income and farm_operations_income + (earned_income_sources.yaml), as the line instructions do for residents. That describes what the code does; following + (8)(b) would need a work-location input. The difference reaches only residents who work, or carry on a business or farm, + outside Montana, such as commuters to North Dakota or Wyoming. The case "Montana earned income limits the retirement exemption" + in mt_military_retirement_exemption.yaml counts all $8,000 of the head's wages as the limit. - id: us-nc:lieap-gross-versus-net-income program: liheap years: From 6e1da8576fac66b665a7dd6220b7bc1266265b6c Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 29 Nov 2026 11:42:13 -0500 Subject: [PATCH 07/12] Count only Montana work in the military retiree exemption's cap MCA 15-30-2120(8)(b) caps the working military retiree exemption at Montana source wage income: wages for services performed in Montana and business or farm income from activity carried on there. The model summed all of the return's wages and business income wherever earned, as Form WMRE's line instructions do, and recorded that as a departure from the statute. The new tax-unit variable mt_military_retirement_montana_source_wage_income holds Form WMRE line 6. Its formula keeps the previous total, which is the statute's amount when all of the work is in Montana. A return with work or a business outside Montana enters the Montana amount, and the exemption follows the statute. Three cases pin that, and the source-conflict entry now follows the statute under the statute-first rule. Co-Authored-By: Claude Opus 5.5 --- ...-mt-military-retirement-exemption.added.md | 2 +- .../military_retirement/rate.yaml | 2 +- .../mt_military_retirement_exemption.yaml | 68 +++++++++++++++++++ .../mt_military_retirement_exemption.py | 26 +++---- ...y_retirement_montana_source_wage_income.py | 44 ++++++++++++ source_conflicts/candidates.yaml | 30 ++++---- 6 files changed, 139 insertions(+), 33 deletions(-) create mode 100644 policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income.py diff --git a/changelog.d/fix-mt-military-retirement-exemption.added.md b/changelog.d/fix-mt-military-retirement-exemption.added.md index 651f95c59e3..f93e5d2284f 100644 --- a/changelog.d/fix-mt-military-retirement-exemption.added.md +++ b/changelog.d/fix-mt-military-retirement-exemption.added.md @@ -1 +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. +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 source wage income (wages and business or farm income from work or activity in Montana), plus half of military survivor benefits. 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 index cb9dddfa8c7..a8582301940 100644 --- 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 @@ -1,4 +1,4 @@ -description: Montana subtracts this share of military retirement pay, up to the filer's Montana earned income, under the working military retirement exemption. +description: Montana subtracts this share of military retirement pay, up to the return's Montana source wage income, under the working military retirement exemption. values: 2024-01-01: 0.5 metadata: 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 index 216aea49fe4..6957fad8cdc 100644 --- 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 @@ -18,6 +18,8 @@ members: [head, spouse] state_name: MT output: + # Form WMRE line 6: all 60,000 of wages, with no other earnings. + mt_military_retirement_montana_source_wage_income: 60_000 # 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] @@ -472,3 +474,69 @@ # 0.047 * 47,500 + 0.0565 * (48,900 - 47,500) = 2,232.50 + 79.10. # No Montana credit applies. mt_income_tax: 2_311.6 + +- name: A full-year resident's wages for work outside Montana do not count + period: 2026 + input: + people: + head: + age: 45 + military_retirement_pay: 30_000 + # All of the wages are for a job performed in North Dakota. + employment_income: 40_000 + tax_units: + tax_unit: + members: [head] + mt_military_retirement_montana_source_wage_income: 0 + households: + household: + members: [head] + state_name: MT + output: + # 15-30-2120(8)(b)(i) counts only wages for services performed in + # Montana, so the lesser of 0 and 0.5 * 30,000 is 0. + mt_military_retirement_exemption: 0 + +- name: Only the wages for work in Montana limit the retirement exemption + period: 2026 + input: + people: + head: + age: 45 + military_retirement_pay: 30_000 + # 10,000 of the wages are for work performed in Montana. + employment_income: 40_000 + tax_units: + tax_unit: + members: [head] + mt_military_retirement_montana_source_wage_income: 10_000 + households: + household: + members: [head] + state_name: MT + output: + # The lesser of 10,000 and 0.5 * 30,000. + mt_military_retirement_exemption: 10_000 + +- name: A loss from a business outside Montana does not reduce Montana business income + period: 2026 + input: + people: + head: + age: 50 + military_retirement_pay: 80_000 + # Schedule C nets 30,000 of income from a business in Montana and a + # 10,000 loss from a business in Wyoming. + self_employment_income: 20_000 + tax_units: + tax_unit: + members: [head] + mt_military_retirement_montana_source_wage_income: 30_000 + households: + household: + members: [head] + state_name: MT + output: + # 15-30-2120(8)(b)(ii) counts the 30,000 from the Montana business, so + # the exemption is the lesser of 30,000 and 0.5 * 80,000. + mt_military_retirement_exemption: 30_000 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 index d1d564eb467..49914952762 100644 --- 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 @@ -15,15 +15,9 @@ class mt_military_retirement_exemption(Variable): "Guard and the reserve components. military_retirement_pay and " "military_retirement_pay_survivors cover every uniformed service, so " "this variable assumes that none of the pay comes from the NOAA " - "Corps or the Public Health Service. ARM 42.15.1501(2) leaves income " - "from a passive activity (26 U.S.C. 469(c)) out of the Montana " - "source wage income that limits a retiree's exemption. PolicyEngine " - "does not record material participation, so all of the return's " - "Schedule C, partnership, S corporation and Schedule F income counts. " - "PolicyEngine has no input for where work is done, so it counts wages " - "and business or farm income from outside Montana, as Form WMRE lines " - "2 to 5 do, though 15-30-2120(8)(b) counts only Montana work and " - "business." + "Corps or the Public Health Service. The return's Montana source " + "wage income (mt_military_retirement_montana_source_wage_income) " + "limits the retirement exemption." ) reference = ( "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html", @@ -46,15 +40,11 @@ def formula(person, period, parameters): 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 p.earned_income_sources: - earned_income = earned_income + max_( - 0, tax_unit.sum(filer * person(source, period)) - ) - retirement_exemption = min_(p.rate * retirement_pay, earned_income) + # income or the rate times the military retirement pay. + wage_income = tax_unit( + "mt_military_retirement_montana_source_wage_income", period + ) + retirement_exemption = min_(p.rate * retirement_pay, wage_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) diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income.py new file mode 100644 index 00000000000..e46d8197f17 --- /dev/null +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income.py @@ -0,0 +1,44 @@ +from policyengine_us.model_api import * + + +class mt_military_retirement_montana_source_wage_income(Variable): + value_type = float + entity = TaxUnit + label = "Montana source wage income for the working military retiree exemption" + unit = USD + definition_period = YEAR + documentation = ( + "Form WMRE Part II line 6, the return's Montana source wage income, " + "which limits a working retiree's exemption. MCA 15-30-2120(8)(b) " + "counts wages for services performed in Montana and net income from " + "a trade, business, profession, occupation or farm carried on in " + "Montana. PolicyEngine has no input for where work is done, so the " + "formula counts all of the head's and spouse's wages and business, " + "partnership, S corporation and farm income: the statute's amount " + "when all of that work and activity is in Montana. For a return with " + "work done or a business or farm carried on outside Montana, enter " + "the Montana amount here. ARM 42.15.1501(2) leaves income from a " + "passive activity (26 U.S.C. 469(c)) out. PolicyEngine does not " + "record material participation, so the formula counts all of the " + "return's Schedule C, partnership, S corporation and Schedule F " + "income." + ) + reference = ( + "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html", + "https://www.law.cornell.edu/regulations/montana/Mont-Admin-r-42.15.1501", + # PDF pages 1, 3 + "https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=1", + ) + defined_for = StateCode.MT + + def formula(tax_unit, period, parameters): + p = parameters(period).gov.states.mt.tax.income.subtractions.military_retirement + person = tax_unit.members + filer = person("is_tax_unit_head_or_spouse", period) + # 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; line 6 adds them. + total = 0 + for source in p.earned_income_sources: + total = total + max_(0, tax_unit.sum(filer * person(source, period))) + return total diff --git a/source_conflicts/candidates.yaml b/source_conflicts/candidates.yaml index e9147fda9be..b2fcc61e0c3 100644 --- a/source_conflicts/candidates.yaml +++ b/source_conflicts/candidates.yaml @@ -8740,11 +8740,11 @@ candidates: pe_us: follows: gap-fill code: - - policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption.py + - policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income.py prs: - https://github.com/PolicyEngine/policyengine-us/pull/10713 state: ruled - note: PE-US sums each of the four sources over the head and spouse and floors each sum at zero (mt_military_retirement_exemption.py). + note: PE-US sums each of the four sources over the head and spouse and floors each sum at zero (mt_military_retirement_montana_source_wage_income.py). The cases "A business loss does not reduce wages in the earned income limit" and "A loss in one sole proprietorship offsets income from another before the floor" in mt_military_retirement_exemption.yaml pin the reading. - id: us-mt:military-retirement-exemption-schedule-e-income @@ -8785,7 +8785,7 @@ candidates: follows: statute code: - policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml - - policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption.py + - policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income.py prs: - https://github.com/PolicyEngine/policyengine-us/pull/10713 state: ruled @@ -8825,22 +8825,26 @@ candidates: earned while working in Montana as a resident". The Exemption section on PDF page 2 restates the statute's test, "Wages, salary, and tips from compensation performed in Montana". example: A full-year resident in 2026 with $30,000 of military retired pay and $40,000 of wages from a job performed in - North Dakota subtracts $0 under the statute and min(0.5 × 30,000, 40,000) = $15,000 under the line instructions, which - is what PE-US computes. + North Dakota subtracts $0 under the statute and min(0.5 × 30,000, 40,000) = $15,000 under the line instructions. pe_us: - follows: conflicting-source + follows: statute code: - policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml + - policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income.py - policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption.py prs: - https://github.com/PolicyEngine/policyengine-us/pull/10713 - state: open - note: PE-US has no input for where a person works or where a business or farm is carried on, so it sums all of the head's - and spouse's irs_employment_income, total_self_employment_income, partnership_s_corp_income and farm_operations_income - (earned_income_sources.yaml), as the line instructions do for residents. That describes what the code does; following - (8)(b) would need a work-location input. The difference reaches only residents who work, or carry on a business or farm, - outside Montana, such as commuters to North Dakota or Wyoming. The case "Montana earned income limits the retirement exemption" - in mt_military_retirement_exemption.yaml counts all $8,000 of the head's wages as the limit. + state: ruled + note: Ruled under the 2026-10-19 statute-first rule, so the exemption follows (8)(b). mt_military_retirement_montana_source_wage_income + holds the return's Montana source wage income (Form WMRE line 6). PE-US has no input for where a person works or where + a business or farm is carried on, so the variable's formula sums all of the head's and spouse's irs_employment_income, + total_self_employment_income, partnership_s_corp_income and farm_operations_income (earned_income_sources.yaml), each + at least zero. That is the statute's amount when all of the work and activity is in Montana, and the total the line instructions + give. For a return with work done, or a business or farm carried on, outside Montana, the Montana amount is entered in + that variable, and the exemption follows the statute. In the North Dakota example PE-US subtracts $0 with that amount + entered as 0 and $15,000 when the formula supplies it. The cases "A full-year resident's wages for work outside Montana + do not count", "Only the wages for work in Montana limit the retirement exemption" and "A loss from a business outside + Montana does not reduce Montana business income" in mt_military_retirement_exemption.yaml pin the reading. - id: us-nc:lieap-gross-versus-net-income program: liheap years: From b1a147f13e15d5588eeab7c278fb6932e46ad3a4 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 29 Nov 2026 13:34:58 -0500 Subject: [PATCH 08/12] Take the Montana wage amount as an optional input, not an override An override of the computed cap on one return zeroed the cap on every other return, since Core fills omitted cells with the default. The cap is again summed inside the exemption at full precision, and a new tax unit input, mt_military_retirement_montana_source_wage_income_override (default -1, negative means not entered), replaces the sum only for a return that enters it. Partnership and S corporation income now leaves out its passive subset (ARM 42.15.1501(2)). The wage-location entry now says follows: conflicting-source, since the default still counts out-of-state work. The docs describe the statutory cap rather than Form WMRE line 6, and the eligibility docs no longer treat the revenue memo as a benchmark. New cases cover two returns, a negative entry, passive income and loss, and fractional cents. Co-Authored-By: Claude Opus 5.5 --- ...-mt-military-retirement-exemption.added.md | 2 +- .../earned_income_sources.yaml | 7 +- .../mt_military_retirement_exemption.yaml | 131 ++++++++++++++++-- .../mt_military_retirement_exemption.py | 25 +++- ..._military_retirement_exemption_eligible.py | 15 +- ...y_retirement_montana_source_wage_income.py | 44 ------ ...ent_montana_source_wage_income_override.py | 36 +++++ ...nt_nonpassive_partnership_s_corp_income.py | 24 ++++ source_conflicts/candidates.yaml | 51 ++++--- 9 files changed, 244 insertions(+), 91 deletions(-) delete mode 100644 policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income.py create mode 100644 policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income_override.py create mode 100644 policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_nonpassive_partnership_s_corp_income.py diff --git a/changelog.d/fix-mt-military-retirement-exemption.added.md b/changelog.d/fix-mt-military-retirement-exemption.added.md index f93e5d2284f..b0794990b3f 100644 --- a/changelog.d/fix-mt-military-retirement-exemption.added.md +++ b/changelog.d/fix-mt-military-retirement-exemption.added.md @@ -1 +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 source wage income (wages and business or farm income from work or activity in Montana), plus half of military survivor benefits. +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 source wage income, plus half of military survivor benefits. The new input mt_military_retirement_montana_source_wage_income_override takes the Montana amount for a return with work or a business outside Montana; without it, the limit counts all of the head's and spouse's wages and business, nonpassive partnership and S corporation, and farm income. diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml index 257a937124d..aef3b8c04e5 100644 --- a/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml +++ b/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml @@ -6,15 +6,16 @@ values: # (8)(b)(ii); line 3: Schedule 1 line 3, which nets all Schedule C # income, including a specified service trade or business. - total_self_employment_income - # (8)(b)(ii); line 4: partnership and S corporation income. - - partnership_s_corp_income + # (8)(b)(ii); line 4: partnership and S corporation income, less the + # passive subset that ARM 42.15.1501(2) leaves out. + - mt_military_retirement_nonpassive_partnership_s_corp_income # (8)(b)(iii); line 5: net farming income, which PolicyEngine holds as # Schedule F income. - farm_operations_income metadata: unit: list period: year - label: Montana working military retirement exemption earned income sources + label: Montana working military retirement exemption wage income sources reference: - title: MCA 15-30-2120(8)(b) href: https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html 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 index 6957fad8cdc..acf7e635efc 100644 --- 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 @@ -18,13 +18,11 @@ members: [head, spouse] state_name: MT output: - # Form WMRE line 6: all 60,000 of wages, with no other earnings. - mt_military_retirement_montana_source_wage_income: 60_000 - # Form WMRE line 8: the lesser of 60,000 and 0.5 * 30,000. + # Form WMRE line 8: the lesser of the 60,000 of wages 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 +- name: Montana source wage income limits the retirement exemption period: 2025 input: people: @@ -42,7 +40,7 @@ output: mt_military_retirement_exemption: 8_000 -- name: A retiree with no Montana earned income gets no retirement exemption +- name: A retiree with no Montana source wage income gets no retirement exemption period: 2026 input: people: @@ -487,7 +485,7 @@ tax_units: tax_unit: members: [head] - mt_military_retirement_montana_source_wage_income: 0 + mt_military_retirement_montana_source_wage_income_override: 0 households: household: members: [head] @@ -509,7 +507,7 @@ tax_units: tax_unit: members: [head] - mt_military_retirement_montana_source_wage_income: 10_000 + mt_military_retirement_montana_source_wage_income_override: 10_000 households: household: members: [head] @@ -531,7 +529,7 @@ tax_units: tax_unit: members: [head] - mt_military_retirement_montana_source_wage_income: 30_000 + mt_military_retirement_montana_source_wage_income_override: 30_000 households: household: members: [head] @@ -540,3 +538,120 @@ # 15-30-2120(8)(b)(ii) counts the 30,000 from the Montana business, so # the exemption is the lesser of 30,000 and 0.5 * 80,000. mt_military_retirement_exemption: 30_000 + +- name: An entry on one return leaves another return's limit alone + period: 2026 + input: + people: + commuter: + age: 45 + military_retirement_pay: 30_000 + # All of the wages are for a job performed in North Dakota. + employment_income: 40_000 + local_worker: + age: 50 + military_retirement_pay: 20_000 + employment_income: 25_000 + tax_units: + commuter_return: + members: [commuter] + mt_military_retirement_montana_source_wage_income_override: 0 + local_return: + members: [local_worker] + households: + household: + members: [commuter, local_worker] + state_name: MT + output: + # The commuter's entry of 0 gives the lesser of 0 and 0.5 * 30,000. The + # local worker's return has no entry, so its limit is the 25,000 of + # wages and the exemption is the lesser of 25,000 and 0.5 * 20,000. + mt_military_retirement_exemption: [0, 10_000] + +- name: A negative entry counts as no entry + period: 2026 + input: + people: + head: + age: 50 + military_retirement_pay: 30_000 + employment_income: 8_000 + tax_units: + tax_unit: + members: [head] + mt_military_retirement_montana_source_wage_income_override: -1_000 + households: + household: + members: [head] + state_name: MT + output: + # The limit is the 8,000 of wages: the lesser of 8,000 and 0.5 * 30,000. + mt_military_retirement_exemption: 8_000 + +- name: Passive partnership and S corporation income does not count + period: 2026 + input: + people: + head: + age: 50 + military_retirement_pay: 30_000 + partnership_s_corp_income: 30_000 + # 20,000 of it comes from a passive activity (26 U.S.C. 469(c)). + passive_partnership_s_corp_income: 20_000 + tax_units: + tax_unit: + members: [head] + households: + household: + members: [head] + state_name: MT + output: + # ARM 42.15.1501(2) leaves the 20,000 out, so the exemption is the + # lesser of 10,000 and 0.5 * 30,000. + mt_military_retirement_exemption: 10_000 + +- name: A passive partnership loss does not reduce active partnership income + period: 2026 + input: + people: + head: + age: 50 + military_retirement_pay: 40_000 + # 15,000 of active income and a 5,000 passive loss. + partnership_s_corp_income: 10_000 + passive_partnership_s_corp_income: -5_000 + tax_units: + tax_unit: + members: [head] + households: + household: + members: [head] + state_name: MT + output: + # The 15,000 of active income counts in full: the lesser of 15,000 and + # 0.5 * 40,000. + mt_military_retirement_exemption: 15_000 + +- name: Fractional amounts keep their cents through the limit + period: 2026 + absolute_error_margin: 0.004 + input: + people: + head: + age: 60 + military_retirement_pay: 400_000 + military_retirement_pay_survivors: 7_777.77 + employment_income: 62_500.11 + self_employment_income: 62_500.02 + tax_units: + tax_unit: + members: [head] + households: + household: + members: [head] + state_name: MT + output: + # The lesser of 125,000.13 and 0.5 * 400,000, plus 0.5 * 7,777.77. The + # margin is about half a float32 step at this size, so the case fails + # if the limit is rounded to float32 before the comparison. + mt_military_retirement_exemption: 128_889.015 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 index 49914952762..3b2640bdec0 100644 --- 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 @@ -16,8 +16,13 @@ class mt_military_retirement_exemption(Variable): "military_retirement_pay_survivors cover every uniformed service, so " "this variable assumes that none of the pay comes from the NOAA " "Corps or the Public Health Service. The return's Montana source " - "wage income (mt_military_retirement_montana_source_wage_income) " - "limits the retirement exemption." + "wage income limits the retirement exemption. PolicyEngine has no " + "input for where work is done or for material participation in a " + "Schedule C business or a farm, so unless " + "mt_military_retirement_montana_source_wage_income_override holds " + "the return's amount, the limit counts all of the head's and " + "spouse's wages, Schedule C income, nonpassive partnership and S " + "corporation income and Schedule F income." ) reference = ( "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html", @@ -40,10 +45,20 @@ def formula(person, period, parameters): 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. - wage_income = tax_unit( - "mt_military_retirement_montana_source_wage_income", period + # 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 p.earned_income_sources: + earned_income = earned_income + max_( + 0, tax_unit.sum(filer * person(source, period)) + ) + # The sum counts work and activity wherever it is done. An entered + # Montana amount, zero or more, replaces it for that return. + entered = tax_unit( + "mt_military_retirement_montana_source_wage_income_override", period ) + wage_income = where(entered >= 0, entered, earned_income) retirement_exemption = min_(p.rate * retirement_pay, wage_income) # 15-30-2120(3)(n)(ii): survivor benefits need no earned income. survivor_exemption = p.survivor_rate * survivor_benefits 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 69b06a2701f..4e8dd996ceb 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 @@ -22,14 +22,13 @@ class mt_military_retirement_exemption_eligible(Variable): "before July 2023 whose " "pay or benefits began while living in another state. From 2029, it " "also includes every filer whose five years have run out, starting " - "with those whose five years began in 2024. As a benchmark for " - "microsimulation totals, the Montana Revenue Interim Committee's " - "November 2025 memo reports 1,711 resident claimants and $24.8 " - "million exempted for tax year 2024 (more than 1,783 claimants and " - "$25.5 million with nonresidents and part-year residents). The memo " - "calls these amounts a loss of revenue, but at about $14,500 per " - "resident claimant they match income exempted rather than tax, so " - "compare them with the exemption, not the change in tax." + "with those whose five years began in 2024. For tax year 2024, the " + "Montana Revenue Interim Committee's November 2025 memo reports " + "1,711 resident claimants and $24.8 million (more than 1,783 " + "claimants and $25.5 million with nonresidents and part-year " + "residents), and labels the amounts revenue loss. At about $14,500 " + "per resident claimant, the amounts suggest that the table may " + "measure income exempted rather than tax." ) reference = ( "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html", diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income.py deleted file mode 100644 index e46d8197f17..00000000000 --- a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income.py +++ /dev/null @@ -1,44 +0,0 @@ -from policyengine_us.model_api import * - - -class mt_military_retirement_montana_source_wage_income(Variable): - value_type = float - entity = TaxUnit - label = "Montana source wage income for the working military retiree exemption" - unit = USD - definition_period = YEAR - documentation = ( - "Form WMRE Part II line 6, the return's Montana source wage income, " - "which limits a working retiree's exemption. MCA 15-30-2120(8)(b) " - "counts wages for services performed in Montana and net income from " - "a trade, business, profession, occupation or farm carried on in " - "Montana. PolicyEngine has no input for where work is done, so the " - "formula counts all of the head's and spouse's wages and business, " - "partnership, S corporation and farm income: the statute's amount " - "when all of that work and activity is in Montana. For a return with " - "work done or a business or farm carried on outside Montana, enter " - "the Montana amount here. ARM 42.15.1501(2) leaves income from a " - "passive activity (26 U.S.C. 469(c)) out. PolicyEngine does not " - "record material participation, so the formula counts all of the " - "return's Schedule C, partnership, S corporation and Schedule F " - "income." - ) - reference = ( - "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html", - "https://www.law.cornell.edu/regulations/montana/Mont-Admin-r-42.15.1501", - # PDF pages 1, 3 - "https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=1", - ) - defined_for = StateCode.MT - - def formula(tax_unit, period, parameters): - p = parameters(period).gov.states.mt.tax.income.subtractions.military_retirement - person = tax_unit.members - filer = person("is_tax_unit_head_or_spouse", period) - # 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; line 6 adds them. - total = 0 - for source in p.earned_income_sources: - total = total + max_(0, tax_unit.sum(filer * person(source, period))) - return total diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income_override.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income_override.py new file mode 100644 index 00000000000..60f79f17c85 --- /dev/null +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income_override.py @@ -0,0 +1,36 @@ +from policyengine_us.model_api import * + + +class mt_military_retirement_montana_source_wage_income_override(Variable): + value_type = float + entity = TaxUnit + label = "Montana source wage income for the working military retiree exemption, if entered" + unit = USD + definition_period = YEAR + documentation = ( + "The return's Montana source wage income, which caps a working " + "retiree's exemption under MCA 15-30-2120(8). It counts wages for " + "services performed in Montana and net income from a trade, " + "business, profession, occupation or farm carried on in Montana, " + "each source at least zero, and ARM 42.15.1501(2) leaves out income " + "from a passive activity (26 U.S.C. 469(c)). Enter it for a return " + "with work done, or a business or farm carried on, outside Montana, " + "or with passive Schedule C or Schedule F income: PolicyEngine has " + "no input for either. When it is not entered, the exemption counts " + "all of the head's and spouse's wages, Schedule C income, " + "partnership and S corporation income other than its passive " + "subset, and Schedule F income, each at least zero. That is the " + "statute's amount when all of the work and activity is in Montana " + "and none of it is passive. The amount can differ from Form WMRE " + "Part II line 6, since the resident line instructions take " + "nationwide totals from Form 1040. A negative amount, such as the " + "default of -1, means not entered." + ) + reference = ( + "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html", + "https://www.law.cornell.edu/regulations/montana/Mont-Admin-r-42.15.1501", + # PDF pages 1, 3 + "https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=1", + ) + defined_for = StateCode.MT + default_value = -1 diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_nonpassive_partnership_s_corp_income.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_nonpassive_partnership_s_corp_income.py new file mode 100644 index 00000000000..bff86de01ef --- /dev/null +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_nonpassive_partnership_s_corp_income.py @@ -0,0 +1,24 @@ +from policyengine_us.model_api import * + + +class mt_military_retirement_nonpassive_partnership_s_corp_income(Variable): + value_type = float + entity = Person + label = "Nonpassive partnership and S corporation income for the Montana working military retiree exemption" + unit = USD + definition_period = YEAR + documentation = ( + "Partnership and S corporation income less its passive subset. " + "ARM 42.15.1501(2) leaves income from a passive activity (26 U.S.C. " + "469(c)) out of the Montana source wage income that caps a working " + "retiree's exemption, and the Form WMRE line 4 instructions count " + "only an owner actively engaged in the business." + ) + reference = ( + "https://www.law.cornell.edu/regulations/montana/Mont-Admin-r-42.15.1501", + # PDF page 3 + "https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=3", + ) + defined_for = StateCode.MT + adds = ["partnership_s_corp_income"] + subtracts = ["passive_partnership_s_corp_income"] diff --git a/source_conflicts/candidates.yaml b/source_conflicts/candidates.yaml index b2fcc61e0c3..32385973a15 100644 --- a/source_conflicts/candidates.yaml +++ b/source_conflicts/candidates.yaml @@ -8740,11 +8740,11 @@ candidates: pe_us: follows: gap-fill code: - - policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income.py + - policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption.py prs: - https://github.com/PolicyEngine/policyengine-us/pull/10713 state: ruled - note: PE-US sums each of the four sources over the head and spouse and floors each sum at zero (mt_military_retirement_montana_source_wage_income.py). + note: PE-US sums each of the four sources over the head and spouse and floors each sum at zero (mt_military_retirement_exemption.py). The cases "A business loss does not reduce wages in the earned income limit" and "A loss in one sole proprietorship offsets income from another before the floor" in mt_military_retirement_exemption.yaml pin the reading. - id: us-mt:military-retirement-exemption-schedule-e-income @@ -8785,15 +8785,18 @@ candidates: follows: statute code: - policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml - - policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income.py + - policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_nonpassive_partnership_s_corp_income.py + - policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption.py prs: - https://github.com/PolicyEngine/policyengine-us/pull/10713 state: ruled - note: The source list holds wages, all Schedule C income, partnership and S corporation income and Schedule F income (earned_income_sources.yaml); - rental_income, farm_rent_income and estate_income stay out. The case "Rents, royalties, farm rent and estate income are - not earned income" in mt_military_retirement_exemption.yaml pins the reading. PE-US has no input for material participation, - so it counts all Schedule C, partnership, S corporation and Schedule F income, including any that ARM 42.15.1501(2) would - leave out as passive. + note: The source list holds wages, all Schedule C income, partnership and S corporation income less its passive subset + (passive_partnership_s_corp_income), and Schedule F income (earned_income_sources.yaml); rental_income, farm_rent_income + and estate_income stay out. The cases "Rents, royalties, farm rent and estate income are not earned income" and "Passive + partnership and S corporation income does not count" in mt_military_retirement_exemption.yaml pin the reading. PE-US has + no input for material participation in a Schedule C business or a farm, so it counts all Schedule C and Schedule F income, + including any that ARM 42.15.1501(2) would leave out as passive. The Montana amount can be entered in mt_military_retirement_montana_source_wage_income_override + for such a return. - id: us-mt:military-retirement-exemption-wage-location program: income-tax years: @@ -8824,27 +8827,31 @@ candidates: no test of where the work is done or the business is carried on. Only part-year residents enter "the Montana source wages earned while working in Montana as a resident". The Exemption section on PDF page 2 restates the statute's test, "Wages, salary, and tips from compensation performed in Montana". - example: A full-year resident in 2026 with $30,000 of military retired pay and $40,000 of wages from a job performed in - North Dakota subtracts $0 under the statute and min(0.5 × 30,000, 40,000) = $15,000 under the line instructions. + example: A full-year resident in 2026 with $30,000 of military retired pay, $1,000 of wages for work in Montana and $39,000 + of wages for a job performed in North Dakota subtracts min(0.5 × 30,000, 1,000) = $1,000 under the statute and min(0.5 + × 30,000, 40,000) = $15,000 under the line 2 instruction alone. A retiree with no Montana work at all subtracts $0 under + both, since the Part II instructions on PDF page 3 say such a retiree does "not qualify for this exemption". pe_us: - follows: statute + follows: conflicting-source code: - policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml - - policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income.py + - policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income_override.py - policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption.py prs: - https://github.com/PolicyEngine/policyengine-us/pull/10713 state: ruled - note: Ruled under the 2026-10-19 statute-first rule, so the exemption follows (8)(b). mt_military_retirement_montana_source_wage_income - holds the return's Montana source wage income (Form WMRE line 6). PE-US has no input for where a person works or where - a business or farm is carried on, so the variable's formula sums all of the head's and spouse's irs_employment_income, - total_self_employment_income, partnership_s_corp_income and farm_operations_income (earned_income_sources.yaml), each - at least zero. That is the statute's amount when all of the work and activity is in Montana, and the total the line instructions - give. For a return with work done, or a business or farm carried on, outside Montana, the Montana amount is entered in - that variable, and the exemption follows the statute. In the North Dakota example PE-US subtracts $0 with that amount - entered as 0 and $15,000 when the formula supplies it. The cases "A full-year resident's wages for work outside Montana - do not count", "Only the wages for work in Montana limit the retirement exemption" and "A loss from a business outside - Montana does not reduce Montana business income" in mt_military_retirement_exemption.yaml pin the reading. + note: Ruled under the 2026-10-19 statute-first rule for (8)(b), but PE-US follows the line instructions unless a return's + Montana amount is entered. PE-US has no input for where a person works or where a business or farm is carried on, so + by default mt_military_retirement_exemption.py sums all of the head's and spouse's irs_employment_income, total_self_employment_income, + nonpassive partnership and S corporation income and farm_operations_income (earned_income_sources.yaml), each at least + zero. That is the statute's amount when all of the work and activity is in Montana, and the total the resident line instructions + give. For a return with work done, or a business or farm carried on, outside Montana, the Montana amount entered in + mt_military_retirement_montana_source_wage_income_override replaces the sum for that return alone, and the exemption follows + the statute. No dataset holds that amount, so in microsimulation a commuter still gets the line instructions' amount. + In the example PE-US subtracts $1,000 with 1,000 entered and $15,000 without an entry. The cases "A full-year resident's + wages for work outside Montana do not count", "Only the wages for work in Montana limit the retirement exemption", "A + loss from a business outside Montana does not reduce Montana business income" and "An entry on one return leaves another + return's limit alone" in mt_military_retirement_exemption.yaml pin the reading. - id: us-nc:lieap-gross-versus-net-income program: liheap years: From fb6d94b07181c37bdb55837af9effa3d1b1bb816 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 29 Nov 2026 13:55:08 -0500 Subject: [PATCH 09/12] Say how the Montana wage-location default differs from the form The default sum matches the resident line instructions in counting work outside Montana, but it also leaves out the rents and royalties that line 4's Schedule 1 line 5 holds, and counts Schedule C income without the material participation test of line 3. The note now says so rather than calling the sum the line-instruction total. Co-Authored-By: Claude Opus 5.5 --- source_conflicts/candidates.yaml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/source_conflicts/candidates.yaml b/source_conflicts/candidates.yaml index 32385973a15..acfbf698018 100644 --- a/source_conflicts/candidates.yaml +++ b/source_conflicts/candidates.yaml @@ -8840,18 +8840,22 @@ candidates: prs: - https://github.com/PolicyEngine/policyengine-us/pull/10713 state: ruled - note: Ruled under the 2026-10-19 statute-first rule for (8)(b), but PE-US follows the line instructions unless a return's - Montana amount is entered. PE-US has no input for where a person works or where a business or farm is carried on, so - by default mt_military_retirement_exemption.py sums all of the head's and spouse's irs_employment_income, total_self_employment_income, - nonpassive partnership and S corporation income and farm_operations_income (earned_income_sources.yaml), each at least - zero. That is the statute's amount when all of the work and activity is in Montana, and the total the resident line instructions - give. For a return with work done, or a business or farm carried on, outside Montana, the Montana amount entered in - mt_military_retirement_montana_source_wage_income_override replaces the sum for that return alone, and the exemption follows - the statute. No dataset holds that amount, so in microsimulation a commuter still gets the line instructions' amount. - In the example PE-US subtracts $1,000 with 1,000 entered and $15,000 without an entry. The cases "A full-year resident's - wages for work outside Montana do not count", "Only the wages for work in Montana limit the retirement exemption", "A - loss from a business outside Montana does not reduce Montana business income" and "An entry on one return leaves another - return's limit alone" in mt_military_retirement_exemption.yaml pin the reading. + note: Ruled for (8)(b) under the 2026-10-19 statute-first rule, but PE-US follows it only for a return whose Montana amount + is entered. PE-US has no input for where a person works or where a business or farm is carried on, so with no entry mt_military_retirement_exemption.py + sums all of the head's and spouse's irs_employment_income, total_self_employment_income, nonpassive partnership and S corporation + income and farm_operations_income (earned_income_sources.yaml), each at least zero. That is the statute's amount when + all of the work and activity is in Montana and none of the Schedule C or Schedule F income is passive. Like the resident + line instructions, the sum counts work done outside Montana. It differs from them in two other ways. It leaves out the + rents, royalties and estate income that line 4's Schedule 1 line 5 holds (us-mt:military-retirement-exemption-schedule-e-income). + It also counts Schedule C income whether or not the owner materially participates, while line 3 counts only an owner + who does. For a return + with work done, or a business or farm carried on, outside Montana, the Montana amount entered in mt_military_retirement_montana_source_wage_income_override + replaces the sum for that return alone, and the exemption follows the statute. No dataset holds that amount, so in microsimulation + the sum still counts a commuter's out-of-state wages. In the example PE-US subtracts $1,000 with 1,000 entered and $15,000 + without an entry. The cases "A full-year resident's wages for work outside Montana do not count", "Only the wages for + work in Montana limit the retirement exemption", "A loss from a business outside Montana does not reduce Montana business + income" and "An entry on one return leaves another return's limit alone" in mt_military_retirement_exemption.yaml pin + the reading. - id: us-nc:lieap-gross-versus-net-income program: liheap years: From 3b127ca7efa62aab0a2e420991ff868ebd16d8da Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 29 Nov 2026 22:14:51 +0000 Subject: [PATCH 10/12] Limit Montana military retirement wage overrides to the tax year Co-Authored-By: GPT-6.2 Sol --- ...-mt-military-retirement-exemption.added.md | 2 +- .../mt_military_retirement_exemption.yaml | 59 +++++++++++++++++++ .../mt_military_retirement_exemption.py | 28 +++++---- ...ent_montana_source_wage_income_override.py | 24 ++++---- source_conflicts/candidates.yaml | 37 ++++++------ 5 files changed, 105 insertions(+), 45 deletions(-) diff --git a/changelog.d/fix-mt-military-retirement-exemption.added.md b/changelog.d/fix-mt-military-retirement-exemption.added.md index b0794990b3f..d0bea793a0a 100644 --- a/changelog.d/fix-mt-military-retirement-exemption.added.md +++ b/changelog.d/fix-mt-military-retirement-exemption.added.md @@ -1 +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 source wage income, plus half of military survivor benefits. The new input mt_military_retirement_montana_source_wage_income_override takes the Montana amount for a return with work or a business outside Montana; without it, the limit counts all of the head's and spouse's wages and business, nonpassive partnership and S corporation, and farm income. +Model Montana's working military retirement and survivor benefit exemption (MCA 15-30-2120(3)(n)) from tax year 2024. The exemption takes the lesser of half the return's military retirement pay and its Montana source wage income, then adds half of military survivor benefits. PolicyEngine estimates the wage limit from wages, Schedule C income, partnership and S corporation income less its reported passive portion, and Schedule F income. Enter the statutory amount in `mt_military_retirement_montana_source_wage_income_override` for each tax year in which the estimate includes income that does not qualify or omits qualifying income. 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 index acf7e635efc..2f54e33c3ef 100644 --- 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 @@ -473,6 +473,65 @@ # No Montana credit applies. mt_income_tax: 2_311.6 +- name: Both years use the estimated cap with no Montana wage entry + period: 2026 + input: + people: &two_year_people + head: + age: {2026: 45, 2027: 46} + military_retirement_pay: {2026: 30_000, 2027: 30_000} + employment_income: {2026: 60_000, 2027: 60_000} + tax_units: + tax_unit: + members: [head] + households: &two_year_households + household: + members: [head] + state_name: {2026: MT, 2027: MT} + output: + # The lesser of 60,000 and half of 30,000 in each year. + mt_military_retirement_exemption: {2026: 15_000, 2027: 15_000} + +- name: A zero Montana wage entry applies only in its own tax year + period: 2026 + input: + people: *two_year_people + tax_units: + tax_unit: + members: [head] + mt_military_retirement_montana_source_wage_income_override: + 2026: 0 + households: *two_year_households + output: + mt_military_retirement_exemption: {2026: 0, 2027: 15_000} + +- name: A positive Montana wage entry applies only in its own tax year + period: 2026 + input: + people: *two_year_people + tax_units: + tax_unit: + members: [head] + mt_military_retirement_montana_source_wage_income_override: + 2026: 1_000 + households: *two_year_households + output: + mt_military_retirement_exemption: {2026: 1_000, 2027: 15_000} + +- name: A negative Montana wage entry uses the estimated cap for that year + period: 2026 + input: + people: *two_year_people + tax_units: + tax_unit: + members: [head] + mt_military_retirement_montana_source_wage_income_override: + 2026: 0 + 2027: -1 + households: *two_year_households + output: + mt_military_retirement_exemption: {2026: 0, 2027: 15_000} + - name: A full-year resident's wages for work outside Montana do not count period: 2026 input: 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 index 3b2640bdec0..2d2f004ac7a 100644 --- 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 @@ -16,13 +16,13 @@ class mt_military_retirement_exemption(Variable): "military_retirement_pay_survivors cover every uniformed service, so " "this variable assumes that none of the pay comes from the NOAA " "Corps or the Public Health Service. The return's Montana source " - "wage income limits the retirement exemption. PolicyEngine has no " - "input for where work is done or for material participation in a " - "Schedule C business or a farm, so unless " - "mt_military_retirement_montana_source_wage_income_override holds " - "the return's amount, the limit counts all of the head's and " - "spouse's wages, Schedule C income, nonpassive partnership and S " - "corporation income and Schedule F income." + "wage income limits the retirement exemption. Without a nonnegative " + "entry for that tax year in " + "mt_military_retirement_montana_source_wage_income_override, " + "PolicyEngine estimates the limit from the head's and spouse's " + "wages, Schedule C income, partnership and S corporation income " + "less its reported passive portion, and Schedule F income. " + "PolicyEngine floors each combined source at zero." ) reference = ( "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html", @@ -53,12 +53,14 @@ def formula(person, period, parameters): earned_income = earned_income + max_( 0, tax_unit.sum(filer * person(source, period)) ) - # The sum counts work and activity wherever it is done. An entered - # Montana amount, zero or more, replaces it for that return. - entered = tax_unit( - "mt_military_retirement_montana_source_wage_income_override", period - ) - wage_income = where(entered >= 0, entered, earned_income) + wage_income = earned_income + override = "mt_military_retirement_montana_source_wage_income_override" + simulation = tax_unit.simulation + holder = simulation.get_holder(override) + # A Montana amount applies only to the tax year for which it was entered. + if period in holder.get_input_periods(simulation.branch_name): + entered = tax_unit(override, period) + wage_income = where(entered >= 0, entered, earned_income) retirement_exemption = min_(p.rate * retirement_pay, wage_income) # 15-30-2120(3)(n)(ii): survivor benefits need no earned income. survivor_exemption = p.survivor_rate * survivor_benefits diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income_override.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income_override.py index 60f79f17c85..ec3dc9ef44a 100644 --- a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income_override.py +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income_override.py @@ -13,18 +13,18 @@ class mt_military_retirement_montana_source_wage_income_override(Variable): "services performed in Montana and net income from a trade, " "business, profession, occupation or farm carried on in Montana, " "each source at least zero, and ARM 42.15.1501(2) leaves out income " - "from a passive activity (26 U.S.C. 469(c)). Enter it for a return " - "with work done, or a business or farm carried on, outside Montana, " - "or with passive Schedule C or Schedule F income: PolicyEngine has " - "no input for either. When it is not entered, the exemption counts " - "all of the head's and spouse's wages, Schedule C income, " - "partnership and S corporation income other than its passive " - "subset, and Schedule F income, each at least zero. That is the " - "statute's amount when all of the work and activity is in Montana " - "and none of it is passive. The amount can differ from Form WMRE " - "Part II line 6, since the resident line instructions take " - "nationwide totals from Form 1040. A negative amount, such as the " - "default of -1, means not entered." + "from a passive activity (26 U.S.C. 469(c)). Without a nonnegative " + "entry for that tax year, PolicyEngine estimates the cap from the " + "head's and spouse's wages, Schedule C income, partnership and S " + "corporation income less its reported passive portion, and Schedule " + "F income. PolicyEngine floors each combined source at zero. Enter " + "the statutory amount whenever the estimate counts income that " + "does not qualify, such as wages for work outside Montana or passive " + "Schedule C or F income, or omits qualifying income. For example, " + "the estimate omits net income from a Montana rental business in " + "which a real estate professional materially participates. The " + "estimate can differ from Form WMRE Part II line 6. A negative " + "amount, including the default of -1, means no entry." ) reference = ( "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html", diff --git a/source_conflicts/candidates.yaml b/source_conflicts/candidates.yaml index acfbf698018..1e6beaadd0c 100644 --- a/source_conflicts/candidates.yaml +++ b/source_conflicts/candidates.yaml @@ -8772,14 +8772,14 @@ candidates: statute: (8)(b) counts "wages, salary, tips, and other compensation for services performed in the state", "net income from a trade, business, profession, or occupation carried on in the state" and "net income from farming activities carried on in the state". ARM 42.15.1501(2) adds that the term "does not include income from any passive activity as that term - is defined in 26 USC 469(c)", and 469(c)(2) includes any rental activity. Rents, royalties and estate or trust income - are none of the three, so they stay out. The form's own line 4 label is "Montana source partnership and S corporation - income". + is defined in 26 USC 469(c)". Rental activity is generally passive. A real estate professional who materially + participates in a Montana rental business can have qualifying income from that business (IRS Publication 925, Real + Estate Professional). The form's own line 4 label is "Montana source partnership and S corporation income". other: The line 4 instruction says "Residents actively engaged in a business as an owner of a partnership or S corporation, enter the amount from Form 1040, Schedule 1, line 5". That line also carries rental real estate, royalties, estates, trusts and Form 4835 farm rent, so all of it would count. - example: A 2026 retiree with $30,000 of military retired pay, $20,000 of rents, $10,000 of Form 4835 farm rent and $10,000 - of estate income, and no other earnings, subtracts $0 under the statute and min(0.5 × 30,000, 40,000) = $15,000 if all + example: A 2026 retiree with $30,000 of military retired pay, $20,000 of passive rents, $10,000 of Form 4835 farm rent and + $10,000 of estate income, and no other earnings, subtracts $0 under the statute and min(0.5 × 30,000, 40,000) = $15,000 if all of Schedule 1 line 5 counts. pe_us: follows: statute @@ -8795,8 +8795,9 @@ candidates: and estate_income stay out. The cases "Rents, royalties, farm rent and estate income are not earned income" and "Passive partnership and S corporation income does not count" in mt_military_retirement_exemption.yaml pin the reading. PE-US has no input for material participation in a Schedule C business or a farm, so it counts all Schedule C and Schedule F income, - including any that ARM 42.15.1501(2) would leave out as passive. The Montana amount can be entered in mt_military_retirement_montana_source_wage_income_override - for such a return. + including any that ARM 42.15.1501(2) would leave out as passive. Enter the statutory amount in + mt_military_retirement_montana_source_wage_income_override if the estimate includes passive income or omits qualifying + income. - id: us-mt:military-retirement-exemption-wage-location program: income-tax years: @@ -8840,18 +8841,16 @@ candidates: prs: - https://github.com/PolicyEngine/policyengine-us/pull/10713 state: ruled - note: Ruled for (8)(b) under the 2026-10-19 statute-first rule, but PE-US follows it only for a return whose Montana amount - is entered. PE-US has no input for where a person works or where a business or farm is carried on, so with no entry mt_military_retirement_exemption.py - sums all of the head's and spouse's irs_employment_income, total_self_employment_income, nonpassive partnership and S corporation - income and farm_operations_income (earned_income_sources.yaml), each at least zero. That is the statute's amount when - all of the work and activity is in Montana and none of the Schedule C or Schedule F income is passive. Like the resident - line instructions, the sum counts work done outside Montana. It differs from them in two other ways. It leaves out the - rents, royalties and estate income that line 4's Schedule 1 line 5 holds (us-mt:military-retirement-exemption-schedule-e-income). - It also counts Schedule C income whether or not the owner materially participates, while line 3 counts only an owner - who does. For a return - with work done, or a business or farm carried on, outside Montana, the Montana amount entered in mt_military_retirement_montana_source_wage_income_override - replaces the sum for that return alone, and the exemption follows the statute. No dataset holds that amount, so in microsimulation - the sum still counts a commuter's out-of-state wages. In the example PE-US subtracts $1,000 with 1,000 entered and $15,000 + note: Ruled for (8)(b) under the 2026-10-19 statute-first rule. PE-US uses the statutory amount when entered in + mt_military_retirement_montana_source_wage_income_override for that tax year. Otherwise it estimates the cap from the + head's and spouse's irs_employment_income, total_self_employment_income, nonpassive partnership and S corporation income + and farm_operations_income (earned_income_sources.yaml), with each combined source floored at zero. When no Montana amount + is supplied, the fallback still counts a commuter's out-of-state wages. The fallback leaves out rents, royalties and estate + income that WMRE line 4's Schedule 1 line 5 holds (us-mt:military-retirement-exemption-schedule-e-income). It also subtracts + reported passive partnership and S corporation income, which can stay in an active owner's Schedule 1 line 5 total. It counts + Schedule C income regardless of material participation. The line 3 instruction requires material participation. The printed + WMRE line 5 instruction points to federal Schedule 1 line 11, which reports educator expenses. PE-US uses Schedule F farm + income, which goes on federal Schedule 1 line 6. In the example PE-US subtracts $1,000 with 1,000 entered and $15,000 without an entry. The cases "A full-year resident's wages for work outside Montana do not count", "Only the wages for work in Montana limit the retirement exemption", "A loss from a business outside Montana does not reduce Montana business income" and "An entry on one return leaves another return's limit alone" in mt_military_retirement_exemption.yaml pin From 2b5773160bac0d77126d8408030e417a22b79fe3 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Mon, 30 Nov 2026 17:04:54 +0000 Subject: [PATCH 11/12] Fix Montana military retirement exemption inputs and eligibility Co-Authored-By: GPT-6.2 Sol --- ...-mt-military-retirement-exemption.added.md | 2 +- .../earned_income_sources.yaml | 2 +- .../eligibility_years.yaml | 10 + ..._mt_military_retirement_exemption_cache.py | 28 +++ .../mt_military_retirement_exemption.yaml | 195 ++++++++++++++++++ ...retirement_active_montana_rental_income.py | 18 ++ .../mt_military_retirement_exemption.py | 123 +++++++---- ..._military_retirement_exemption_eligible.py | 26 +-- ...ilitary_retirement_exemption_first_year.py | 18 ++ ...ent_montana_source_wage_income_override.py | 21 +- .../mt_military_retirement_montana_wages.py | 18 ++ ...nt_nonpassive_partnership_s_corp_income.py | 2 +- ...ry_retirement_passive_schedule_c_income.py | 19 ++ .../mt_military_retirement_qualifying_pay.py | 19 ++ ...retirement_qualifying_survivor_benefits.py | 19 ++ .../subtractions/mt_other_subtractions.py | 4 +- source_conflicts/candidates.yaml | 44 ++-- 17 files changed, 470 insertions(+), 98 deletions(-) create mode 100644 policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/eligibility_years.yaml create mode 100644 policyengine_us/tests/core/test_mt_military_retirement_exemption_cache.py create mode 100644 policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_active_montana_rental_income.py create mode 100644 policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_first_year.py create mode 100644 policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_wages.py create mode 100644 policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_passive_schedule_c_income.py create mode 100644 policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_qualifying_pay.py create mode 100644 policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_qualifying_survivor_benefits.py diff --git a/changelog.d/fix-mt-military-retirement-exemption.added.md b/changelog.d/fix-mt-military-retirement-exemption.added.md index d0bea793a0a..2c104bd6a4c 100644 --- a/changelog.d/fix-mt-military-retirement-exemption.added.md +++ b/changelog.d/fix-mt-military-retirement-exemption.added.md @@ -1 +1 @@ -Model Montana's working military retirement and survivor benefit exemption (MCA 15-30-2120(3)(n)) from tax year 2024. The exemption takes the lesser of half the return's military retirement pay and its Montana source wage income, then adds half of military survivor benefits. PolicyEngine estimates the wage limit from wages, Schedule C income, partnership and S corporation income less its reported passive portion, and Schedule F income. Enter the statutory amount in `mt_military_retirement_montana_source_wage_income_override` for each tax year in which the estimate includes income that does not qualify or omits qualifying income. +Modeled Montana’s working military retirement and survivor benefit exemption. diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml index aef3b8c04e5..2ef21862344 100644 --- a/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml +++ b/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml @@ -20,6 +20,6 @@ metadata: - title: MCA 15-30-2120(8)(b) href: https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html - title: ARM 42.15.1501(2) - href: https://www.law.cornell.edu/regulations/montana/Mont-Admin-r-42.15.1501 + href: https://rules.mt.gov/api/policy-library-public/collections/aec52c46-128e-4279-9068-8af5d5432d74/policies/3e7310ba-441e-4b10-ac7a-48770622f709/document/87309b9d-15b9-4c4a-b962-91c8ebd32ad3 - title: "2025 Montana Form WMRE, Part II, lines 2 to 5 and their instructions #page 1,3" 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/eligibility_years.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/eligibility_years.yaml new file mode 100644 index 00000000000..48bf7075e97 --- /dev/null +++ b/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/eligibility_years.yaml @@ -0,0 +1,10 @@ +description: Montana limits its military retirement and survivor benefit exemption to this many consecutive tax years. +values: + 2024-01-01: 5 +metadata: + unit: year + period: year + label: Montana military retirement exemption eligibility window + reference: + - title: MCA 15-30-2120(9)(b) + href: https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html diff --git a/policyengine_us/tests/core/test_mt_military_retirement_exemption_cache.py b/policyengine_us/tests/core/test_mt_military_retirement_exemption_cache.py new file mode 100644 index 00000000000..f020b086cae --- /dev/null +++ b/policyengine_us/tests/core/test_mt_military_retirement_exemption_cache.py @@ -0,0 +1,28 @@ +from policyengine_us import Simulation + + +def test_montana_wage_override_invalidates_branch_exemption(): + year = 2026 + simulation = Simulation( + situation={ + "people": { + "retiree": { + "age": {year: 45}, + "military_retirement_pay": {year: 30_000}, + "employment_income": {year: 50_000}, + }, + }, + "households": { + "home": {"members": ["retiree"], "state_name": {year: "MT"}}, + }, + } + ) + branch = simulation.get_branch("wage_override") + exemption = "mt_military_retirement_exemption" + assert branch.calculate(exemption, year).tolist() == [15_000] + + branch.set_input( + "mt_military_retirement_montana_source_wage_income_override", year, [0] + ) + + assert branch.calculate(exemption, year).tolist() == [0] 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 index 2f54e33c3ef..a8242e742df 100644 --- 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 @@ -714,3 +714,198 @@ # margin is about half a float32 step at this size, so the case fails # if the limit is rounded to float32 before the comparison. mt_military_retirement_exemption: 128_889.015 + +- name: Out-of-state wages do not count when Montana wages are zero + period: 2026 + input: + state_name: MT + military_retirement_pay: 30_000 + employment_income: 40_000 + mt_military_retirement_montana_wages: 0 + output: + # All work was in North Dakota, so min(30,000 * 0.5, 0) = 0. + mt_military_retirement_exemption: 0 + +- name: Nonpassive Montana rental business income raises the wage cap + period: 2026 + input: + state_name: MT + military_retirement_pay: 30_000 + rental_income: 20_000 + mt_military_retirement_active_montana_rental_income: 20_000 + output: + # A materially participating real estate professional gets min(15,000, 20,000). + mt_military_retirement_exemption: 15_000 + +- name: Passive Schedule C income does not count toward the wage cap + period: 2026 + input: + state_name: MT + military_retirement_pay: 30_000 + self_employment_income: 20_000 + mt_military_retirement_passive_schedule_c_income: 20_000 + output: + # min(15,000, max(0, 20,000 - 20,000)) = 0. + mt_military_retirement_exemption: 0 + +- name: A skipped claim does not extend a five-year window starting in 2024 + period: 2028 + input: + state_name: {2028: MT, 2029: MT} + military_retirement_pay: {2028: 30_000, 2029: 30_000} + employment_income: {2028: 50_000, 2029: 50_000} + mt_military_retirement_exemption_first_year: 2024 + output: + # 2028 is year five: min(15,000, 50,000) = 15,000. 2029 is year six. + mt_military_retirement_exemption: {2028: 15_000, 2029: 0} + +- name: June 30 mover can qualify in 2026 after a 2025 denial + period: 2026 + input: + state_name: MT + military_retirement_pay: {2025: 30_000, 2026: 30_000} + employment_income: {2025: 50_000, 2026: 50_000} + mt_military_retirement_exemption_first_year: 2026 + mt_military_retirement_exemption_eligible: {2025: false} + output: + # The inclusive rule starts in 2026: min(0.5 * 30,000, 50,000) = 15,000. + mt_military_retirement_exemption: {2025: 0, 2026: 15_000} + +- name: A negative adjustment does not reduce unrelated Montana subtractions + period: 2026 + input: + state_name: MT + age: 45 + military_retirement_pay: -10_000 + employment_income: 50_000 + mt_other_subtractions: 8_000 + output: + # The negative pay adds zero to federal gross income and WMRE. + # (50,000 - 16,100 - 8,000) * 0.047 = 1,217.30. + mt_military_retirement_exemption: 0 + mt_subtractions: 8_000 + mt_income_tax: 1_217.30 + +- name: A negative survivor adjustment does not reduce the retirement exemption + period: 2026 + input: + state_name: MT + military_retirement_pay: 30_000 + military_retirement_pay_survivors: -10_000 + employment_income: 50_000 + output: + # min(0.5 * 30,000, 50,000) + 0.5 * max(0, -10,000) = 15,000. + mt_military_retirement_exemption: 15_000 + +- name: Remove the saved manual WMRE amount before applying the modeled exemption + period: 2026 + input: + people: + saved: &saved_filer + age: 45 + military_retirement_pay: 30_000 + employment_income: 50_000 + mt_other_subtractions: 15_000 + updated: + <<: *saved_filer + mt_other_subtractions: 0 + tax_units: + saved: {members: [saved]} + updated: {members: [updated]} + households: + saved: {members: [saved], state_name: MT} + updated: {members: [updated], state_name: MT} + output: + # Saved: 15,000 + 15,000 = 30,000; (80,000 - 16,100 - 30,000) * 0.047 = 1,593.30. + # Updated: 15,000; tax is 47,500 * 0.047 + 1,400 * 0.0565 = 2,311.60. + mt_subtractions: [30_000, 15_000] + mt_income_tax: [1_593.30, 2_311.60] + +- name: A part-year resident can enter pension received while resident + period: 2026 + input: + state_name: MT + military_retirement_pay: 30_000 + mt_military_retirement_qualifying_pay: 10_000 + employment_income: 50_000 + mt_military_retirement_montana_source_wage_income_override: 50_000 + output: + # Of 30,000, the filer received 10,000 while resident: min(0.5 * 10,000, 50,000). + mt_military_retirement_exemption: 5_000 + +- name: The retirement exemption excludes NOAA Corps pay from mixed service + period: 2026 + input: + state_name: MT + military_retirement_pay: 30_000 + mt_military_retirement_qualifying_pay: 10_000 + employment_income: 50_000 + output: + # 10,000 is armed-forces pay and 20,000 is NOAA pay: min(0.5 * 10,000, 50,000). + mt_military_retirement_exemption: 5_000 + +- name: A qualifying survivor amount applies only in the year supplied + period: 2026 + input: + state_name: {2026: MT, 2027: MT} + military_retirement_pay_survivors: {2026: 30_000, 2027: 30_000} + mt_military_retirement_qualifying_survivor_benefits: {2026: 10_000} + output: + # 2026 uses 0.5 * 10,000. All 30,000 qualifies in 2027, so 0.5 * 30,000. + mt_military_retirement_exemption: {2026: 5_000, 2027: 15_000} + +- name: An explicit ineligible year leaves unrelated subtractions intact + period: 2026 + input: + state_name: MT + age: 45 + military_retirement_pay: -10_000 + employment_income: 50_000 + mt_other_subtractions: 8_000 + mt_military_retirement_exemption_eligible: false + output: + # WMRE is zero. (50,000 - 16,100 - 8,000) * 0.047 = 1,217.30. + mt_military_retirement_exemption: 0 + mt_subtractions: 8_000 + mt_income_tax: 1_217.30 + +- name: Equality at the cap across the five filing statuses + period: 2026 + input: + people: + single: &retiree {age: 45, military_retirement_pay: 30_000, employment_income: 15_000} + joint: *retiree + spouse: {age: 45} + separate: *retiree + head_of_household: *retiree + surviving_spouse: *retiree + tax_units: + single: {members: [single], filing_status: SINGLE} + joint: {members: [joint, spouse], filing_status: JOINT} + separate: {members: [separate], filing_status: SEPARATE} + head_of_household: {members: [head_of_household], filing_status: HEAD_OF_HOUSEHOLD} + surviving_spouse: {members: [surviving_spouse], filing_status: SURVIVING_SPOUSE} + households: + household: {members: [single, joint, spouse, separate, head_of_household, surviving_spouse], state_name: MT} + output: + # The 15,000 cap equals half of 30,000 in all five returns. The spouse gets no separate amount. + mt_military_retirement_exemption: [15_000, 15_000, 0, 15_000, 15_000, 15_000] + +- name: A joint return uses each spouse's own eligibility window + period: 2029 + input: + people: + head: + military_retirement_pay: 30_000 + employment_income: 50_000 + mt_military_retirement_exemption_first_year: 2024 + spouse: + military_retirement_pay: 10_000 + mt_military_retirement_exemption_first_year: 2026 + tax_units: + joint: {members: [head, spouse]} + households: + home: {members: [head, spouse], state_name: MT} + output: + # The head's window ended in 2028. Half the spouse's 10,000 is 5,000. + mt_military_retirement_exemption: [5_000, 0] diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_active_montana_rental_income.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_active_montana_rental_income.py new file mode 100644 index 00000000000..bbd77afc33e --- /dev/null +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_active_montana_rental_income.py @@ -0,0 +1,18 @@ +from policyengine_us.model_api import * + + +class mt_military_retirement_active_montana_rental_income(Variable): + value_type = float + entity = Person + label = "Nonpassive Montana rental business income for the working military retiree exemption" + definition_period = YEAR + unit = USD + documentation = ( + "Enter the current year's signed net income or loss from a Montana " + "rental trade or business that qualifies as nonpassive under " + "26 U.S.C. 469, such as a rental in which a real estate professional " + "materially participates. Enter only amounts outside the partnership " + "and S corporation income already included in the wage cap estimate." + ) + reference = "https://rules.mt.gov/api/policy-library-public/collections/aec52c46-128e-4279-9068-8af5d5432d74/policies/3e7310ba-441e-4b10-ac7a-48770622f709/document/87309b9d-15b9-4c4a-b962-91c8ebd32ad3" + defined_for = StateCode.MT 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 index 2d2f004ac7a..2cc48eb27a3 100644 --- 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 @@ -1,6 +1,17 @@ from policyengine_us.model_api import * +def tax_year_input(population, name, period): + # Read the input even when absent so a later branch update invalidates + # results calculated from the default. + entered = population(name, period) + simulation = population.simulation + holder = simulation.get_holder(name) + if period in holder.get_input_periods(simulation.branch_name): + return entered + return holder.variable.default_value + + class mt_military_retirement_exemption(Variable): value_type = float entity = Person @@ -8,26 +19,19 @@ class mt_military_retirement_exemption(Variable): unit = USD definition_period = YEAR documentation = ( - "Form WMRE computes the exemption for the whole return, so the tax " - "unit head carries it. MCA 15-30-2120(3)(n)(i) covers retired members " - "of the armed forces as 10 U.S.C. 101 defines them (the Army, Navy, " - "Air Force, Marine Corps, Space Force and Coast Guard), the National " - "Guard and the reserve components. military_retirement_pay and " - "military_retirement_pay_survivors cover every uniformed service, so " - "this variable assumes that none of the pay comes from the NOAA " - "Corps or the Public Health Service. The return's Montana source " - "wage income limits the retirement exemption. Without a nonnegative " - "entry for that tax year in " - "mt_military_retirement_montana_source_wage_income_override, " - "PolicyEngine estimates the limit from the head's and spouse's " - "wages, Schedule C income, partnership and S corporation income " - "less its reported passive portion, and Schedule F income. " - "PolicyEngine floors each combined source at zero." + "The tax unit head carries the return's Form WMRE exemption. " + "The automatic estimate uses annual income and assumes full-year " + "Montana residency and that the taxable military payments are from " + "armed forces, National Guard or reserve service. Enter qualifying " + "pay and survivor benefits separately for mixed service or payments " + "received during part-year residency. The retirement exemption is " + "limited by Montana source wage income. The year-specific tax unit " + "override replaces the estimate from the filers' income sources." ) reference = ( "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html", - "https://www.law.cornell.edu/regulations/montana/Mont-Admin-r-42.15.1501", - "https://www.law.cornell.edu/regulations/montana/Mont-Admin-r-42.15.1510", + "https://rules.mt.gov/api/policy-library-public/collections/aec52c46-128e-4279-9068-8af5d5432d74/policies/3e7310ba-441e-4b10-ac7a-48770622f709/document/87309b9d-15b9-4c4a-b962-91c8ebd32ad3", + "https://rules.mt.gov/api/policy-library-public/collections/aec52c46-128e-4279-9068-8af5d5432d74/policies/ad7e9270-84be-418c-b856-f0fd2d4cdf3d/document/ee199d7f-bc90-4ecb-8520-65350d960926", # PDF pages 1, 3 "https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=1", ) @@ -37,32 +41,71 @@ 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) + year = period.start.year + first_year = person("mt_military_retirement_exemption_first_year", period) + within_window = (first_year == 0) | ( + (year >= first_year) & (year < first_year + p.eligibility_years) + ) + eligible = ( + filer + & within_window + & tax_year_input( + person, "mt_military_retirement_exemption_eligible", period + ) + ) + + retirement_pay = max_(0, person("military_retirement_pay", period)) + survivor_benefits = max_(0, person("military_retirement_pay_survivors", period)) + qualifying_pay = tax_year_input( + person, "mt_military_retirement_qualifying_pay", period + ) + qualifying_survivor = tax_year_input( + person, "mt_military_retirement_qualifying_survivor_benefits", period ) - survivor_benefits = tax_unit.sum( - eligible * person("military_retirement_pay_survivors", period) + retirement_pay = where( + qualifying_pay >= 0, min_(qualifying_pay, retirement_pay), retirement_pay ) - # 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. + survivor_benefits = where( + qualifying_survivor >= 0, + min_(qualifying_survivor, survivor_benefits), + survivor_benefits, + ) + + # Form WMRE Part II floors each return-level income source at zero. earned_income = 0 for source in p.earned_income_sources: - earned_income = earned_income + max_( - 0, tax_unit.sum(filer * person(source, period)) - ) - wage_income = earned_income - override = "mt_military_retirement_montana_source_wage_income_override" - simulation = tax_unit.simulation - holder = simulation.get_holder(override) - # A Montana amount applies only to the tax year for which it was entered. - if period in holder.get_input_periods(simulation.branch_name): - entered = tax_unit(override, period) - wage_income = where(entered >= 0, entered, earned_income) - retirement_exemption = min_(p.rate * retirement_pay, wage_income) - # 15-30-2120(3)(n)(ii): survivor benefits need no earned income. - survivor_exemption = p.survivor_rate * survivor_benefits + income = person(source, period) + if source == "irs_employment_income": + montana_wages = tax_year_input( + person, "mt_military_retirement_montana_wages", period + ) + income = where(montana_wages >= 0, montana_wages, income) + elif source == "total_self_employment_income": + income = income - tax_year_input( + person, "mt_military_retirement_passive_schedule_c_income", period + ) + elif ( + source == "mt_military_retirement_nonpassive_partnership_s_corp_income" + ): + income = income + tax_year_input( + person, + "mt_military_retirement_active_montana_rental_income", + period, + ) + earned_income = earned_income + max_(0, tax_unit.sum(filer * income)) + + entered = tax_year_input( + tax_unit, + "mt_military_retirement_montana_source_wage_income_override", + period, + ) + wage_income = where(entered >= 0, entered, earned_income) + retirement_exemption = min_( + p.rate * tax_unit.sum(eligible * retirement_pay), wage_income + ) + # MCA 15-30-2120(3)(n)(ii) does not cap survivor benefits by wages. + survivor_exemption = p.survivor_rate * tax_unit.sum( + eligible * 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 index 4e8dd996ceb..0fb63c6a9a5 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 @@ -12,29 +12,19 @@ class mt_military_retirement_exemption_eligible(Variable): "after June 30, 2023 (on or after that date for tax years from 2026, " "under 2025 Mont. Laws ch. 586), or was a Montana resident before the " "military retirement pay or survivor benefits began and has remained " - "one; claims the exemption within five consecutive years of meeting " - "that condition (tax years 2024 through 2028 for a resident from " - "before July 2023, by the Form WMRE instructions); and has not " - "claimed it and then moved out of Montana. Set this to false for a " - "filer who fails any of these conditions. PolicyEngine has no other " - "input for these facts, so the default of true overstates the " - "exemption in two known ways. From 2024, it includes a resident from " - "before July 2023 whose " - "pay or benefits began while living in another state. From 2029, it " - "also includes every filer whose five years have run out, starting " - "with those whose five years began in 2024. For tax year 2024, the " - "Montana Revenue Interim Committee's November 2025 memo reports " - "1,711 resident claimants and $24.8 million (more than 1,783 " - "claimants and $25.5 million with nonresidents and part-year " - "residents), and labels the amounts revenue loss. At about $14,500 " - "per resident claimant, the amounts suggest that the table may " - "measure income exempted rather than tax." + "one. The filer must claim the exemption during the five consecutive " + "years starting when they first qualify. A filer who claimed it and " + "then moved out of Montana can no longer claim it. Set this to false " + "in each tax year the filer fails the conditions. The exemption uses " + "an entry only in its own tax year. " + "Enter mt_military_retirement_exemption_first_year to enforce the " + "five-year window. When that year is unknown and no annual entry " + "is supplied, PolicyEngine assumes the filer is eligible." ) reference = ( "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html", "https://archive.legmt.gov/bills/2023/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html", "https://archive.legmt.gov/content/Sessions/69th/Contractor_index/CH0586.pdf#page=6", "https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=2", - "https://archive.legmt.gov/content/Committees/Interim/2025-2026/RIC/Meetings/November_12_13_2025/veteran-tax-benefits.pdf#page=1", ) defined_for = StateCode.MT diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_first_year.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_first_year.py new file mode 100644 index 00000000000..13c683e56ab --- /dev/null +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_first_year.py @@ -0,0 +1,18 @@ +from policyengine_us.model_api import * + + +class mt_military_retirement_exemption_first_year(Variable): + value_type = int + entity = Person + label = "First eligible tax year for the Montana military retirement exemption" + definition_period = ETERNITY + documentation = ( + "Enter the first tax year the taxpayer satisfies the eligibility " + "requirements (2024 at the earliest), even if the taxpayer did not " + "claim the exemption that year. For a person first eligible under " + "the June 30, 2023 residency amendment, enter 2026. The same " + "first year applies across tax years. Zero means the first " + "eligible year is unknown. Use the annual eligibility input " + "to report a disqualifying change in residency." + ) + reference = "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html" diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income_override.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income_override.py index ec3dc9ef44a..f4cdc9192c0 100644 --- a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income_override.py +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income_override.py @@ -15,20 +15,19 @@ class mt_military_retirement_montana_source_wage_income_override(Variable): "each source at least zero, and ARM 42.15.1501(2) leaves out income " "from a passive activity (26 U.S.C. 469(c)). Without a nonnegative " "entry for that tax year, PolicyEngine estimates the cap from the " - "head's and spouse's wages, Schedule C income, partnership and S " - "corporation income less its reported passive portion, and Schedule " - "F income. PolicyEngine floors each combined source at zero. Enter " - "the statutory amount whenever the estimate counts income that " - "does not qualify, such as wages for work outside Montana or passive " - "Schedule C or F income, or omits qualifying income. For example, " - "the estimate omits net income from a Montana rental business in " - "which a real estate professional materially participates. The " - "estimate can differ from Form WMRE Part II line 6. A negative " - "amount, including the default of -1, means no entry." + "head's and spouse's wages, Schedule C income, nonpassive " + "partnership, S corporation and qualifying rental business income, " + "and Schedule F income. It uses any current-year Montana wage, " + "passive Schedule C and active Montana rental entries and floors " + "each combined source at zero. Enter the statutory amount here " + "when other adjustments are needed, for example for out-of-state " + "business income, passive farm income, or part-year sourcing. " + "The estimate can differ from Form WMRE Part II line 6. " + "A negative amount, including the default of -1, means no entry." ) reference = ( "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html", - "https://www.law.cornell.edu/regulations/montana/Mont-Admin-r-42.15.1501", + "https://rules.mt.gov/api/policy-library-public/collections/aec52c46-128e-4279-9068-8af5d5432d74/policies/3e7310ba-441e-4b10-ac7a-48770622f709/document/87309b9d-15b9-4c4a-b962-91c8ebd32ad3", # PDF pages 1, 3 "https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=1", ) diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_wages.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_wages.py new file mode 100644 index 00000000000..23b01bb3754 --- /dev/null +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_wages.py @@ -0,0 +1,18 @@ +from policyengine_us.model_api import * + + +class mt_military_retirement_montana_wages(Variable): + value_type = float + entity = Person + label = "Wages for work in Montana for the working military retiree exemption" + definition_period = YEAR + unit = USD + default_value = -1 + documentation = ( + "Enter the current year's wages, salaries, tips and other compensation " + "for services performed in Montana. Enter zero if all services were " + "performed outside Montana. A negative amount means no entry, so " + "the estimate uses federal wages." + ) + reference = "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html" + defined_for = StateCode.MT diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_nonpassive_partnership_s_corp_income.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_nonpassive_partnership_s_corp_income.py index bff86de01ef..f818f32f0cd 100644 --- a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_nonpassive_partnership_s_corp_income.py +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_nonpassive_partnership_s_corp_income.py @@ -15,7 +15,7 @@ class mt_military_retirement_nonpassive_partnership_s_corp_income(Variable): "only an owner actively engaged in the business." ) reference = ( - "https://www.law.cornell.edu/regulations/montana/Mont-Admin-r-42.15.1501", + "https://rules.mt.gov/api/policy-library-public/collections/aec52c46-128e-4279-9068-8af5d5432d74/policies/3e7310ba-441e-4b10-ac7a-48770622f709/document/87309b9d-15b9-4c4a-b962-91c8ebd32ad3", # PDF page 3 "https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=3", ) diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_passive_schedule_c_income.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_passive_schedule_c_income.py new file mode 100644 index 00000000000..b8a3b47aa80 --- /dev/null +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_passive_schedule_c_income.py @@ -0,0 +1,19 @@ +from policyengine_us.model_api import * + + +class mt_military_retirement_passive_schedule_c_income(Variable): + value_type = float + entity = Person + label = ( + "Passive Schedule C income for the Montana working military retiree exemption" + ) + definition_period = YEAR + unit = USD + documentation = ( + "Enter the current year's signed net income or loss from passive " + "Schedule C activities already included in total_self_employment_income. " + "The wage cap estimate removes this amount before flooring Schedule C " + "income at zero." + ) + reference = "https://rules.mt.gov/api/policy-library-public/collections/aec52c46-128e-4279-9068-8af5d5432d74/policies/3e7310ba-441e-4b10-ac7a-48770622f709/document/87309b9d-15b9-4c4a-b962-91c8ebd32ad3" + defined_for = StateCode.MT diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_qualifying_pay.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_qualifying_pay.py new file mode 100644 index 00000000000..7c5555d5e7a --- /dev/null +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_qualifying_pay.py @@ -0,0 +1,19 @@ +from policyengine_us.model_api import * + + +class mt_military_retirement_qualifying_pay(Variable): + value_type = float + entity = Person + label = "Taxable retirement pay that qualifies for Montana Form WMRE" + definition_period = YEAR + unit = USD + default_value = -1 + documentation = ( + "Enter the current year's taxable military retirement pay " + "from armed forces, National Guard or reserve service. For a " + "part-year resident, enter only the amount received while a " + "Montana resident. Enter zero if none qualifies. A negative " + "amount means no entry, so the exemption uses military_retirement_pay." + ) + reference = "https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=3" + defined_for = StateCode.MT diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_qualifying_survivor_benefits.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_qualifying_survivor_benefits.py new file mode 100644 index 00000000000..b43fdf7a005 --- /dev/null +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_qualifying_survivor_benefits.py @@ -0,0 +1,19 @@ +from policyengine_us.model_api import * + + +class mt_military_retirement_qualifying_survivor_benefits(Variable): + value_type = float + entity = Person + label = "Taxable survivor benefits that qualify for Montana Form WMRE" + definition_period = YEAR + unit = USD + default_value = -1 + documentation = ( + "Enter the current year's taxable military survivor benefits " + "from armed forces, National Guard or reserve service. For a " + "part-year resident, enter only the amount received while a " + "Montana resident. Enter zero if none qualifies. A negative " + "amount means no entry, so the exemption uses military_retirement_pay_survivors." + ) + reference = "https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=3" + defined_for = StateCode.MT diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/mt_other_subtractions.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/mt_other_subtractions.py index 9bb96c707cf..6a4965e9371 100644 --- a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/mt_other_subtractions.py +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/mt_other_subtractions.py @@ -13,6 +13,8 @@ class mt_other_subtractions(Variable): "Line 21 (Other subtractions; line 23 in 2024), entered as a positive amount. " "Do not include interest exemptions, tuition subtractions, old age/disability exclusions, " "the military retirement and survivor benefit exemption (Form WMRE), " - "federal deductions, or state tax refunds, which PolicyEngine computes separately." + "federal deductions, or state tax refunds, which PolicyEngine computes separately. " + "Remove any previously entered Form WMRE amount from this input. " + "Keep the other manual subtractions in the saved amount." ) reference = "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=27" diff --git a/source_conflicts/candidates.yaml b/source_conflicts/candidates.yaml index 1e6beaadd0c..db641587aff 100644 --- a/source_conflicts/candidates.yaml +++ b/source_conflicts/candidates.yaml @@ -8683,7 +8683,7 @@ candidates: url: https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html - kind: regulation citation: ARM 42.15.1510(1) and (2) - url: https://www.law.cornell.edu/regulations/montana/Mont-Admin-r-42.15.1510 + url: https://rules.mt.gov/api/policy-library-public/collections/aec52c46-128e-4279-9068-8af5d5432d74/policies/ad7e9270-84be-418c-b856-f0fd2d4cdf3d/document/ee199d7f-bc90-4ecb-8520-65350d960926 - kind: form citation: 2025 Form WMRE, taxpayer boxes and Part I, PDF page 1 url: https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=1 @@ -8761,7 +8761,7 @@ candidates: url: https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html - kind: regulation citation: ARM 42.15.1501(2) - url: https://www.law.cornell.edu/regulations/montana/Mont-Admin-r-42.15.1501 + url: https://rules.mt.gov/api/policy-library-public/collections/aec52c46-128e-4279-9068-8af5d5432d74/policies/3e7310ba-441e-4b10-ac7a-48770622f709/document/87309b9d-15b9-4c4a-b962-91c8ebd32ad3 - kind: form citation: 2025 Form WMRE, Part II, line 4, PDF page 1 url: https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=1 @@ -8782,7 +8782,7 @@ candidates: $10,000 of estate income, and no other earnings, subtracts $0 under the statute and min(0.5 × 30,000, 40,000) = $15,000 if all of Schedule 1 line 5 counts. pe_us: - follows: statute + follows: conflicting-source code: - policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml - policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_nonpassive_partnership_s_corp_income.py @@ -8790,14 +8790,12 @@ candidates: prs: - https://github.com/PolicyEngine/policyengine-us/pull/10713 state: ruled - note: The source list holds wages, all Schedule C income, partnership and S corporation income less its passive subset - (passive_partnership_s_corp_income), and Schedule F income (earned_income_sources.yaml); rental_income, farm_rent_income - and estate_income stay out. The cases "Rents, royalties, farm rent and estate income are not earned income" and "Passive - partnership and S corporation income does not count" in mt_military_retirement_exemption.yaml pin the reading. PE-US has - no input for material participation in a Schedule C business or a farm, so it counts all Schedule C and Schedule F income, - including any that ARM 42.15.1501(2) would leave out as passive. Enter the statutory amount in - mt_military_retirement_montana_source_wage_income_override if the estimate includes passive income or omits qualifying - income. + note: The estimate excludes reported passive partnership and S corporation income and uses a separate entry for + nonpassive Montana rental business income. Unclassified rents, royalties, Form 4835 rent and estate income remain + outside the estimate. Enter the statutory cap in mt_military_retirement_montana_source_wage_income_override if the + estimate omits qualifying income or includes income that does not qualify. The cases "Rents, royalties, farm rent and + estate income are not earned income", "Passive partnership and S corporation income does not count" and "Nonpassive + Montana rental business income raises the wage cap" in mt_military_retirement_exemption.yaml pin the reading. - id: us-mt:military-retirement-exemption-wage-location program: income-tax years: @@ -8841,20 +8839,16 @@ candidates: prs: - https://github.com/PolicyEngine/policyengine-us/pull/10713 state: ruled - note: Ruled for (8)(b) under the 2026-10-19 statute-first rule. PE-US uses the statutory amount when entered in - mt_military_retirement_montana_source_wage_income_override for that tax year. Otherwise it estimates the cap from the - head's and spouse's irs_employment_income, total_self_employment_income, nonpassive partnership and S corporation income - and farm_operations_income (earned_income_sources.yaml), with each combined source floored at zero. When no Montana amount - is supplied, the fallback still counts a commuter's out-of-state wages. The fallback leaves out rents, royalties and estate - income that WMRE line 4's Schedule 1 line 5 holds (us-mt:military-retirement-exemption-schedule-e-income). It also subtracts - reported passive partnership and S corporation income, which can stay in an active owner's Schedule 1 line 5 total. It counts - Schedule C income regardless of material participation. The line 3 instruction requires material participation. The printed - WMRE line 5 instruction points to federal Schedule 1 line 11, which reports educator expenses. PE-US uses Schedule F farm - income, which goes on federal Schedule 1 line 6. In the example PE-US subtracts $1,000 with 1,000 entered and $15,000 - without an entry. The cases "A full-year resident's wages for work outside Montana do not count", "Only the wages for - work in Montana limit the retirement exemption", "A loss from a business outside Montana does not reduce Montana business - income" and "An entry on one return leaves another return's limit alone" in mt_military_retirement_exemption.yaml pin - the reading. + note: Ruled for MCA 15-30-2120(8)(b). A tax-year entry in mt_military_retirement_montana_source_wage_income_override + sets the return's cap. The estimate uses Montana wages when supplied, otherwise federal wages. It deducts reported + passive Schedule C and partnership or S corporation income and includes reported nonpassive Montana rental business + income. It floors each combined source at zero. Without sourcing and participation entries, the estimate can count + out-of-state wages and passive income or miss qualifying income. Use the return-level entry for other adjustments, + such as multistate business income or passive farming. PE-US uses Schedule F income, which goes on federal Schedule 1 + line 6. The printed WMRE line 5 instruction points to Schedule 1 line 11, which reports educator expenses. In the + example, an entry of $1,000 for Montana wages gives a $1,000 exemption. Without an entry, the estimate gives $15,000. + "Out-of-state wages do not count when Montana wages are zero" and "Passive Schedule C income does not count toward + the wage cap" in mt_military_retirement_exemption.yaml cover the inputs. - id: us-nc:lieap-gross-versus-net-income program: liheap years: From 8250611c568fd45797a4a4a0dd5bf2dd5835bb5b Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Tue, 1 Dec 2026 06:28:19 +0000 Subject: [PATCH 12/12] Reconcile Montana military exemptions with taxable income and eligibility Co-Authored-By: GPT-6.2 Sol --- ...-mt-military-retirement-exemption.added.md | 2 +- .../earned_income_sources.yaml | 3 +- .../mt_military_retirement_exemption.yaml | 125 ++++++++++++++++-- .../mt_military_retirement_exemption.py | 17 ++- ..._military_retirement_exemption_eligible.py | 9 +- ...ilitary_retirement_exemption_first_year.py | 7 +- ...irement_exemption_in_other_subtractions.py | 17 +++ ..._exemption_nonresident_year_after_claim.py | 19 +++ ...ent_montana_source_wage_income_override.py | 7 +- .../mt_military_retirement_montana_wages.py | 8 +- .../mt_military_retirement_qualifying_pay.py | 3 +- ...retirement_qualifying_survivor_benefits.py | 3 +- .../subtractions/mt_other_subtractions.py | 5 +- .../income/subtractions/mt_subtractions.py | 16 ++- source_conflicts/candidates.yaml | 8 +- 15 files changed, 218 insertions(+), 31 deletions(-) create mode 100644 policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_in_other_subtractions.py create mode 100644 policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_nonresident_year_after_claim.py diff --git a/changelog.d/fix-mt-military-retirement-exemption.added.md b/changelog.d/fix-mt-military-retirement-exemption.added.md index 2c104bd6a4c..06f020c504f 100644 --- a/changelog.d/fix-mt-military-retirement-exemption.added.md +++ b/changelog.d/fix-mt-military-retirement-exemption.added.md @@ -1 +1 @@ -Modeled Montana’s working military retirement and survivor benefit exemption. +Modeled Montana’s working military retirement and survivor benefit exemption, including taxable dependent care compensation and reporting of prior claims and amounts already entered as other subtractions. diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml index 2ef21862344..6757b6795c0 100644 --- a/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml +++ b/policyengine_us/parameters/gov/states/mt/tax/income/subtractions/military_retirement/earned_income_sources.yaml @@ -1,7 +1,8 @@ description: Montana counts these income sources as the Montana source wage income that limits the working military retirement exemption. values: 2024-01-01: - # 15-30-2120(8)(b)(i); Form WMRE line 2: wages on Form 1040 line 1z. + # 15-30-2120(8)(b)(i); Form WMRE line 2: Form 1040 line 1z. The estimate + # adds taxable dependent care benefits (line 1e) to employment income. - irs_employment_income # (8)(b)(ii); line 3: Schedule 1 line 3, which nets all Schedule C # income, including a specified service trade or business. 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 index a8242e742df..7a079f26cf8 100644 --- 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 @@ -786,7 +786,7 @@ mt_subtractions: 8_000 mt_income_tax: 1_217.30 -- name: A negative survivor adjustment does not reduce the retirement exemption +- name: A negative survivor adjustment reduces federally included retirement pay period: 2026 input: state_name: MT @@ -794,10 +794,10 @@ military_retirement_pay_survivors: -10_000 employment_income: 50_000 output: - # min(0.5 * 30,000, 50,000) + 0.5 * max(0, -10,000) = 15,000. - mt_military_retirement_exemption: 15_000 + # Federal military income is 30,000 - 10,000 = 20,000. Half is 10,000. + mt_military_retirement_exemption: 10_000 -- name: Remove the saved manual WMRE amount before applying the modeled exemption +- name: Report the WMRE portion of a saved manual subtraction period: 2026 input: people: @@ -806,9 +806,11 @@ military_retirement_pay: 30_000 employment_income: 50_000 mt_other_subtractions: 15_000 + mt_military_retirement_exemption_in_other_subtractions: 15_000 updated: <<: *saved_filer mt_other_subtractions: 0 + mt_military_retirement_exemption_in_other_subtractions: 0 tax_units: saved: {members: [saved]} updated: {members: [updated]} @@ -816,10 +818,9 @@ saved: {members: [saved], state_name: MT} updated: {members: [updated], state_name: MT} output: - # Saved: 15,000 + 15,000 = 30,000; (80,000 - 16,100 - 30,000) * 0.047 = 1,593.30. - # Updated: 15,000; tax is 47,500 * 0.047 + 1,400 * 0.0565 = 2,311.60. - mt_subtractions: [30_000, 15_000] - mt_income_tax: [1_593.30, 2_311.60] + # Both deduct 15,000, so tax is 47,500 * 0.047 + 1,400 * 0.0565 = 2,311.60. + mt_subtractions: [15_000, 15_000] + mt_income_tax: [2_311.60, 2_311.60] - name: A part-year resident can enter pension received while resident period: 2026 @@ -909,3 +910,111 @@ output: # The head's window ended in 2028. Half the spouse's 10,000 is 5,000. mt_military_retirement_exemption: [5_000, 0] + +- name: Saved WMRE is counted only once and unrelated subtractions are preserved + period: 2026 + input: + state_name: {2026: MT, 2027: MT} + age: 45 + military_retirement_pay: {2026: 30_000, 2027: 30_000} + employment_income: {2026: 50_000, 2027: 50_000} + mt_other_subtractions: {2026: 17_000, 2027: 17_000} + mt_military_retirement_exemption_in_other_subtractions: {2026: 15_000} + output: + # 2026: 17,000 - 15,000 + 15,000 = 17,000. Tax is (80,000 - 16,100 - 17,000) * 0.047. + # 2027: all 17,000 is unrelated, so the total is 17,000 + 15,000. + mt_military_retirement_exemption: {2026: 15_000, 2027: 15_000} + mt_subtractions: {2026: 17_000, 2027: 32_000} + mt_income_tax: {2026: 2_204.30} + +- name: Fully offset military payments produce no Montana exemption + period: 2026 + input: + state_name: MT + age: 45 + military_retirement_pay: 30_000 + military_retirement_pay_survivors: -30_000 + employment_income: 50_000 + output: + # Federal military income is max(0, 30,000 - 30,000) = 0. WMRE is zero. + # Montana tax is (50,000 - 16,100) * 0.047 = 1,593.30. + adjusted_gross_income: 50_000 + mt_military_retirement_exemption: 0 + mt_income_tax: 1_593.30 + +- name: A retirement adjustment reduces federally included survivor benefits + period: 2026 + input: + state_name: MT + military_retirement_pay: -2_000 + military_retirement_pay_survivors: 10_000 + output: + # Half of the 10,000 - 2,000 = 8,000 in federal military income is 4,000. + mt_military_retirement_exemption: 4_000 + +- name: Taxable employer dependent care compensation counts toward the wage cap + period: 2026 + input: + state_name: MT + military_retirement_pay: 30_000 + employment_income: 8_000 + taxable_dependent_care_benefits: 2_000 + output: + # Form 1040 line 1z includes 8,000 of wages and 2,000 of taxable benefits. + # min(30,000 * 0.5, 8,000 + 2,000) = 10,000. + mt_military_retirement_exemption: 10_000 + +- name: Entered Montana compensation replaces the federal wage estimate + period: 2026 + input: + state_name: MT + military_retirement_pay: 30_000 + employment_income: 8_000 + taxable_dependent_care_benefits: 2_000 + mt_military_retirement_montana_wages: 6_000 + output: + # The 6,000 Montana amount includes its own taxable dependent care compensation. + # min(30,000 * 0.5, 6,000) = 6,000. + mt_military_retirement_exemption: 6_000 + +- name: A post-move pension can qualify when pre-move survivor benefits do not + period: 2026 + input: + state_name: MT + military_retirement_pay: 30_000 + military_retirement_pay_survivors: 10_000 + employment_income: 50_000 + mt_military_retirement_exemption_first_year: 2024 + mt_military_retirement_qualifying_survivor_benefits: 0 + output: + # The filer moved in 2021, began receiving survivor benefits in 2020, + # and began receiving a pension in 2024. WMRE is min(15,000, 50,000) + 0. + # Federal AGI still includes both streams: 50,000 + 30,000 + 10,000. + adjusted_gross_income: 90_000 + mt_military_retirement_exemption: 15_000 + +- name: A claimant stays ineligible after becoming a nonresident and returning + period: 2026 + input: + state_name: {2024: MT, 2025: ND, 2026: MT, 2027: MT} + military_retirement_pay: {2024: 30_000, 2025: 30_000, 2026: 30_000, 2027: 30_000} + employment_income: {2024: 50_000, 2025: 50_000, 2026: 50_000, 2027: 50_000} + mt_military_retirement_exemption_first_year: 2024 + mt_military_retirement_exemption_nonresident_year_after_claim: 2025 + output: + # 2024: min(0.5 * 30,000, 50,000) = 15,000. The 2025 move after the + # claim ends eligibility in 2025 and later, including after the return. + mt_military_retirement_exemption: {2024: 15_000, 2025: 0, 2026: 0, 2027: 0} + +- name: Montana business income can qualify when all employee wages are from outside Montana + period: 2026 + input: + state_name: MT + military_retirement_pay: 30_000 + employment_income: 40_000 + mt_military_retirement_montana_wages: 0 + self_employment_income: 4_000 + output: + # North Dakota wages contribute 0. The filer has 4,000 from a Montana + # business, so the exemption is min(30,000 * 0.5, 0 + 4,000) = 4,000. + mt_military_retirement_exemption: 4_000 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 index 2cc48eb27a3..129a720e50a 100644 --- 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 @@ -24,7 +24,8 @@ class mt_military_retirement_exemption(Variable): "Montana residency and that the taxable military payments are from " "armed forces, National Guard or reserve service. Enter qualifying " "pay and survivor benefits separately for mixed service or payments " - "received during part-year residency. The retirement exemption is " + "received during part-year residency or when only one stream meets the " + "residency criteria. The retirement exemption is " "limited by Montana source wage income. The year-specific tax unit " "override replaces the estimate from the filers' income sources." ) @@ -46,16 +47,25 @@ def formula(person, period, parameters): within_window = (first_year == 0) | ( (year >= first_year) & (year < first_year + p.eligibility_years) ) + nonresident_year = person( + "mt_military_retirement_exemption_nonresident_year_after_claim", period + ) + before_disqualification = (nonresident_year == 0) | (year < nonresident_year) eligible = ( filer & within_window + & before_disqualification & tax_year_input( person, "mt_military_retirement_exemption_eligible", period ) ) - retirement_pay = max_(0, person("military_retirement_pay", period)) - survivor_benefits = max_(0, person("military_retirement_pay_survivors", period)) + pay = person("military_retirement_pay", period) + survivor = person("military_retirement_pay_survivors", period) + # Federal gross income floors the combined military income for each + # person. Apply any negative adjustment before the Montana limits. + retirement_pay = max_(0, pay + min_(0, survivor)) + survivor_benefits = max_(0, survivor + min_(0, pay)) qualifying_pay = tax_year_input( person, "mt_military_retirement_qualifying_pay", period ) @@ -76,6 +86,7 @@ def formula(person, period, parameters): for source in p.earned_income_sources: income = person(source, period) if source == "irs_employment_income": + income = income + person("taxable_dependent_care_benefits", period) montana_wages = tax_year_input( person, "mt_military_retirement_montana_wages", period ) 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 0fb63c6a9a5..253973c260c 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 @@ -14,9 +14,12 @@ class mt_military_retirement_exemption_eligible(Variable): "military retirement pay or survivor benefits began and has remained " "one. The filer must claim the exemption during the five consecutive " "years starting when they first qualify. A filer who claimed it and " - "then moved out of Montana can no longer claim it. Set this to false " - "in each tax year the filer fails the conditions. The exemption uses " - "an entry only in its own tax year. " + "then moved out of Montana can no longer claim it. Enter the year " + "of that move in mt_military_retirement_exemption_nonresident_year_after_claim. " + "Set this input to false for each tax year in which neither payment " + "stream qualifies. If only one stream qualifies, enter zero in the " + "qualifying pay or qualifying survivor benefits input for the other " + "stream. Keep both streams in the federal income inputs. " "Enter mt_military_retirement_exemption_first_year to enforce the " "five-year window. When that year is unknown and no annual entry " "is supplied, PolicyEngine assumes the filer is eligible." diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_first_year.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_first_year.py index 13c683e56ab..43a8b6d0772 100644 --- a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_first_year.py +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_first_year.py @@ -11,8 +11,9 @@ class mt_military_retirement_exemption_first_year(Variable): "requirements (2024 at the earliest), even if the taxpayer did not " "claim the exemption that year. For a person first eligible under " "the June 30, 2023 residency amendment, enter 2026. The same " - "first year applies across tax years. Zero means the first " - "eligible year is unknown. Use the annual eligibility input " - "to report a disqualifying change in residency." + "first year applies across tax years. Leave it at zero if it is unknown " + "or if retirement pay and survivor benefits have different five-year " + "windows. If the windows differ, use the annual qualifying amounts " + "to enter zero for each stream outside its own window." ) reference = "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html" diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_in_other_subtractions.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_in_other_subtractions.py new file mode 100644 index 00000000000..c2fe78e2a4a --- /dev/null +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_in_other_subtractions.py @@ -0,0 +1,17 @@ +from policyengine_us.model_api import * + + +class mt_military_retirement_exemption_in_other_subtractions(Variable): + value_type = float + entity = Person + label = "Form WMRE amount included in saved Montana other subtractions" + unit = USD + definition_period = YEAR + documentation = ( + "If a saved mt_other_subtractions entry includes a manually calculated " + "Form WMRE exemption, enter the amount already included for this tax " + "year. PolicyEngine removes that portion of the manual entry and " + "applies the separately calculated exemption." + ) + reference = "https://revenue.mt.gov/files/forms/Montana-Individual-Income-Tax-Return-Form-2-Instructions/2025_Montana_Individual_Income_Tax_Return_Form_2_Instructions.pdf#page=25" + defined_for = StateCode.MT diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_nonresident_year_after_claim.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_nonresident_year_after_claim.py new file mode 100644 index 00000000000..a0a29cb4c4d --- /dev/null +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_exemption_nonresident_year_after_claim.py @@ -0,0 +1,19 @@ +from policyengine_us.model_api import * + + +class mt_military_retirement_exemption_nonresident_year_after_claim(Variable): + value_type = int + entity = Person + label = "First year the Montana military exemption claimant became a nonresident" + definition_period = ETERNITY + documentation = ( + "If the taxpayer claimed Form WMRE and then became a nonresident, " + "enter the first tax year they became a nonresident after the claim. " + "The taxpayer loses eligibility from that year onward, including " + "after returning to Montana. Leave at zero if there was no such move " + "or the year is unknown." + ) + 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", + ) diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income_override.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income_override.py index f4cdc9192c0..f1e264bb39c 100644 --- a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income_override.py +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_source_wage_income_override.py @@ -19,8 +19,11 @@ class mt_military_retirement_montana_source_wage_income_override(Variable): "partnership, S corporation and qualifying rental business income, " "and Schedule F income. It uses any current-year Montana wage, " "passive Schedule C and active Montana rental entries and floors " - "each combined source at zero. Enter the statutory amount here " - "when other adjustments are needed, for example for out-of-state " + "each combined source at zero. If a filer worked solely outside Montana, " + "enter zero in that filer’s Montana wages. Enter zero here if the return " + "has no qualifying wages, business income or farm income in Montana. " + "Enter the statutory amount here when other adjustments are needed, " + "for example for out-of-state " "business income, passive farm income, or part-year sourcing. " "The estimate can differ from Form WMRE Part II line 6. " "A negative amount, including the default of -1, means no entry." diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_wages.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_wages.py index 23b01bb3754..f9634de83ed 100644 --- a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_wages.py +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_montana_wages.py @@ -10,9 +10,11 @@ class mt_military_retirement_montana_wages(Variable): default_value = -1 documentation = ( "Enter the current year's wages, salaries, tips and other compensation " - "for services performed in Montana. Enter zero if all services were " - "performed outside Montana. A negative amount means no entry, so " - "the estimate uses federal wages." + "for services performed in Montana, including taxable employer dependent " + "care benefits for that work. Enter zero if all employee services were " + "performed outside Montana. If this input is omitted or negative, " + "the estimate counts federal wages and taxable dependent care benefits " + "from work in every state." ) reference = "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html" defined_for = StateCode.MT diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_qualifying_pay.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_qualifying_pay.py index 7c5555d5e7a..bd48db75a08 100644 --- a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_qualifying_pay.py +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_qualifying_pay.py @@ -12,7 +12,8 @@ class mt_military_retirement_qualifying_pay(Variable): "Enter the current year's taxable military retirement pay " "from armed forces, National Guard or reserve service. For a " "part-year resident, enter only the amount received while a " - "Montana resident. Enter zero if none qualifies. A negative " + "Montana resident. Enter zero if this stream fails its residency " + "or timing requirements. A negative " "amount means no entry, so the exemption uses military_retirement_pay." ) reference = "https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=3" diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_qualifying_survivor_benefits.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_qualifying_survivor_benefits.py index b43fdf7a005..bc0b09b7892 100644 --- a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_qualifying_survivor_benefits.py +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/military_retirement/mt_military_retirement_qualifying_survivor_benefits.py @@ -12,7 +12,8 @@ class mt_military_retirement_qualifying_survivor_benefits(Variable): "Enter the current year's taxable military survivor benefits " "from armed forces, National Guard or reserve service. For a " "part-year resident, enter only the amount received while a " - "Montana resident. Enter zero if none qualifies. A negative " + "Montana resident. Enter zero if this stream fails its residency " + "or timing requirements. A negative " "amount means no entry, so the exemption uses military_retirement_pay_survivors." ) reference = "https://revenue.mt.gov/files/Forms/Montana-Working-Military-Retirement-and-Survivor-Benefit-Exemption.pdf#page=3" diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/mt_other_subtractions.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/mt_other_subtractions.py index 6a4965e9371..4d8e3a16e49 100644 --- a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/mt_other_subtractions.py +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/mt_other_subtractions.py @@ -14,7 +14,8 @@ class mt_other_subtractions(Variable): "Do not include interest exemptions, tuition subtractions, old age/disability exclusions, " "the military retirement and survivor benefit exemption (Form WMRE), " "federal deductions, or state tax refunds, which PolicyEngine computes separately. " - "Remove any previously entered Form WMRE amount from this input. " - "Keep the other manual subtractions in the saved amount." + "For a saved entry that includes Form WMRE, report the included amount in " + "mt_military_retirement_exemption_in_other_subtractions, or remove that " + "amount from the saved entry. Keep unrelated manual subtractions." ) reference = "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=27" diff --git a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/mt_subtractions.py b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/mt_subtractions.py index ac1b22376de..f4c871b4b82 100644 --- a/policyengine_us/variables/gov/states/mt/tax/income/subtractions/mt_subtractions.py +++ b/policyengine_us/variables/gov/states/mt/tax/income/subtractions/mt_subtractions.py @@ -1,4 +1,7 @@ from policyengine_us.model_api import * +from policyengine_us.variables.gov.states.mt.tax.income.subtractions.military_retirement.mt_military_retirement_exemption import ( + tax_year_input, +) class mt_subtractions(Variable): @@ -8,7 +11,7 @@ class mt_subtractions(Variable): unit = USD definition_period = YEAR reference = ( - "https://law.justia.com/codes/montana/2022/title-15/chapter-30/part-21/section-15-30-2110/", + "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0200/0150-0300-0210-0200.html", "https://revenuefiles.mt.gov/files/Forms/Montana-Individual-Income-Tax-Return-Form-2/2022_Montana_Individual_Income_Tax_Return_Form_2.pdf#page=5", ) defined_for = StateCode.MT @@ -16,5 +19,16 @@ class mt_subtractions(Variable): def formula(person, period, parameters): p = parameters(period).gov.states.mt.tax.income.subtractions total_subtractions = add(person, period, p.subtractions) + if ( + p.military_retirement.in_effect + and "mt_other_subtractions" in p.subtractions + ): + reported_wmre = tax_year_input( + person, "mt_military_retirement_exemption_in_other_subtractions", period + ) + other_subtractions = person("mt_other_subtractions", period) + total_subtractions -= min_( + max_(0, reported_wmre), max_(0, other_subtractions) + ) # Prevent negative subtractions from acting as additions return max_(0, total_subtractions) diff --git a/source_conflicts/candidates.yaml b/source_conflicts/candidates.yaml index 7d60f288ded..eb694d36fee 100644 --- a/source_conflicts/candidates.yaml +++ b/source_conflicts/candidates.yaml @@ -8911,13 +8911,17 @@ candidates: - https://github.com/PolicyEngine/policyengine-us/pull/10713 state: ruled note: Ruled for MCA 15-30-2120(8)(b). A tax-year entry in mt_military_retirement_montana_source_wage_income_override - sets the return's cap. The estimate uses Montana wages when supplied, otherwise federal wages. It deducts reported + sets the return's cap. The estimate uses Montana wages when supplied, otherwise federal wages including taxable + employer dependent care benefits. It deducts reported passive Schedule C and partnership or S corporation income and includes reported nonpassive Montana rental business income. It floors each combined source at zero. Without sourcing and participation entries, the estimate can count out-of-state wages and passive income or miss qualifying income. Use the return-level entry for other adjustments, such as multistate business income or passive farming. PE-US uses Schedule F income, which goes on federal Schedule 1 line 6. The printed WMRE line 5 instruction points to Schedule 1 line 11, which reports educator expenses. In the - example, an entry of $1,000 for Montana wages gives a $1,000 exemption. Without an entry, the estimate gives $15,000. + example, an entry of $1,000 for Montana wages gives a $1,000 exemption. If all employee wages are from outside + Montana, enter $0 for Montana wages. If no wages, business income or farm income qualifies, the statutory amount + on the return is $0. With neither a person-level nor a return-level entry, the estimate yields $15,000 in both + commuter examples because it lacks work location. "Out-of-state wages do not count when Montana wages are zero" and "Passive Schedule C income does not count toward the wage cap" in mt_military_retirement_exemption.yaml cover the inputs. - id: us-nc:lieap-gross-versus-net-income