Skip to content

Allocate Missouri spouses' federal AGI by owner, with the negative federal AGI rule and MOST limit - #10015

Merged
MaxGhenis merged 6 commits into
mainfrom
mo-spouse-fagi-division
Nov 14, 2026
Merged

MaxGhenis merged 6 commits into
mainfrom
mo-spouse-fagi-division

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Spouses filing a combined Missouri return enter their own income, losses, and federal deductions in separate MO-1040 columns. We allocate those amounts by owner, apply the department's negative federal AGI rule from 2024, limit the Missouri Savings for Tuition (MOST) subtraction in 2024–2025, and preserve negative Missouri AGI when dividing the couple's taxable income.

Spouses divide joint federal AGI on the Line 1 worksheet in the 2023 MO-1040 instructions. On Line 7, the department gives a spouse with negative income zero percent when the other spouse has positive income. The department specifies capital-loss allocation in 12 CSR 10-2.010(2).

Changes

  • Add mo_federal_adjusted_gross_income for each filer's Line 1. Use allowed federal deductions, attribute business losses to their owners, and allocate deductible capital losses by responsibility for the excess.
  • Count each spouse's non-SSTB and SSTB Schedule C losses separately, as limited_business_loss does. A spouse with a profit in one category and a loss in the other keeps that loss in their own column.
  • Apply the negative federal AGI treatment from 2024. When joint federal AGI exceeds zero and one spouse's separate amount falls below zero, that spouse enters zero and the other enters the joint amount.
  • Calculate Line 5 as federal AGI plus Missouri additions less subtractions, without flooring each spouse's amount.
  • Limit each spouse's MOST subtraction to available Missouri AGI in 2024–2025. Include Missouri additions before applying that limit.
  • Add both Line 5 columns before deducting the couple's deductions. Divide taxable income among positive columns; a spouse with nonpositive Missouri AGI receives zero taxable income.

The department explains the negative federal AGI treatment in the 2025 instructions, where it cites 12 CSR 10-2.710, and in 12 CSR 10-2.010(5).

Invariants

For supported single and joint returns using calculated federal income and deduction components:

  1. The filers' Line 1 amounts sum to federal AGI through 2023 and its nonnegative part from 2024. Dependents receive zero.
  2. Each filer keeps their own income, losses, and allowed deductions, subject to Missouri's capital-loss netting and negative federal AGI treatment.
  3. Each filer's Line 5 equals Line 1 plus additions less subtractions, subject to the MOST limit for 2024–2025.
  4. Swapping head and spouse labels preserves each person's Line 1, Line 5, taxable income, and the couple's Missouri tax.
  5. Taxable income remains nonnegative, nonpositive columns receive none, and the total cannot exceed nonnegative combined Missouri AGI.

Methodology choices

  • Apply the 2025 combined-return floor method from 2024. The department directs filers to enter zero for negative federal AGI in the 2024 instructions, without explaining combined-return allocation. It explains that allocation in the 2025 instructions. In the February 2024 version of 12 CSR 10-2.010(4)(A)1, one spouse reports −$6,000. In the April 2026 amendment, the department starts that spouse at zero and the other spouse at the joint $32,000.
  • Map the MOST limitation to tax years 2024–2025. The department limited the lower-income spouse's subtraction in its February 2024 amendment. It permitted negative AGI in that example in its April 2026 amendment. It gives no explicit tax-year transition, and its 2023–2025 instructions state only the dollar caps.
  • Take MOST after other subtractions. The department does not specify that ordering.
  • Divide adjustments equally when inputs omit ownership. That covers a deduction recorded only for the tax unit, and adoption assistance or a savings bond exclusion recorded on a dependent. Congress divides the family-coverage HSA contribution limit equally between spouses unless they agree otherwise in 26 USC 223(b)(5). We use equal allocation of unowned actual deductions as a data fallback.
  • Use the pro rata fractions the department states in Example 2 for capital losses. Those fractions yield deductions of $2,836.36 and $163.64. The department prints $2,850 and $150 in the table, which equal 95% and 5% of $3,000: the same fractions rounded to whole percents, the rounding it asks for on Line 7.
  • Read the second spouse's long-term amount in Example 2 as a $3,000 gain. The department prints ($3,000) beside a ($5,000) long-term total and a $5,200 excess for the first spouse; only a gain fits both.
  • Allocate a binding section 461(l) business-loss limit in proportion to each spouse's business losses. Use each spouse's net capital loss when inputs omit the short-term and long-term split.
  • Retain continuous Line 7 shares. The department asks filers to round their percentages to whole numbers.
  • Use component inputs for the accounting identity. We do not infer ownership from a directly supplied aggregate above_the_line_deductions override.

