Repository navigation
Subtract section 199A net capital gain, not adjusted net capital gain, in the QBI income limit - #9886
Conversation
qualified_business_income_deduction summed every member's qbid_amount, and qbid_amount netted losses and the 199A(i) minimum over every member, so a dependent's Schedule C income raised the filer's deduction and a dependent's loss cut it. Under 26 USC 199A(a) the deduction is the taxpayer's, from their own (and a joint spouse's) qualified business income; a dependent takes their own deduction on their own return. - qualified_business_income_deduction sums qbid_amount, and the 199A(i) minimum's eligible QBI, over the head and spouse. - qbid_amount nets the head's and spouse's losses together; a dependent's businesses are netted alone for the dependent's return. - qualified_business_income_deduction_person shares the deduction between the head and spouse only. - ia_qbi_deduction takes each spouse's share of the federal deduction; it gave every member with a positive qbid_amount the whole tax unit's deduction, a dependent included. - mo_business_income_deduction counts the head's and spouse's business income only (Mo. Rev. Stat. 143.022: "such individual's business income"). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- qualified_business_income_deduction_person shares a deduction that comes only from the 199A(i) minimum (every per-person amount zero) in proportion to the spouses' positive QBI, or to the head, so the shares always sum to the deduction and Iowa no longer drops it. - Tests assert the per-person shares rather than a dependent's qbid_amount, which is figured on the filer's taxable income. - The Iowa case checks ia_taxable_income_joint (main: 59,500, taking the 13,500 deduction three times; branch: 88,000). - The property test drops its vacuous bound and the has_amounts carve-out, and says which checks recompute the aggregation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
26 USC 199A(a)(2)(B) limits the deduction to 20% of taxable income over net capital gain, which Treas. Reg. 1.199A-1(b)(3) defines as section 1222(11) net capital gain plus qualified dividends (Form 8995 line 12, Form 8995-A line 34). The model subtracted adjusted_net_capital_gain, which drops unrecaptured section 1250 gain and 28-percent rate gain, so the limit was too high whenever a filer had either. section_199a_net_capital_gain (new) is the smaller of Schedule D lines 15 and 16 (floored at zero) plus nonnegative qualified dividends, over the head and spouse only, and is not reduced by a Form 4952 election (unlike net_capital_gain, #9781). Replays the hub's stalled draft (wip/hub-backup/qbid-net-capital-gain, 739df63) on top of #9866 and masks dependents before netting, per the hub spec D1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review r1 (P3): a negative dividend input adds nothing, and spouses' dividends are summed before the zero floor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hand-off to the US + core hub. Head Stacked on #9866. The base branch is Review (hub rule: hard tier, Codex), in
Passed locally:
Microsim, against #9866's head, so this impact is separate:
Axiom: TheAxiomFoundation/rulespec-us#1515, queued ( Cleanup for the hub: this PR supersedes the stalled draft worktree Dependencies: #9866. |
# Conflicts: # policyengine_us/variables/gov/irs/income/taxable_income/deductions/qualified_business_income_deduction/qualified_business_income_deduction.py
|
US + core hub sweep audit (2026-10-07): squash-merged #9886 as Reviewed head: |
Stacked on #9866 (base branch
fix-qbid-exclude-dependents). Retarget tomainonce #9866 merges. The hub's spec is D1 in~/reviews/us-hub/specs/D1-qbid.md. This replays the stalled draftwip/hub-backup/qbid-net-capital-gain--qbid-net-capital-gain(739df634d8) on top of #9866 and adds the spec's fixes.The QBI deduction's income limit subtracted
adjusted_net_capital_gain. That measure drops unrecaptured section 1250 gain and 28-percent rate gain, so the limit was too high whenever a filer had either. For example, a filer with 100,000 of taxable income and 40,000 of gain that is all section 1250 gain got 18,000 instead of 12,000.The law
The change
section_199a_net_capital_gain(new, TaxUnit) is max(0, min(Schedule D line 15, line 16)) plus nonnegative qualified dividends.net_capital_gain, which Apply the Form 4952 election in Schedule D Tax Worksheet lines 3-10 #9781 reduces for the Form 4952 election.adjusted_net_capital_gain.qualified_business_income_deductionsubtracts it in the income limit, and its citation is corrected to §199A(a)(2)(B).Tests
section_199a_net_capital_gain.yaml, plus four income-limit cases (section 1250 gain, 28-percent gain, the Form 4952 election, and a self-employed seller of depreciated rental property). The existing fixtures move fromadjusted_net_capital_gainto the new input.tests/core/test_section_199a_net_capital_gain_invariants.pyruns Hypothesis batches for 2025 and 2026: single filers and couples, with and without a dependent, random signed gains, distributions, dividends, section 1250 and collectibles gain, and elections.bab1a47c60) and on Keep dependents' business income off the filer's QBI deduction #9866's head (97041ee816), and pass here. For example: 1250 gain, 18,000 vs 12,000; collectibles, 28,000 vs 18,000; election, 12,000 vs 8,000; the child's gains, 0 vs 13,000; the child's loss, 19,000 vs 11,000. All 15 income-limit and 9 helper YAML cases pass on this branch.test_batched.py --mode per-subdir --workers 1) with no partner file changed. Both ran under the shared heavy lock; logs are in~/reviews/pe-us-ms-hsa-qbid-2026-10-06/tests/.make test-other-python-rest-core), with no new jobs or runners. GitHub Actions has had every recent PR-workflow run queued, so there is no fresh Linux timing or memory report for that group to compare against.Invariants (for every input)
section_199a_net_capital_gain= max(0, min(line 15, line 16)) + max(0, qualified dividends), summed in numpy over the head's and spouse's inputs.Impact
Real microsimulations on the default dataset (
populace_us_2024.h5@populace-us-2024-spm-20260909), under the shared heavy lock (lockrun.sh,run.py,compare.pyin~/reviews/pe-us-merge-backlog-2026-10-02/impact/), compared record by record; enum arrays are not compared. Base: #9866's head97041ee816, so this impact is this PR's alone. Branch model code06c35c6b63(later commits only add YAML). Outputs:~/reviews/pe-us-ms-hsa-qbid-2026-10-06/microsim/.Why the deduction rises. Every unit whose deduction rises has gains that belong to its dependents.
section_199a_net_capital_gainis below bothadjusted_net_capital_gainandnet_capital_gainin all 17 of them, and both of those sum every member's gains. For example, one unit'sadjusted_net_capital_gainwas 156,376 and its filers' own gain is 0. Main subtracted dependents' gains from a taxable income that excludes them, which shrank the filer's limit.Why the deduction falls. Units whose deduction falls keep section 1250 or collectibles gain in the subtraction.
Prevalence in the 2024 dataset.
unrecaptured_section_1250_gain: nonzero in 737 tax-unit records.long_term_capital_gains_on_collectibles: 63 person records.investment_income_elected_form_4952: 135 person records.The limit binds for few of these units, so the section 1250, 28% and election parts move only 10 records.
Axiom
axiom: TheAxiomFoundation/rulespec-us#1515 queued
rulespec-us's limit already keeps section 1250 and 28-percent gain, but its
us:statutes/26/1/h#net_capital_gainis reduced by the §163(d)(4)(B)(iii) election. Treas. Reg. 1.199A-1 is not in the pinned corpus, which blocks the signed encoder. The issue records both readings and asks Axiom to follow the regulation, or to record a ruling for the statutory reading.🤖 Generated with Claude Code