Skip to content

Count refundable credits received in Montana's elderly homeowner/renter credit income - #9915

Merged
MaxGhenis merged 12 commits into
mainfrom
fix-mt-ehrc-refundable-credits
Oct 11, 2026
Merged

MaxGhenis merged 12 commits into
mainfrom
fix-mt-ehrc-refundable-credits

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Montana's elderly homeowner/renter credit counts "refundable credits received" in gross household income. The model counted only the Montana EITC, through mt_refundable_credits_before_renter_credit. It left out:

  • Federal refundable credits, the federal EITC and the refundable child tax credit among them. The cited forms name them.
  • The elderly homeowner/renter credit received during the year, which the forms name in the line's caption.
  • The prior property tax year's Montana rebate, which the 2024 and 2025 schedules name.

The rule and the forms:

  • ARM 42.4.301(2), in force from 9/7/2024: gross household income "means the same as the term defined in 15-30-2337, MCA, and includes: ... (b) federal refundable tax credits received; and (c) any state refundable tax credits received, including elderly homeowner/renter credit refunds".
    • The 11/10/2017–9/6/2024 version says "(b) federal refundable credits received; and (c) any state refundable credits received, including elderly homeowner/renter credit refunds".
  • 2017 Form 2EC worksheet, item 4 (NBER copy, PDF p. 65): "Any federal or state refundable credits including the 2EC credit."
  • 2021 instructions, line 7 (PDF p. 49): "Refundable credits include the federal and Montana Earned Income Tax Credit, the federal Child Tax Credits, Economic Impact Payments, the state Emergency Lodging Credit, the Unlocking Public Land Credit, and the Elderly Homeowner/Renter Credit."
  • 2023 instructions, line 7 (PDF p. 51): "the federal and Montana Earned Income Tax Credit, the federal Child Tax Credits, the Unlocking Public Land Credit, and the Elderly Homeowner/Renter Credit."
  • 2024 Schedule 2EC, line 8 (instructions PDF p. 47): "Refundable credits received, including your elderly homeowner/renter credit received in 2024. Combine all the refundable credits received by all household members in 2024. Refundable credits include the federal and Montana earned income tax credits, the refundable portion of the federal child tax credit, the unlocking public land credit, the elderly homeowner/renter credit, and the 2023 Montana property tax rebate."
    • The 2025 line 8 (PDF p. 45) is the same, with "the 2024 Montana property tax rebate".

Stacked on #9882, which is stacked on #9877. This PR targets main, so its diff includes their commits until they merge. Its own changes are the commits after 54d30751e0 (compare). #9900 (one claimant per household) is stacked on #9882 too. It has no logic overlap with this PR, but both append cases to the end of mt_elderly_homeowner_or_renter_credit.yaml, so whichever merges second resolves that trivially by keeping both sets.

What counts, by year

Item Years How
Montana refundable credits other than this credit (Montana EITC) all (unchanged) mt_refundable_credits_before_renter_credit, the same variable Montana tax uses
This credit received during the year all New input mt_elderly_homeowner_or_renter_credit_received, default 0
Federal refundable credits from 2017 New mt_elderly_homeowner_or_renter_credit_federal_refundable_credits = the return's income_tax_refundable_credits, on the tax unit head
Property tax rebate received from 2023 New person-level mt_elderly_homeowner_or_renter_credit_property_tax_rebate_received input: actual cash received during the current year, default 0

The per-year lists are in gross_income_sources.yaml.

Federal credits use the model's refundable-credit aggregate. The rule says "federal refundable tax credits received", and each form's list says "include". So the new variable takes income_tax_refundable_credits: the EITC, the refundable CTC, the refundable American opportunity credit, the recovery rebate credit (the 2021 instructions name the Economic Impact Payments), the refundable payroll tax credit, and the CDCC in 2021, when it was refundable. That aggregate excludes the premium tax credit. This PR retains that coverage limitation; it does not establish a Montana exemption for cash refunds of that credit.

One return's credits count once. The federal credits are tax-unit amounts, and gross household income is a person-level amount summed over the household (#9882). The federal-credit variable puts each return's amount on its head, as mt_eitc already does. Elderly-credit and rebate receipt inputs are recorded for the person who received the cash. Listing eitc directly would give every member the full amount.