Tests

Pull request run 43610356173 at d083e34f33 passed all 36 jobs on GitHub's merge with main dbe0e598f9.

  • mo_federal_adjusted_gross_income.yaml (22 cases) covers the department's 2025 table, the three 12 CSR 10-2.010(2) examples, and ownership of losses and adjustments.
    • Two cases give one spouse a profit in one Schedule C category and a loss in the other. Both fail when Line 1 nets the categories: it returns [7,146.76, 27,500] where the worksheet gives [4,646.76, 30,000], and [−4,000, 42,000] where it gives [−6,000, 44,000].
    • One case records $5,000 of adoption assistance on a child, and the spouses' columns read [47,500, 27,500]. It fails when Line 1 drops amounts recorded on dependents: the columns [50,000, 30,000] then exceed joint federal AGI of $75,000 by $5,000.
    • The 2023 case "Each spouse's IRA, student loan interest and educator expenses stay in their column" pins one spouse's adjustments. The 40-year-old primary spouse deducts $6,500 of a $7,000 IRA contribution, $2,500 of student loan interest and $300 of educator expenses. Their column equals $40,000 − $6,500 − $2,500 − $300 = $30,700, the other spouse's equals $8,000 of wages, and joint AGI equals $38,700.
  • mo_adjusted_gross_income.yaml (14 cases), mo_income_tax_before_credits.yaml (14) and mo_taxable_income.yaml (5) cover Line 5, the MOST limit, Line 7 shares and tax.
  • test_mo_combined_return_federal_agi_properties.py (4 tests) checks the invariants for drawn and seeded couples, each with the head and spouse labels both ways round. The couples have non-SSTB and SSTB self-employment income or losses. Seven people in the seeded couples have a profit in one category and a loss in the other, so the 2023 seeded test fails when Line 1 nets the categories.

Out of scope

loss_ald_person nets each person's non-SSTB and SSTB amounts before it reads losses, so adjusted_gross_income_person still divides the two new Schedule C households' losses by the wrong shares. This PR leaves that federal variable unchanged, and #10920 tracks the fix.

mo_ptc_gross_income still adds the whole capital loss back on MO-PTS line 7 when federal AGI falls below zero. #10922 tracks that fix, which should limit the add-back in the years this PR floors federal AGI.

Microsimulation impact

We estimate that this branch raises mo_income_tax by $82,521 in 2026 on the default dataset. It raises Missouri tax for 10 sampled tax units (17,105 weighted) by $97,240 in all and lowers it for 31 (25,146 weighted) by $14,671. Federal income tax and benefits don't change. We compared main at a93cc58d7e with this branch at d083e34f33.

Output Main total Change Records changed (weighted)
mo_income_tax $8.64bn +$82,521 41 (42,251)
mo_adjusted_gross_income $276.5bn -$21.6m 322 (833,208)
mo_taxable_income $197.0bn -$274,140 307 (800,678)
state_income_tax $576.5bn +$82,521 41 (42,251)
income_tax $2,594.9bn $0 0 (0)
household_benefits $2,060.5bn $0 0 (0)
household_net_income $17,247.1bn -$82,520 40 (42,251)

Axiom

axiom: TheAxiomFoundation/rulespec-us#2237 queued (12 CSR 10-2.010 and 10-2.710 and MO-1040 Lines 1 and 5-7; the pinned corpus release lacks those sources and rulespec-us#1494 tracks a prerequisite, so the signed encoder can't run yet)

The corpus holds the April 2026 text of 12 CSR 10-2.010, 12 CSR 10-2.710 and the 2023–2025 MO-1040 instructions outside that release, but not the February 2024 text of 10-2.010. rulespec-us#1494 asks to sum the section 62(a) deductions over each return's taxpayer and spouse, and each column subtracts one spouse's part of them.

🤖 Generated with Claude Code

…and 12 CSR 10-2.010 do

