Repository navigation
Fix Montana's 2017–2023 state and local tax deduction - #10002
Conversation
…5,000 per separate column Form 2, Itemized Deductions Schedule, line 5 (2021-2023) adds lines 5a through 5d and caps the total at $10,000 (single, head of household, married filing jointly) or $5,000 (married filing separately). - mt_salt_deduction: a joint return's taxes are pooled and capped once, on the head. It had capped each spouse separately, so a couple with $8,000 each deducted $16,000. - mt_salt_deduction_indiv (new): each column of a return filed separately on the same form (status 2a) is capped at $5,000. The separate-columns path had used the tax unit's joint cap ($10,000). - Line 5a: add the tax unit's general sales taxes (state_sales_tax, local_sales_tax), split equally between a couple's columns. - From 2024 (schedule discontinued) the per-person amounts are as before; the 2024 Worksheet A change is separate. The 2021-2023 switch is gov.states.mt.tax.income.deductions.itemized. state_specific_deduction_applies, byte-identical to the file in #9903 and #9947. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ction
Review r1 found that local_income_tax is not always zero for a Montana
household: PolicyEngine levies the Kansas City and St. Louis earnings
taxes and the Philadelphia wage tax on earnings in those cities without a
residence test. Line 5 adds "any local income taxes that you paid".
- mt_salt_deduction: the joint return's line 5 adds local_income_tax.
- mt_salt_deduction_indiv: each column takes the tax unit's local income
tax in proportion to the person's own earnings taxed by those cities
("Deductions that are attributable to only one spouse must be claimed
by that spouse"); without such earnings it is divided like the sales
taxes.
- YAML: Kansas City cases for a single return, a joint return at the
cap, and two separate-column cases. The Hypothesis file adds Kansas
City earnings to its draws and reference calculation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review r2: dividing the tax unit's local income tax by each spouse's share of taxable city earnings is exact only when everyone pays the same rate with no credit. PolicyEngine sets Philadelphia's rate per person and subtracts St. Louis credits per person. - New Person variables mo_kansas_city_earnings_tax_person, mo_st_louis_earnings_tax_person and pa_philadelphia_wage_tax_person hold each person's own tax, with the existing formulas. The tax-unit variables now add them up, so their values do not change. - mt_salt_deduction_indiv: each column takes its own spouse's city tax. Any other local income tax of the tax unit (none for a Montana household) is divided like the sales taxes. - YAML: first tests for the three city taxes; Montana cases for a Philadelphia reduced rate, a St. Louis credit, two cities with one column at the cap, and a joint return with two cities. - Hypothesis: St. Louis earnings and per-person credits in the draws. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR Review: Cap Montana's 2021–2023 state and local tax deduction once per joint return and at $5,000 per separate columnSummaryThe fix is right in law. I checked the 2021, 2022 and 2023 Form 2 Itemized Deductions Schedule, line 5 (PDF p. 7 each year). It reads: "Add lines 5a through 5d, enter the total here, but not more than $10,000 if your status is single, head of household or married filing jointly; or $5,000 if you are married filing separately". The filing-separately rules say a status 2a return is split "between Columns A and B, with each column constituting its own return" (2021 instructions PDF p. 10, 2022 p. 11, 2023 p. 12).
I hand-checked 23 expectations and the PR body's household table. The branch is 729 commits behind main and conflicts with it in two YAML test files. I resolved them the obvious way (keep both renames) and ran a merged tree locally:
Two points remain open, both SHOULD:
Critical (must fix)None. Should address
Suggestions
Verified correctLaw
Formulas
Hand checks
City tax files: PR body table:
Other checks
Axiom line assessment
CI status
Branch status
Verdict: REQUEST_CHANGES |
DTrim99
left a comment
There was a problem hiding this comment.
Requesting changes: 0 critical, 2 should (the other_local_tax term is unpinned; the 2023 instructions are cited twice instead of one entry with a page-list title). The cap logic matches Form 2 line 5 for 2021-2023 and every filing status, and the merged tree passes locally. Branch note: 729 behind, with conflicts in two Montana YAML files (keep both renames). Full report in the comment above.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#10815 added South Dakota's `us-sd:cca-hourly-private-pay-cap` entry at the end of `source_conflicts/candidates.yaml`, where this branch adds `us-mt:salt-sales-income-election`. This merge keeps #10815's entry first and this branch's entry after it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Main dates Montana's itemized deduction switches from 2017, so the line-5 rule covers 2017–2023, and 2015 and 2016 take the 2017 values. - Add 2018, 2019 and 2020 joint and separate-column cases, a 2020 city earnings tax case, and 2017 cases with no cap. - Cite the 2017–2020 Form 2 instructions and MCA 2017 and 2019. - Widen `us-mt:salt-sales-income-election` to 2018–2023, and record line 8 of the 2017 return as the open candidate `us-mt:salt-2017-sales-tax-federal-tie`. - Replace the five source captures with whole pages and sections, and capture each source the two candidates now cite. - Describe in a comment how the joint return and the separate columns read local income taxes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Main appended source-conflict candidates where this branch appended its two Montana entries. Keep main's entries in main's order, then this branch's two. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
David, here's where each item of your review stands at
One more change followed your review. Main now dates Montana's schedule from 2017 (#10847), so the rule covers 2017–2023. Two independent AI reviews followed yours, and the second approved 🤖 Generated with Claude Code |
The commits since this review answer its two "should" items and the branch note, and my reply above maps each item to its commit and file. One change goes past the review: line 5 now follows the statute's sales-or-income election over the form's sum.
|
US + core hub merge audit, us#10002 at
🤖 Generated with Claude Code |
Summary
For 2017–2023, main capped each person's real estate taxes separately at the return's cap and counted no sales or local income taxes. From 2018, when Congress capped the deduction, a joint couple could deduct up to $20,000, and each spouse filing separately on the same form could deduct up to $10,000.
We now cap Montana's state and local tax deduction at $10,000 per joint return and $5,000 per separate column for 2018–2023. We also add the larger of general sales taxes and local income taxes to real estate taxes, following the election in 26 USC 164(b)(5)(A). Congress set no cap for 2017, so a 2017 return deducts those taxes in full.
We pool eligible taxes per return in
mt_salt_deductionand assign the deduction to the head. We calculate separate columns withmt_salt_deduction_indiv. New person-level Kansas City, St. Louis and Philadelphia taxes give each column its own city tax, and the tax-unit totals add them.Main dates the three Montana parameters this rule reads from 2017:
state_specific_deduction_applies,spouse_allocation_rateandmarried_filing_separately_on_same_return_allowed. The model copies each parameter's earliest value back to 2015, so 2015 and 2016 take the 2017 rules. We change no result from 2024.Law
Montana incorporated federal itemized deductions while excluding state income taxes under former MCA 15-30-2131(1)(a) (MCA 2017, MCA 2019, MCA 2021).
Taxpayers choose general sales taxes or local income taxes under 26 USC 164(b)(5)(A). Under 164(b)(6), Congress capped the deduction at $10,000, or $5,000 for a married person filing separately, for tax years beginning after 2017 and before 2026.
We follow that election over cumulative lines 5a and 5b on 2021, 2022 and 2023 Form 2. The department lists the same lines 5a–5d under line 5 in its 2018 (PDF pages 27–28), 2019 (pages 32–33) and 2020 (pages 29–30) instructions.
Spouses filing separately on the same form each have a return under the 2023 allocation instructions, pages 12–13, and under the 2018 (page 10), 2019 (page 9) and 2020 (page 8) instructions.
For 2017, the department puts sales taxes on line 8, local income taxes on line 9 and real estate taxes on line 10 of Schedule III, with no cap (instructions, PDF page 29). A filer who itemized on the federal return enters on line 8 the sales taxes claimed on federal Schedule A, and none when that return deducted state income taxes. A filer who took the federal standard deduction, or didn't have to file a federal return, enters the sales taxes paid. Spouses filing separately on the same form submit two returns (page 6).
We record two source-conflict candidates, with a capture of each page and section they cite under
source_conflicts/sources/mt-salt-election/:us-mt:salt-sales-income-electioncovers 2018–2023 and follows the statute.us-mt:salt-2017-sales-tax-federal-tiecovers 2017 and stays open.Invariants
Methodology choices
local_income_taxon the joint return, and each spouse's own city taxes plus half the remainder in the columns. An input below the sum of the city taxes gives the two paths different amounts.Tests
Pull request run 43726566182 at
55c624873bpassed all 37 jobs on GitHub's merge with main5dcbbab02d.mt_salt_deduction.yamlmt_salt_deduction_indiv.yamlmt_itemized_deductions_indiv.yamlmt_itemized_deductions_for_federal_itemization_indiv.yamlmt_claim_of_right_deduction.yamlmo_kansas_city_earnings_tax.yamlmo_st_louis_earnings_tax.yamlpa_philadelphia_wage_tax.yamltest_mt_salt_deduction_invariants.pytest_mt_mortgage_interest_federal_limit_properties.pytest_source_conflicts.pyTwelve cases cover 2017–2020. For each of 2018, 2019 and 2020, they hold a joint couple and its separate columns. They also hold a 2020 couple with a spouse's Kansas City earnings tax, and a 2017 couple and a 2017 single filer with no cap. Under main's per-person formula, the 2018–2020 joint cases give [8,000, 8,000] where they expect [10,000, 0], and the 2017 joint case gives [8,000, 8,000] where it expects [16,000, 0].
Seven property tests run up to six examples per Hypothesis test and check 150 seeded tax units, including residual taxes and surviving spouses. When any unit has residual local tax, we set all units' local tax inputs.
Microsimulation impact
We estimate no change in 2026 on the default dataset, where none of the 12 measured outputs moves. This PR changes Montana's deduction for 2017–2023. We compared
mainat9a63ae6605with this branch at42fec89dd3.mt_income_taxmt_salt_deductionmt_non_medical_itemized_deductions_indivmo_kansas_city_earnings_taxmo_st_louis_earnings_taxpa_philadelphia_wage_taxmo_income_taxpa_income_taxstate_income_taxincome_taxhousehold_benefitshousehold_net_incomeaxiom: TheAxiomFoundation/rulespec-us#2247 queued (former MCA 15-30-2131(1)(a) with 26 U.S.C. 164(b)(5)(A) and (b)(6), Itemized Deductions Schedule line 5 for 2018–2023; the corpus lacks the 2018–2020 Form 2 instructions and the 2017 Montana Code, so the signed encoder can't run the full range yet)
🤖 Generated with Claude Code