Federal and Montana credits are the current return's. The forms say credits "received ... in 2024", which read literally is cash basis. But the 2021–2023 schedules tell filers, "For lines 1-7 and 9, use the amounts reported on Forms 2, page 1, for ALL members of the household" (2019–2020: lines 1-9). The 2023 Form 2, page 1, carries the current year's federal EITC on line 23a. See 2023 Form 2, p.10. So the model counts the current return's credits, as it already did for the Montana EITC. This is a modeling choice, disclosed here.

This credit and the rebate count when actually received. The caption says "your elderly homeowner/renter credit received in 2024", and the list names the prior year's rebate. Rebates for 2023 property taxes were claimed August 15 to October 1, 2024.

  • This year's credit cannot count without a cycle, and the old _before_renter_credit split avoided the cycle only by leaving the credit out.
  • The credit received is now an input that defaults to 0, not a read of last year's credit. That read would rerun the whole prior-year computation, federal refundable credits included, for every record. It would also be 0 whenever the inputs cover one year.
  • The property-tax rebate received is also an input defaulting to 0. Prior-year property taxes or a calculated rebate entitlement do not establish qualifying ownership/occupancy, payment, a claim, or cash receipt. The separate mt_property_tax_rebate entitlement calculation remains unchanged by this receipt fix.

Actual rebate receipts count in 2023 too. The statute includes all nontaxable income, and ARM 42.4.301(2)(c) includes state refundable credits. The 2023 form's illustrative list does not establish an exemption for the 2022 property-tax rebate; no documented DOR exclusion was found. See HB191 §1(9), p.2 and 2023 instructions, pp.51–52.

Not modeled: the unlocking public lands credit (MCA 15-30-2380) and the refundable Montana adoption credit (MCA 15-30-2321). Neither exists in the model.

Property tax rebate amount

gov.states.mt.tax.income.credits.rebate.property.amount had one value, 675 from 2022, with no end, so the model kept a $675 maximum in every year. It now reads:

  • 675 for tax years 2022 and 2023 (HB 222 plus the HB 816 bonus; DOR rebate report, p. 13: "In each year, the maximum rebate is $675").
  • 400 for tax year 2024 (Ch. 767, L. 2025 (SB 542), sec. 3(1), p. 2: "$400 or the amount of total property taxes paid, whichever is less, for tax year 2024").
  • 0 from tax year 2025. No later rebate was enacted, and sec. 29(2) (p. 44) terminates the 2024 rebate June 30, 2026.

The calculated rebate entitlement feeds only taxsim_state_property_tax_credit (the state property tax credits list); the separate actual-receipt input feeds elderly-credit gross household income. The rebate component of that aggregate drops from $675 to $400 in 2024 and to $0 from 2025 for an owner billed at least $675. The calculated entitlement is not included directly in net income or Montana tax; supplied actual receipts can affect Montana tax through the elderly credit.

Example (2024)

The claimant is 70, has $20,000 of taxable pension, and is billed $2,000 of property tax. Their 30-year-old daughter lives with them, earns $10,000 and files her own return with her 5-year-old.

2024 Schedule 2EC line Form Before After
5 Pensions 20,000 20,000 20,000
8 Refundable credits: federal EITC 3,400 + refundable CTC 1,125 + Montana EITC 340 4,865 340 4,865
17 Other members' income (her wages) 10,000 10,000 10,000
18 Gross household income 34,865 30,340 34,865
20 = 18 − 12,600 22,265 17,740 22,265
22 Net household income (× 0.05) 1,113.25 887 1,113.25
27 = 2,000 − line 22 886.75 1,113 886.75
30 Credit (× 100%) 886.75 1,113 886.75

The #9882 example, a 40-year-old member with $10,000 of wages, moves from $1,126.84 to $1,095.24. That member's $632 federal EITC now counts alongside the $63.20 Montana EITC.

Changes

  • gross_income_sources.yaml: dated lists for 2009, 2017 and 2023, citing all three versions of ARM 42.4.301(2) and the 2017, 2023, 2024 and 2025 forms.
  • Three new person-level variables (above). mt_refundable_credits_before_renter_credit and Montana's refundable credit list are unchanged, so the incremental federal-refundable-credit change affects Montana income tax only through this credit. The whole stack also changes pre-2024 itemized deductions and can affect nonelderly filers (the review's 2021 couple changes from $6,319.02 to $6,295.56). The contrib reforms that extend that list (mt_ctc, mt_hb268, mt_newborn_credit) still reach gross household income.
  • rebate/property/amount.yaml: dated as above.

Review round 2

