Skip to content

Split the New Mexico net capital gains deduction between separate filers - #9689

Merged
hua7450 merged 17 commits into
mainfrom
nm-mfs-capital-gains-split
Oct 13, 2026
Merged

hua7450 merged 17 commits into
mainfrom
nm-mfs-capital-gains-split

Conversation

@DTrim99

@DTrim99 DTrim99 commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #9679.

Stacked on #9585 (merge that first) — the diff includes #9585's commits until it merges.

New Mexico's net capital gains deduction now gives each married-filing-separately spouse one-half of the deduction computed on the couple's combined net capital gain. Previously, each separate filer's own gains determined the deduction, which was then halved.

Law

  • NMSA 7-2-34(B), as amended by 2019 HB6, section 14(B): "Married individuals who file separate returns for a taxable year in which they could have filed a joint return may each claim only one-half of the deduction provided by this section that would have been allowed on the joint return."
  • 2024 HB252, section 8(B) keeps the same subsection (B) from 2025.
  • PIT-ADJ line 16 instructions (2023, 2024, 2025): "A taxpayer and spouse who file separate returns ... may each claim only one-half of the net capital gains deduction allowed on a joint return."

Changes

  • nm_net_capital_gains_deduction: each spouse filing separately heads their own tax unit, so the formula reaches the other spouse's unit through the marital unit. It pools the two units' long-term gains (including capital gain distributions) and short-term gains only when the marital unit holds exactly two people who both head a separate-filing unit. This matches the guard in ar_medical_expense_deduction_floor, since without explicit marital units everyone shares one default unit. The IRC 1222(11) netting and the joint-return cap/floor then apply to the combined amount, and each spouse receives the separate-filer share. Other filing statuses are unchanged. A separate filer with no identifiable spouse still uses its own gains, halved, as before.
  • New parameter gov.states.nm.tax.income.deductions.net_capital_gains.separate_filer_share (0.5) replaces the hardcoded where(separate, 2, 1) divisor.
  • Removes the limitation comment Fix AR, MT and NM income tax gaps found in TAXSIM comparison sweep #9585 added.

Before and after (MFS couples)

Case Year Before (spouse 1 / spouse 2) After (each)
$2,000 long-term gain each 2023 $500 / $500 $800 (combined $4,000; max(40% x 4,000, 1,000) = 1,600; halved)
+$20,000 and -$15,000 long-term 2023 $4,000 / $0 $1,000 (combined $5,000; 40% = 2,000; halved)
$10,000 gain on one spouse only 2023 $2,000 / $0 $2,000 (joint 4,000; halved)
$3,000 and $1,000 long-term 2025 $1,250 / $500 $1,250 (combined $4,000; joint cap $2,500; halved)

Tests

Nine cases added at the bottom of nm_net_capital_gains_deduction.yaml: gains on one spouse only, gains split between spouses, a long-term loss offsetting the other spouse's gain, a short-term loss offsetting the other spouse's long-term gain, combined gains at the 2023 $1,000 cap and above the 2025 $2,500 cap, a couple with a dependent and explicit marital units, and joint and single regressions.

  • nm_net_capital_gains_deduction.yaml: 30 passed
  • NM deductions folder: 93 passed
  • NM integration test: 4 passed

🤖 Generated with Claude Code

https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH

DTrim99 and others added 6 commits September 23, 2026 14:16
- AR: count partnership/S-corp income in gross income (AR1000F Line 19);
  stop flooring each spouse's net income separately on joint returns
  (all income goes in Column A), flooring the unit total instead.
- MT: floor the capital gain credit at zero on net capital losses; allow
  dependent exemptions for non-child dependents with gross income at or
  below the exemption amount, with the disabled extra exemption for
  children only.
- NM: from TY2023, compute net capital gains per IRC 1222(11) (net
  long-term gain less net short-term loss), excluding short-term gains.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…nition