On a combined MO-1040, each spouse's Line 1 now holds their own income,
losses and federal adjustments (Line 1 worksheet; 12 CSR 10-2.010(4)),
with capital losses following 12 CSR 10-2.010(2). From 2024 a negative
federal AGI is replaced by zero, and the other spouse enters the whole
joint amount when it is positive (12 CSR 10-2.710(1); 2025 instructions
p. 6; 12 CSR 10-2.010(5)). Line 5 is no longer floored per spouse; Line 6
adds the columns and Line 7 gives a negative column 0%. The MOST
subtraction is limited to the spouse's Missouri AGI in 2024-2025 only.

Previously every adjustment other than the self-employment ones, and all
business and capital losses, were split by gross income share, and each
spouse's Missouri AGI was floored at zero before Line 6.

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

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.87234% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.40%. Comparing base (909176a) to head (8843e8a).
⚠️ Report is 315 commits behind head on main.

Files with missing lines Patch % Lines
...d_gross_income/mo_federal_adjusted_gross_income.py 97.46% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##              main   #10015      +/-   ##
===========================================
- Coverage   100.00%   98.40%   -1.60%     
===========================================
  Files            4        3       -1     
  Lines           76      125      +49     
  Branches         2       11       +9     
===========================================
+ Hits            76      123      +47     
- Misses           0        1       +1     
- Partials         0        1       +1     
Flag Coverage Δ
unittests 98.40% <97.87%> (-1.60%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

MaxGhenis and others added 4 commits November 13, 2026 08:58
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Clarify the source conflicts and tax-year assumptions used in the allocation tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Describe the filer's allowed deduction in the 2023 example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Describe the filing steps in our own words and identify the MOST subtraction ordering as a modeling choice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis MaxGhenis changed the title Divide federal AGI between Missouri spouses by the MO-1040 Line 1 worksheet and 12 CSR 10-2.010 Allocate Missouri spouses' federal AGI by income ownership Nov 13, 2026
We deduct a non-SSTB loss and an SSTB loss separately in the federal
business loss, but Line 1 read the two netted for each spouse. A spouse
with a profit in one category and a loss in the other showed a smaller
loss or none, and the couple divided that loss by the wrong shares. Read
the two categories separately.

Add cases for both sign patterns and for adoption assistance recorded on
a child, and draw SSTB income in the property test.

Cite 12 CSR 10-2.710 through the department's 2025 MO-1040 instructions.
Note that the 2,850 and 150 in the 12 CSR 10-2.010(2) Example 2 table
equal its fractions rounded to whole percents.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@MaxGhenis MaxGhenis changed the title Allocate Missouri spouses' federal AGI by income ownership Allocate Missouri spouses' federal AGI by owner, with the negative federal AGI rule and MOST limit Nov 14, 2026
@MaxGhenis MaxGhenis closed this Nov 14, 2026
@MaxGhenis MaxGhenis reopened this Nov 14, 2026
@MaxGhenis MaxGhenis closed this Nov 14, 2026
@MaxGhenis MaxGhenis reopened this Nov 14, 2026
@MaxGhenis
MaxGhenis merged commit 547743b into main Nov 14, 2026
76 of 80 checks passed
@MaxGhenis
MaxGhenis deleted the mo-spouse-fagi-division branch November 14, 2026 16:42
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

US + core hub merge audit, us#10015 at d083e34f3390398d4fa61b7547a276971418342d (squash): Allocate Missouri spouses' federal AGI by owner, with the negative federal AGI rule and MOST limit.

  • Reviews:
    • The PR has no GitHub reviews. Two independent review rounds ran outside GitHub, with a fix round between them.
    • The first round, at cfb1f14f54, checked the 2023–2025 MO-1040 instructions and both versions of 12 CSR 10-2.010 against the code. It ran the four changed test files and the property test on the head, 52 YAML cases and 4 property tests, and all passed. Each changed YAML file that exists on main failed on the merge base, and hand values written before each household run matched.
    • It found that Line 1 netted each spouse's non-SSTB and SSTB Schedule C amounts before it looked for a loss. A couple whose head has a $10,000 non-SSTB profit and a $5,000 SSTB loss got columns of [7,146.76, 27,500] where the worksheet gives [4,646.76, 30,000], and Missouri tax of $114.25 instead of $127.51.
    • It also found no test for amounts recorded on a dependent. A mutant that skipped them passed the Line 1, Line 5 and property tests, while $5,000 of adoption assistance recorded on a child would move the columns to [50,000, 30,000, 0], $5,000 above joint federal AGI. It asked for an impact estimate and an accepted axiom: form, and listed minor findings on an Example 2 comment, duplicated federal logic, the unread 12 CSR 10-2.710, the MOST window, the title and a MO-PTS follow-up.
    • The fix round, at d083e34f33, counts each Schedule C category's loss on its own, adds the two Schedule C households and the adoption household as cases, and draws SSTB amounts in the property test. Its author reported that a netting mutant failed both Schedule C cases and all four property tests, and that a mutant without the dependents branch failed the adoption case.
    • The second round, at d083e34f33, found no code defect and asked for description changes, among them an impact estimate and the queued axiom: form. It recomputed the three new cases by hand from 26 USC 1401, 1402 and 137, and the CI logs show all 55 YAML cases in the changed files and the 4 property tests passing. It ran no test or mutant on this head. On cfb1f14f54, its eight-household script reproduced [7,146.76, 27,500] and [−4,000, 42,000]. git merge-tree against two main commits showed no conflict.
    • It listed three minor findings: a stray paragraph under Tests, no source-conflict candidate for the 2024 reading, and the federal logic the new variable restates. The description fixes the first, the second stays a follow-up, and the third waits on The model can move one spouse's Schedule C loss to the other spouse when the owner also has a profit in the other SSTB category #10920.
    • The reviews listed corrections to the description, and I made each before merge. The description now names the IRA case and its adjustments, uses the queued axiom: form, and cites The model can move one spouse's Schedule C loss to the other spouse when the owner also has a profit in the other SSTB category #10920 and The model adds the whole capital loss deduction to Missouri property tax credit income when federal AGI falls below zero #10922. It limits the property-test claim to the seeded 2023 test. I recomputed the seeded draws outside PolicyEngine: when Line 1 nets the categories, five couples' 2023 columns move by $910.50 to $22,796.
  • Methodology choices for maintainers:
    • From tax year 2024, PolicyEngine-US applies the 2025 instructions' method to a combined return: a spouse with negative separate federal AGI enters $0 and, when joint federal AGI stays positive, the other enters the joint amount. The 2024 instructions say only to enter $0. A maintainer who floors the negative spouse alone would give the 2024 case [0, 100,000], $10,000 above joint federal AGI, where the PR gives [0, 90,000].
    • PolicyEngine-US applies the MOST limit in tax years 2024 and 2025. The department limited MOST in its February 2024 amendment of 12 CSR 10-2.010, gave the MOST spouse −$4,000 in its April 2026 amendment's example, and named no tax year in either. Ending the limit after 2024 would change the 2025 case from [38,000, 0] to [38,000, −4,000].
    • PolicyEngine-US applies Example 2's stated fractions to capital losses, giving $2,836.36 and $163.64, where the department's table prints $2,850 and $150, the same fractions rounded to whole percents. The columns read [7,163.64, 4,836.36] against the printed [7,150, 4,850].
    • PolicyEngine-US keeps continuous Line 7 shares, where filers round to whole percents.
    • PolicyEngine-US divides an adjustment recorded only for the return, or on a dependent, equally between the spouses. A $4,000 HSA deduction recorded only for the return gives [38,000, 18,000], where the account holder's own record gives [40,000, 16,000].
    • When the section 461(l) limit binds, PolicyEngine-US allocates the allowed business loss in proportion to each spouse's business losses.
  • Gates checked live at merge:
  • Impact: On the default dataset for 2026, we estimate that the branch raises Missouri income tax by $82,521 on net. It raises tax by $97,240 for 10 sampled tax units (17,105 weighted) and lowers it by $14,671 for 31 (25,146 weighted). Missouri AGI falls by $21.6m across 322 sampled records, and federal income tax and benefits don't change. The run compared main at a93cc58d7e with the head d083e34f33.
  • Next:
  • Axiom: Encode Missouri's combined-return split of federal AGI, the negative federal AGI rule and the MOST limit (12 CSR 10-2.010 and 10-2.710; MO-1040 Lines 1 and 5-7) (PE-US #10015) TheAxiomFoundation/rulespec-us#2237 queued, a new pe-parity issue for 12 CSR 10-2.010 and 10-2.710 and MO-1040 Lines 1 and 5-7, with companion rows from this PR's YAML. The signed encoder can't run yet: the pinned corpus release carries no Missouri regulation or form, the corpus lacks the February 2024 text of 10-2.010, and rulespec-us#1494 remains open.

🤖 Generated with Claude Code

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