This round merges current main to include the overlapping mortgage-interest fix, preserves dependents' own available non-loss adjustments using main's capped personal-deduction mapping, and replaces inferred property-tax rebate receipts with an actual cash input. It counts actual 2023 rebate receipts under the broad income definition. Allocation coverage now includes positive dependent income, negative filer income, conservation and zero income; the unsupported zero-income head fallback returns to main's zero allocation. A derived childcare case checks the itemization boundary. The whole stack's Montana-tax effects extend beyond the elderly credit, so the earlier mechanism claim is now qualified.

The reviewer cases calculate the dependent half-SE-tax deduction from 2023 Schedule SE, p.1 as 15,000 × .9235 × .153 ÷ 2 = 1,059.71625, giving gross household income 33,940.28375 and credit 2,000 − (33,940.28375 − 12,600) × .05 = 932.9858125. Without any rebate received, the homeowner case gives 1,000 − (20,000 − 12,600) × .035 = 741.

Additional invariants

  • Each member's own available non-loss deductions reduce counted income once. Parent deductions remain with the parent; filing the member separately preserves total income when receipts and deductions match. Capital and business losses are never direct income offsets; holding permitted non-loss deductions fixed, they cannot reduce gross household income. IRA and educator deductions retain their own eligibility and caps.
  • Prior property taxes do not imply receipt. Actual person-level rebate cash enters household income once from 2023; more cash cannot increase the credit.
  • Federal-tax allocation excludes dependents and treats negative filer AGI as zero. Shares sum to one with positive filer AGI and zero otherwise. Each deduction remains nonnegative and below its individual cap; tax is conserved with positive filer AGI when no cap binds.

These invariants have dedicated Hypothesis tests; YAML covers the reviewer examples, deduction caps, receipt defaults, and the derived childcare itemization boundary.

Methodology

  • Refundable-credit timing: We retain current-return federal and Montana credits as the available proxy for receipts, following the 2021–2023 schedules' direction to use current Form 2 amounts (2023 Form 2, p.10). The alternative is actual cash received during the year. Montana EITC timing is unchanged from main; counting federal refundable credits changes main's results. Elderly-credit and property-rebate receipts use actual current-year inputs, default 0; prior-year entitlement does not establish receipt (SB542 §§1–3, pp.2–3). These receipt inputs extend main.
  • Spouse allocation: Positive federal-AGI shares approximate actual attributable federal tax payments, which the model does not record. The alternative is actual spouse-specific payments (2023 instructions, p.36). This can change main through federal rather than Montana AGI shares, exclusion of dependent income from the allocation, and applying each spouse's cap after allocation rather than capping the unit first. We retain main's zero-denominator policy because the source is silent about a fallback; main used Montana AGI, while this proxy uses positive filer federal AGI.
  • 2023 property rebate: We include actual 2022 rebate cash received in 2023 under the broad nontaxable-income rule (HB191 §1(9), p.2). The alternative is exclusion based on omission from the illustrative 2023 form list; no documented DOR exclusion was found. Actual receipts change results from main, which omits them.
  • 2024 income categories: We retain statutory federal AGI without losses, including valid non-loss adjustments, despite the form's category layout (HB191 §1(9), p.2; 2024 instructions, p.47). The alternative sums categories without non-loss deductions. This preserves main's filer-income reading; counting dependent income with its own available personal deductions extends main, using main's existing IRS component formulas. Tax-unit-only amounts on the parent's return remain with that parent.

Validation for this round

CI at e212a4104f: all 26 checks passed (run 38086323891).

Local runs at this head (one file per process, in the foreground): 14 assertions passed across 5 files, 0 failed.

  • tests/policy/baseline/gov/states/mt/tax/income/deductions/cdcc/mt_childcare_itemization_boundary.yaml: 2 passed, exit 0
  • tests/policy/baseline/gov/states/mt/tax/income/deductions/itemized/mt_federal_income_tax_deduction_indiv.yaml: 6 passed, exit 0
  • tests/test_mt_elderly_credit_dependent_deductions.py: 2 passed, exit 0
  • tests/test_mt_elderly_credit_rebate_receipts.py: 2 passed, exit 0
  • tests/test_mt_federal_income_tax_deduction_allocation.py: 2 passed, exit 0

The local run stopped there when the build reached its time limit; the remaining Montana YAML files were not re-run locally and are covered by CI. Both P2 reviewer scenarios failed at the original head before their fixes. Ruff format/lint and git diff --check passed. No folders, full suites or microsimulations ran in this round.