Test Montana's non-child dependent exemption against the dependent's own
gross income (dependent_gross_income) instead of irs_gross_income, which
is zero for dependents, with earnings-derived below/at/above-limit cases.
Apply New Mexico's IRC 1222(11) net capital gain definition in every year
(NMSA 7-2-34(D), 2019 HB6) and drop the unsupported pre-2023 exception.
Add Arkansas joint asymmetric profit/loss and New Mexico cross-spouse
netting coverage.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
Test Montana's non-child dependent exemption against a new
mt_dependent_gross_income (MCA 15-30-2114(5)(a) and 15-30-2101(10)):
federal gross income excluding unemployment compensation, counting only
the IRC 86 taxable part of Social Security on the dependent's own income,
and flooring long- and short-term gains separately instead of netting.
Also count a permanently and totally disabled adult child as a qualifying
child, count New Mexico capital gain distributions, and fix docs and tests
from the review.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
AR conflict: kept main's 2016-2018 unemployment cases and the PR's partnership/S-corp case in ar_gross_income_indiv.yaml, and added partnership_s_corp_income to main's new 2015-01-01 gross income source blocks.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
With one spouse's loss now offsetting the other's income, the summed
ar_agi_joint can be negative. Main's medical, casualty loss and
miscellaneous joint deductions multiply that total by their AGI floor rate,
so a negative total enlarged each deduction beyond the expense. Floor the
total at zero, as the federal deductions do with positive_agi.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
For married filing separately, pool both spouses' gains and losses
through the marital unit, apply the joint-return cap and floor, and give
each spouse half (NMSA 7-2-34(B)), with the share as a new parameter.
Other filing statuses are unchanged.

Closes #9679

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
Resolve the Arkansas gross income source lists against main's estate,
Schedule F and gambling income additions, keeping this branch's
partnership and S-corporation income on the same form line as estate
income, and keep both sides' gross income tests.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
@hua7450

hua7450 commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

Waiting for #9585 to merge first, then I’ll approve this one.

DTrim99 and others added 10 commits October 12, 2026 14:06
… return

mt_agi_joint pooled every tax unit member's Montana additions and
subtractions, but a dependent's federal AGI is not on the filer's return
(adjusted_gross_income_person is zero for dependents). A dependent's
subtraction, such as unemployment compensation, therefore lowered the
filer's Montana AGI and, since main's #9903, the joint standard
deduction. Pool additions and subtractions over the head and spouse only.

The adult-dependent exemption case had pinned the leaked AGI of 47,000;
under the law the filer's Montana AGI is 50,000 and the tax is 1,731.65.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
Resolve the Arkansas gross income source lists against main's estate,
Schedule F and gambling income additions, keeping partnership and
S-corporation income on the same form line as estate income, and keep
both sides' gross income tests.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
…plit

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
Keep both the joint negative-AGI medical deduction case and main's
self-employed premium case (#10055).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
…plit

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
Main's code-health test pins the AR1000F line for every Arkansas gross
income source. Partnership and S-corporation income is reported with
Schedule E income: line 18 for 2015-2017 and line 19 from 2018.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
…plit

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
…ncome

mt_dependent_gross_income recomputed taxable Social Security itself and
floored every income component at zero before forming provisional income,
so a dependent's capital loss never lowered taxable Social Security. A 2022
dependent with $26,000 of unemployment compensation, $10,000 of Social
Security and a $3,000 long-term loss got $3,000 of Montana gross income and
no exemption, instead of $1,500 and the $2,710 exemption.

MCA 15-30-2101(10) defines Montana gross income as IRC 61 gross income
excluding unemployment compensation, and the 2021-2023 Form 2 instructions
name no other difference. Since #9691 the federal dependent_gross_income
counts gains but not losses and only the IRC 86 taxable part of Social
Security, figured on the dependent's own modified AGI (which nets capital
losses, subtracts the dependent's adjustments and uses the $0 base for a
dependent living with a spouse). Montana gross income is now that amount
minus the dependent's unemployment compensation, which removes the
duplicated IRC 86 code and its approximations.

Adds the capital-loss case to both MT dependent test files and drops a test
comment that described the pre-#9691 federal treatment of Social Security.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
…plit

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
#9585 landed as a squash commit; keep this branch's New Mexico deduction
and tests, which build the separate-filer split on top of it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
@codecov

codecov Bot commented Oct 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (909176a) to head (fec9b03).
⚠️ Report is 457 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #9689   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         1    -3     
  Lines           76        30   -46     
  Branches         2         0    -2     
=========================================
- Hits            76        30   -46     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

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.

@hua7450
hua7450 merged commit 48755dc into main Oct 13, 2026
28 checks passed
@hua7450
hua7450 deleted the nm-mfs-capital-gains-split branch October 13, 2026 20:02
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.

New Mexico net capital gains deduction: each MFS spouse should take half of the deduction computed on combined joint-return gains (7-2-34(B))

2 participants