Historical tests at 620e791e35

  • YAML, worked line by line from each year's schedule:
    • mt_elderly_homeowner_or_renter_credit.yaml:
      • 5 new cases: 2024 member's EITC 1,095.24; 2024 parent's EITC and refundable CTC 886.75; 2024 federal credits moving the credit into the 30% band 220.31; 2025 credit received plus the 2024 rebate 650.95; 2023 line 7 with no rebate receipt supplied 1,099.89.
      • One updated case, the 2021 TAXSIM-comparison case: 133.33 → 59.24. The 2021 line 7 names the federal EITC (81.76) and the Economic Impact Payments (1,400).
    • ..._gross_household_income.yaml: 7 new cases, including the 2016/2017 boundary and the then-modeled 2023 rebate exclusion.
    • New ..._federal_refundable_credits.yaml (4 cases) and ..._property_tax_rebate_received.yaml (5 cases).
    • rebate/mt_property_tax_rebate.yaml (3 new cases) and state_property_tax_credits/mt_property_tax_rebate_in_aggregate.yaml (2 new cases).
    • Expected values come from Rev. Proc. 2016-55, the ARPA 2021 EITC parameters, Rev. Proc. 2022-38 and Rev. Proc. 2023-34, and the schedules' line arithmetic, not from the model.
  • Fail before, pass after. With the two parameter files at 54d30751e0's values:
    • 5 of the 7 new gross-income cases fail. The two that passed at the original head pinned the then-modeled 2023 rebate exclusion and federal credits before 2017. This round removes the unsupported rebate exclusion and counts actual receipts.
    • 6 credit cases fail: the 5 new ones and the updated 2021 case.
    • 2 of the 3 new rebate cases fail.
    • All passed at 620e791e35 before this review round; current-round results are reported separately.
  • Property and differential test, policyengine_us/tests/test_mt_elderly_credit_refundable_credits.py (Hypothesis). YAML cannot compare two simulations or draw household structures, so this file does both. Each example runs random households of a claimant aged 62+ and a working member filing with up to two children, once as given (W) and once with the federal credits in gross household income set to 0 (Z).
    1. Counted once (differential): the household sum of the head-allocated person amounts equals the sum of income_tax_refundable_credits over the household's tax units, read from the tax-unit array by entity id.
    2. Accounting: gross household income in W − Z equals those credits exactly.
    3. Monotone: the credit in W ≤ Z.
    4. 0 ≤ credit ≤ $1,150, and 0 at gross household income ≥ $45,000.
    5. Montana tax moves only through this credit: Montana's other refundable credits are equal in W and Z, and household Montana tax rises by exactly the fall in the credit.
    • Cost (local macOS, loaded host, not CI): 10 examples of 1–6 households plus a worked example, two Simulations each. 25.3 s test time, 53 s wall including import, 1.44 GB peak footprint. A one-off local run of 80 examples (299 households) also passed in 115 s. The file lands in the Rest job's remaining group.
  • Broader sweep at 620e791e35, under the shared heavy lock, one file batch at a time. All passed:

Invariants

  • Each return's federal refundable credits enter gross household income exactly once, whatever the household's split into returns.
  • Holding other calculations fixed, changing only the federal-credit amount included in elderly-credit income changes Montana tax through this credit.
  • Gross household income does not fall when a refundable credit rises, so the credit does not rise.
  • 0 ≤ credit ≤ cap, and the credit is 0 at gross household income of $45,000 or more.
  • No same-year cycle: this year's credit is never an input to its own gross household income.

Hub microsimulation impact (current head)

A real microsimulation on the default dataset, main at the merge base 75cdd8019e against this PR's head e212a4104f, for 2026. The runs went one at a time under the shared heavy-job lock. Sums are weighted.

Output 2026 change 2026 records changed (weighted)
mt_elderly_homeowner_or_renter_credit -3.30M 8 (3,778)
mt_elderly_homeowner_or_renter_credit_gross_household_income +1.34bn 284 (153,291)
mt_federal_income_tax_deduction_indiv +0 0 (0)
mt_itemized_deductions_indiv +0 0 (0)
mt_income_tax +3.30M 8 (3,778)
household_net_income -3.30M 8 (3,778)
state_income_tax +3.30M 8 (3,778)
income_tax +0 0 (0)
household_benefits +0 0 (0)

Comparison files are in fixes/9915-impact/ on the hub host.

Hub microsimulation impact

The existing numbers below describe the original incremental 2025 comparison at 620e791e35, before this round. No microsimulation was run in this round. The hub still needs whole-stack impact, including pre-2024 deductions and this round's dependent-deduction/actual-receipt changes, plus the previously failed TAXSIM aggregate. The axiom: line is unchanged; parity remains with the hub.

Historical microsim impact

One real microsimulation run per side: 2025, default dataset (populace_us_2024), under the shared heavy lock. The base is #9882's head 54d30751e0 (frozen checkout); the PR side is 620e791e35. Record-by-record comparison, weighted:

Variable Base This PR Change
Elderly homeowner/renter credit $7,529,649 $7,529,649 $0 (11 recipient records, 10,313 weighted; none changes)
Gross household income, all Montana people $65.668bn $65.997bn +$329.0M (357 records, 195,894 weighted)
of which credit-eligible people (505 records, 333,856 weighted) +$29.9M (91 records, 63,017 weighted)
Net household income (line 22) $1,346.997M $1,349.331M +$2.33M (106 records)
Montana income tax, state income tax, household net income $0
mt_property_tax_rebate (tax year 2025) $80.98M $0 −$80.98M (225 records): no 2025 rebate
  • The credit total does not move on this dataset. It has only 11 claimant records. Their federal credits and rebate leave line 30 unchanged: they are capped, or their contribution stays below the property tax.
  • What the run cannot show. The higher gross household income reaches the credit only for claimants near the $35,000–$45,000 bands or not at the cap, and the sparse data has none of them. The YAML cases above show those paths.
  • TAXSIM aggregate not measured. taxsim_state_property_tax_credit, which carries the rebate change, failed in both runs. vt_renter_credit raises ParameterNotFoundError for Vermont tax units of more than 8 members, because its tables cover sizes 1–8. That bug predates this PR (filed separately). state_income_tax and household_net_income computed fine.
  • Outputs: ~/reviews/us-hub/mt-ehrc-refundable/microsim/ (compare-2025.json and both run logs).

axiom: TheAxiomFoundation/rulespec-us#1512 queued (extension comment with companion cases to follow)

🤖 Generated with Claude Code

MaxGhenis and others added 12 commits October 6, 2026 07:08
… the forms

- Federal income tax deduction (through 2023): attribute federal tax to the
  spouse who earned the income and cap each spouse at $5,000, instead of
  prorating the jointly capped amount by Montana AGI (2022 Form 2
  instructions, Itemized Deductions Schedule, line 4).
- Child and dependent care expense deduction (through 2023): phase out on the
  couple's combined Montana AGI and split the result equally only for spouses
  filing separately on the same form; a single filer and a joint return take
  the whole deduction (Form 2441-M lines 3-7).
- Elderly homeowner/renter credit: count federal AGI without regard to losses
  (MCA 15-30-2337(9)(a); Form 2EC line 9).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ions

Each spouse filing separately on the same form deducts their own federal
income tax up to $5,000, so both spouses itemize and Montana tax is 6,295.56.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…chedule

- A married person filing on a separate form (federal filing status
  SEPARATE) cannot take the child and dependent care expense deduction:
  "married couples shall file a joint return or file separately on the same
  form" (MCA 15-30-2131(1)(c)(vi)(A)); 2022 instructions, line 14.
- The 2023 credit schedule was the Elderly Homeowner/Renter Credit
  Schedule; it became Schedule 2EC in 2024.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MCA 15-30-2337(4) defines gross household income as "all income received
by all individuals of a household while they are members of the
household". The 2023 Elderly Homeowner/Renter Credit Schedule combines the
returns of "ALL members of the household" (lines 1-7 and 9) and has
non-filing members report their wages on line 8; the 2024 and 2025
Schedule 2EC put "Income received by other members of your household" on
line 17.

The model summed each person's federal AGI over the tax unit. A tax unit
dependent's federal AGI is zero (their income is on their own return), so
a dependent's wages and other income were left out, and household members
who file their own returns were never counted.

- Add dependent_gross_income to the gross income sources. It counts a
  dependent's gross income items, gains but not losses, and the taxable
  part of their Social Security; the formula now subtracts that part
  before adding the untaxed remainder, so the benefits count once.
- Sum gross household income over the household instead of the tax unit
  in the net household income and the credit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… tests

dependent_gross_income counts anyone who is not the head or spouse, while
irs_gross_income counts anyone who is not a dependent. A person with
neither role (a minor alone in a tax unit whose dependent flag is input as
false) was counted by both. Count dependent_gross_income in the formula
for tax unit dependents only, so the two paths split people exactly.

The property tests check, for random claimants and household members,
that gross household income is the Schedule 2EC total whether the other
member is a dependent or files their own return, that the credit is the
same either way, stays within its bounds, and never rises with income.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ARM 42.4.301(2) counts "federal refundable tax credits received" and "any
state refundable tax credits received, including elderly homeowner/renter
credit refunds" in gross household income, and Schedule 2EC line 8 (2023
line 7) combines the refundable credits received by all household members.
The model counted only the Montana EITC.

- Count the return's federal refundable credits (income_tax_refundable_credits)
  from 2017, once per tax unit, on the head.
- Add an input for this credit received during the year (last year's claim);
  reading last year's credit would rerun the prior-year model for every record.
- Count the rebate for the prior property tax year from 2024 (2024 and 2025
  Schedule 2EC line 8), read at period.last_year.
- Date the Montana property tax rebate: 675 for 2022-2023, 400 for 2024
  (Ch. 767, L. 2025), none after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis merged commit 6c62c7f into main Oct 11, 2026
26 checks passed
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

US + core hub merge audit, us#9915 at e212a4104f060cba0155a82a5b3eb9d150d11290 (squash): Count refundable credits received in Montana's elderly homeowner/renter credit income.

  • Review: independent GPT-6.1 Sol review approves this exact head, with no P1 or P2 (reviews-gen/us-9915/).
  • Methodology: the readings the sources leave open were put to Max and ruled: d1311 (Max 2026-10-11: yes to the four readings).
  • Impact: a hub microsimulation on the default dataset for 2026, merge base against this head; see the body's "Hub microsimulation impact (current head)" section.
  • Gates checked live at merge:
    • gh pr checks exits 0;
    • the latest Pull request run at the head concluded success;
    • MERGEABLE, not a draft, no CHANGES_REQUESTED;
    • the semantic-overlap guard;
    • head pinned.
  • Axiom: the body's axiom: line.
  • --admin: used only because a required approving review is the sole block.

@MaxGhenis
MaxGhenis deleted the fix-mt-ehrc-refundable-credits branch October 11, 2026 11:55
MaxGhenis added a commit that referenced this pull request Oct 11, 2026
The separate-filing allocation fragment duplicated the line released in
2.38.17, and the household-member income fragment repeated the
dependent and separate-filer income corrections released there too.
Keep one line per change this PR makes: the one-claimant limit and the
full multiplier for negative household income.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Oct 12, 2026
Most of this branch landed on main through #9915. Main's versions win
where the two overlap:

- mt_federal_income_tax_deduction_share keeps main's zero allocation
  when neither filer has positive income; the branch's head-fallback
  test is dropped.
- mt_elderly_homeowner_or_renter_credit_gross_household_income and both
  elderly credit test files are main's.

What the branch still adds over main:

- The care deduction and the federal-itemization charitable split use
  gov.states.mt.tax.income.deductions.itemized.spouse_allocation_rate
  in place of a hard-coded half.
- Tests: care deduction case 29, the five-rate charitable grid, and the
  floor on a spouse's negative federal AGI in the tax share.

The changelog fragment now describes only that remainder; the earlier
text was released in 2.38.x.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Oct 12, 2026
… household (MCA 15-30-2341(1)) (#9900)

* Align Montana separate-filing allocations and the elderly credit with the forms

- Federal income tax deduction (through 2023): attribute federal tax to the
  spouse who earned the income and cap each spouse at $5,000, instead of
  prorating the jointly capped amount by Montana AGI (2022 Form 2
  instructions, Itemized Deductions Schedule, line 4).
- Child and dependent care expense deduction (through 2023): phase out on the
  couple's combined Montana AGI and split the result equally only for spouses
  filing separately on the same form; a single filer and a joint return take
  the whole deduction (Form 2441-M lines 3-7).
- Elderly homeowner/renter credit: count federal AGI without regard to losses
  (MCA 15-30-2337(9)(a); Form 2EC line 9).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Update the 2021 Montana rebate case for per-spouse federal tax deductions

Each spouse filing separately on the same form deducts their own federal
income tax up to $5,000, so both spouses itemize and Montana tax is 6,295.56.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Address review: no care deduction on a separate form; name the 2023 schedule

- A married person filing on a separate form (federal filing status
  SEPARATE) cannot take the child and dependent care expense deduction:
  "married couples shall file a joint return or file separately on the same
  form" (MCA 15-30-2131(1)(c)(vi)(A)); 2022 instructions, line 14.
- The 2023 credit schedule was the Elderly Homeowner/Renter Credit
  Schedule; it became Schedule 2EC in 2024.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Count household members' income in the Montana elderly credit

MCA 15-30-2337(4) defines gross household income as "all income received
by all individuals of a household while they are members of the
household". The 2023 Elderly Homeowner/Renter Credit Schedule combines the
returns of "ALL members of the household" (lines 1-7 and 9) and has
non-filing members report their wages on line 8; the 2024 and 2025
Schedule 2EC put "Income received by other members of your household" on
line 17.

The model summed each person's federal AGI over the tax unit. A tax unit
dependent's federal AGI is zero (their income is on their own return), so
a dependent's wages and other income were left out, and household members
who file their own returns were never counted.

- Add dependent_gross_income to the gross income sources. It counts a
  dependent's gross income items, gains but not losses, and the taxable
  part of their Social Security; the formula now subtracts that part
  before adding the untaxed remainder, so the benefits count once.
- Sum gross household income over the household instead of the tax unit
  in the net household income and the credit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Count a dependent's income only for tax unit dependents; add property tests

dependent_gross_income counts anyone who is not the head or spouse, while
irs_gross_income counts anyone who is not a dependent. A person with
neither role (a minor alone in a tax unit whose dependent flag is input as
false) was counted by both. Count dependent_gross_income in the formula
for tax unit dependents only, so the two paths split people exactly.

The property tests check, for random claimants and household members,
that gross household income is the Schedule 2EC total whether the other
member is a dependent or files their own return, that the credit is the
same either way, stays within its bounds, and never rises with income.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Limit the Montana elderly homeowner/renter credit to one claimant per household

MCA 15-30-2341(1): "Only one claimant per household in a claim period ...
is entitled to relief." Since gross household income now counts every
household member, two eligible tax units in one household (for example two
elderly siblings filing separately) each computed a credit on the same
household income and both were paid.

- mt_elderly_homeowner_or_renter_credit_pre_one_claimant holds the existing
  computation (Schedule 2EC lines 18-30) for every eligible tax unit.
- mt_elderly_homeowner_or_renter_credit_selected_claimant (TaxUnit) ranks the
  eligible tax unit heads within each household by that credit with
  get_rank and selects the largest; ties keep member order, so exactly one
  tax unit per household with an eligible one is selected.
- mt_elderly_homeowner_or_renter_credit pays only the selected tax unit.

Six legacy credit cases that never set a state now place their households in
Montana. Adds YAML cases (two eligible tax units, one eligible, a joint
couple, a tie, separate households) and property tests against a
Schedule 2EC reference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Cite ARM 42.4.302 and make the head-filter test bite

- Cite ARM 42.4.302, the rule implementing 15-30-2341, in the selected
  claimant's references; note that neither it nor the statute says which
  member claims.
- Restore the living-apart note in the net household income comment with
  its source (ARM 42.4.302(3)(a)), and say in the selection comment that a
  separated spouse in another tax unit is not linked, so that limit is not
  modeled.
- Selected-claimant Case 8 now fails if non-heads are ranked: a dependent's
  input amount larger than the other tax unit's no longer decides the
  selection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Describe the claimant ranking and cost reading accurately; pin examples

Independent review (Opus) asked for text fixes only:
- The selection ranks by Schedule 2EC line 26 (property tax billed plus 15%
  of rent, before the cap), not by total housing cost; say so.
- Counting each tax unit's own property tax and rent follows the form's
  wording; the statute defines both for the homestead
  (MCA 15-30-2337(5), (10)). Name that reading as not modeled (queued for a
  ruling as decision d1035).
- Uniqueness of the selection comes from get_rank's ranks; its stable sort
  only breaks ties.
- Cite ARM 42.4.302 at Cornell, which shows the rule text.

The Hypothesis test is now derandomized and pins a tie at the cap and an
owner against a renter who pays more but has the smaller line 26.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Attribute Schedule 2EC quotes to the form's line labels, not the instructions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Preserve dependent AGI adjustments for Montana elderly credit

* Apply Montana elderly credit multiplier to negative household income

* Supply explicit filer roles in Montana income property tests

* Drop changelog entries already released from #9915

The separate-filing allocation fragment duplicated the line released in
2.38.17, and the household-member income fragment repeated the
dependent and separate-filer income corrections released there too.
Keep one line per change this PR makes: the one-claimant limit and the
full multiplier for negative household income.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Oct 14, 2026
…in Montana's elderly credit income (#10139)

* Count a filer's gains without netted losses and Social Security once in Montana elderly credit income

Gross household income is federal AGI "without regard to loss" (MCA
15-30-2337(9)(a)); 2024 Schedule 2EC line 7 says "do not include any
capital losses". The loss add-back restores only loss_ald, which holds the
capital loss deducted in AGI. A filer's short-term loss netted against
their own long-term gain never reaches it, so a member on their own return
with a $10,000 long-term gain and a $4,000 short-term loss counted $6,000;
as a dependent the same person counted $10,000. Restore the netted loss for
everyone who is not a tax unit dependent, as dependent_gross_income does.

The untaxed Social Security add-back subtracted both taxable_social_security
and dependent_taxable_social_security. A person input as a dependent who is
also the head (every adult in the unit input as a dependent) has neither
counted, so part of their benefits dropped out. Subtract only the taxable
part that irs_gross_income or dependent_gross_income actually counted.

Review findings S1 (DTrim99) and P2 (GPT-6.1 Sol) on
#9882, whose changes landed in #9915.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Add Schedule 2EC cases for netted gains, the dependent gate and overlapping roles

Four cases fail on main (a filer's and a claimant's netted capital loss,
Social Security for a person input as both dependent and head, and the
credit-level netting case); five guard behavior main already has (the
dependent gate for a minor alone in a tax unit, a business loss on another
member's return, cross-spouse netting on a joint return, and a dependent in
another member's tax unit).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Restore the year's gain hidden by a capital loss carryover in Montana elderly credit income

long_term_capital_gains already includes the prior-year long-term capital
loss carryover as a loss (Schedule D line 15; long_term_capital_loss_carryover
is a memo). A carryover is a loss, so it must not reduce gross household
income (MCA 15-30-2337(9)(a); 2024 Schedule 2EC line 7, "do not include any
capital losses"). Add it back to get the year's own long-term gain, as
az_property_tax_credit_capital_gains does, and restore only the gain it hid,
on both income paths. Restoration applies where an income path counts the
person, so a person input as both a dependent and the head stays excluded
from both, as before.

New cases: a carryover smaller than, larger than and equal to the year's
gain; a dependent's carryover; a long-term loss netted against a short-term
gain; losses exceeding the gain; and Social Security for a spouse also input
as a dependent. Review finding P2 (GPT-6.1 Sol) on #10139.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Describe the carryover in the changelog fragment

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Count a carryover only against gains a direct net capital_gains input shows; add capital gains property tests

When capital_gains is supplied directly as a net amount, the long-term and
short-term parts default to zero, so adding the carryover to the long-term
part invented a gain: a direct -5,000 net with a 5,000 carryover counted
5,000 (review round 2 on #10139). Compute gains without losses as the year's
net, max(0, capital_gains + carryover), plus the netting between the
year's long-term and short-term amounts, max(0, a) + max(0, b) - max(0, a + b).
With parts supplied this is the floored parts; with a direct net it is the
net alone.

test_mt_elderly_credit_capital_gains.py checks, for random long-term and
short-term amounts or a direct net, a carryover and distributions, that a
household member's gains count without losses whether they are a dependent,
file their own return or are the claimant, against a reference written from
Schedule 2EC line 7, and that the credit is the same either way. It is
derandomized (20 examples, 11 s of test time locally); a 300-example random
local run passed, and it fails on main and on the previous head.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Let the long-term and short-term parts decide Montana elderly credit gains; test every sign region in one simulation

Once capital_gains is an input for anyone in a simulation, everyone without
one holds its default of zero, not the sum of their parts. The previous
identity started from capital_gains, so a dependent with only a 10,000
long-term gain, beside a claimant whose capital_gains was supplied as 0,
counted nothing (review round 3 on #10139). The parts now decide the gains
whenever either is nonzero, max(0, long-term + carryover) + max(0,
short-term); without parts, capital_gains is a net supplied directly and
counts as max(0, net + carryover). The restoration replaces whatever the
income path counted, so an inconsistent capital_gains input yields to the
parts.

test_mt_elderly_credit_capital_gains.py now builds one simulation from a
grid covering every sign region of the long-term amount plus carryover, the
short-term amount and a direct net, with and without distributions, in three
input styles (parts with their net, parts with the net left to default, a
net alone) and three placements (dependent, own return, claimant). It
replaces 20 Hypothesis-built simulations: 3.1 s of test time locally, peak
footprint 1.25 GB against 1.24 GB for importing the model and building a
one-person simulation, so about 8 MB for the test itself. It fails on main
and on the previous two heads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant