Repository navigation
Conversation
Contributor
Author
|
Overlap with #9898, which fixes the Maryland capital gains surtax base. It changes
|
This was referenced Oct 7, 2026
This was referenced Oct 8, 2026
MaxGhenis
force-pushed
the
dependent-capital-income-state-lines
branch
2 times, most recently
from
October 12, 2026 11:55
7e433ee to
b195db5
Compare
…turn A tax unit dependent's interest, dividends and capital gains are on the dependent's own return, and federal adjusted gross income (irs_gross_income) leaves them out. State lines that adjust the filers' federal AGI or taxable income summed them over every member, so a child's dividends, gains or interest moved the parents' state tax. Count only the head and spouse (tax_unit_non_dep_add, or a dependent mask on per-person lines) in AZ, DC, DE, IA, IL, MA, MD, ME, MN, MT, ND, NH, OH, PA, SC, UT, VA, VT, WA, WI and WV, and in us_govt_interest, which most states subtract. In formulas edited anyway: North Dakota's net long-term capital gain exclusion is floored at zero and includes capital gain distributions (Form ND-1 line 6 worksheet); Utah's retirement credit counts only the head and spouse as claimants; the West Virginia low-income family credit cites W. Va. Code 11-21-22a(d). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…UT cases The Montana and Utah Social Security credit cases now carry the exact half-cent amounts (1,765.725, 1,847.725 and 259.475) instead of values rounded past the 0.001 margin. In two existing Utah retirement credit cases person2 (age 64) is a tax unit dependent, so their tax-exempt interest is on their own return and no longer enters the modified AGI: 750 instead of 737.5, and 675 instead of 662.5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… Missouri lines From the independent review of the first commit: - Alabama AGI sums every member's interest, so it now also subtracts dependents_us_govt_interest (new, next to us_govt_interest, for state income definitions that count dependents' income). Without it the filer-only us_govt_interest left a dependent's U.S. government interest taxed (parent wages 100,000, child 5,000 of Treasury interest: AL AGI 105,000 instead of 100,000). - Virginia's National Guard subtraction leaves a dependent's pay out of both the cap and the per-person shares, so the filer keeps the full amount. - Michigan's senior interest, dividends and capital gains deduction counts only the head's and spouse's income (MCL 206.30(1)(p): "included in adjusted gross income"). - Missouri's capital gains subtraction takes a dependent's gains out of net_capital_gains, and its per-person split allocates among the head and spouse only. The Utah retirement credit case with SINGLE status now names its roles (one head, two dependents), and the property test drops the Vermont restriction now that #9855 is on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e lines From the second independent review: - Iowa's reportable Social Security worksheet adds one-half of the benefits (line 2) before the base amount, as both the 2021 and 2022 IA 1040 worksheets do. The first test's 4,000 came from the formula; the worksheet gives 14,000. - Missouri subtracts the filers' positive Form 1040 line 7a (filer_loss_limited_net_capital_gains), so capital gain distributions count, a loss nets against them, and a supplied tax unit amount less the dependents' gains is kept and goes to the head. - Vermont's percentage exclusion limits eligible gains to the filers' net gain (Schedule IN-153 line 15 starts from Part I line 4). The eligible gains input is now documented as part of long_term_capital_gains, and two cases that set it alone now set both. - California's young child tax credit measures the filers' own net loss, so a child's capital loss no longer takes the parent's credit. - Virginia caps National Guard pay per person (Va. Code 58.1-322.02(8), "received by any person"), so two qualifying spouses subtract up to $5,500 each. 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>
…E and MT lines From the third independent review: - Vermont's percentage exclusion nets eligible gains against Schedule IN-153 Part I line 4 built from the filers' Schedule D lines 15, 16, 18 and 19, before the Form 4952 election, then takes off the election's share on gains (lines 5-7 and 16: line 4g x 4e / (4b + 4e)). A 100,000 eligible gain with 100,000 of qualified dividends and a 100,000 election now gives 20,000, as the form does. - Virginia's Guard subtraction defaults to each filer's capped pay summed, and the per-person split shares the unit amount by capped pay, so a supplied unit amount (such as the 39-day limit) is allocated again. - New filer_loss_limited_net_capital_gains_person allocates the filers' loss-limited gains among the head and spouse only. Georgia's retirement exclusion and Delaware's pension exclusion use it, so a dependent's loss no longer reduces an eligible filer's gains (IT-511: "Income or losses should be allocated to the person who owns the item"). - Montana's separate-return AGI no longer adds a dependent's Montana amounts to the head's, as the joint branch already leaves them out; the two cases that expected that allocation now expect the head's own amounts. - The Montana Social Security worksheet cases use wages instead of a pension, whose Montana exemption the worksheet does not apply. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
force-pushed
the
dependent-capital-income-state-lines
branch
from
October 12, 2026 12:57
a0c05af to
fa64576
Compare
MaxGhenis
added a commit
that referenced
this pull request
Oct 13, 2026
…gelog - ca_agi_subtractions: tax-unit-level items such as us_govt_interest are added as they are (#9894 makes that one filer-only). - WI Schedule SB worksheet is on file page 3 in 2021 and page 2 in 2022; the RI reference is the individual 2022 Schedule M, not the RI-1041's. - The changelog also names California's state tax refund subtraction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
irs_gross_incomemultiplies every income source by~is_tax_unit_dependent, so a tax unit dependent's interest, dividends and capital gains never enter the filer's federal AGI or taxable income. The dependent reports them on their own return (2025 Form 8814, line 4; the model does not implement the Form 8814 election, 26 U.S.C. 1(g)(7)).Many state lines that adjust the filers' federal AGI or taxable income summed a capital-income input over every tax unit member (
add(tax_unit, ...)oradds = [...]). So a child's dividends, gains or interest moved the parents' state tax.The two reported cases, on
main:mainnd_qdiv_subtractionvt_percentage_capital_gains_exclusionvt_capital_gains_exclusionvt_income_tax(federal AGI 160,000 in every column)How the leaks were found
Static scan. Every
add,aggrandadds/subtractsaggregator over a tax unit invariables/gov/states, with parameter-driven source lists resolved over all their dated values. 50 tax-unit sums include a person-level capital-income input. Child-care and TANFspm_unitsums count family income by design and are out of scope.Household sweep (every state, TY2021–2026). Five filer profiles: single worker at 60,000, a 70-year-old with Social Security and a pension, a 400,000 earner, an 82-year-old, and a 22,000 earner. Each has a dependent child aged 15 with 50,000 (300,000 for long-term gains) of one input:
The sweep compares the filer's
state_income_taxwith and without the child's income, alongside federal AGI and federal tax. It ran on Use the filers' Schedule D for the tax on net capital gain #9855's head so the federal Schedule D leak Use the filers' Schedule D for the tax on net capital gain #9855 fixes stays out. A drill-down then listed every state variable that moved. Every change below was found this way. The same sweep, re-run on Use the filers' Schedule D for the tax on net capital gain #9855's head plus this PR, leaves only the cases under "Not in this PR".What changes
All fixes count only the head and spouse, using
tax_unit_non_dep_addfor tax-unit sums and a dependent mask for per-person lines.us_govt_interest, which most states subtract. It wasadds = ["us_govt_interest_person"]over every member; tax-unit lists (incl. #9699's) add it as is. In the sweep a dependent's U.S. government interest moved the filer's tax in 38 states; after this PR it moves none except AL and IA before 2023 (structural), KY (#9699), and the MN, NM and OK credit paths under "Not in this PR".va_subtractions(whole list) andva_subtractions_person(dependents get none). The list's other person items are already head/spouse-masked or AGI-prorated; a dependent's unemployment, railroad benefits and state tax refunds also stop being subtracted.dc_income_subtractions,de_subtractions,oh_deductions(per-person, summed into the filers' state AGI). Only the dependent's U.S. government interest is dropped; see "Not in this PR".nd_qdiv_subtraction,nd_ltcg_subtractionvt_percentage_capital_gains_exclusion,vt_additionsaz_long_term_capital_gains_subtractionsc_net_capital_gain_deductionwi_capital_gain_loss_subtraction,wi_capital_loss,wi_additionsmd_capital_gains_surtaxwa_capital_gains_tax,wa_millionaires_tax_base_incomemt_capital_gains_tax_joint,..._applicable_threshold_joint,mt_regular_income_tax_joint,mt_capital_gain_credit,mt_interest_exemption_person,mt_agi_joint,mt_taxable_social_security_jointma_part_a_gross_income,ma_part_a_agi,ma_part_c_gross_income, the four Part A dividend and exemption lines, the bank interest exemptionil_base_income_additionsnh_taxable_incomeia_reportable_social_securitymn_social_security_subtractionut_ss_benefits_credit_max,ut_retirement_credit_max,ut_ctc_potentialwv_low_income_family_tax_credit_agime_sales_and_property_tax_fairness_credit_incomepa_eligibility_incomeWhere one of these formulas also summed a dependent's other amounts on the same line, they get the same rule:
Three fixes in formulas edited anyway:
nd_ltcg_subtractionfloors at zero and includes capital gain distributions. The Form ND-1 line 6 worksheet says "If zero or less, stop here; no exclusion is allowed", and puts distributions without Schedule D on line 3. Before, a filer's net long-term loss made a negative subtraction.ut_retirement_credit_maxcounts only the head and spouse as claimants. An elderly dependent no longer adds a credit.wv_low_income_family_tax_credit_aginow cites W. Va. Code 11-21-22a(d), the definition it implements, instead of 11-21-12(b).Legal basis
Each line adjusts the individual's own federal AGI or taxable income, or the claimant's and spouse's own income. I read these sources this session:
~/reviews/pe-us-dep-capital-income-2026-10-06/legal_out.md.Not in this PR
eitc_relevant_investment_incomecounts a dependent's investment income. That moves the federal EITC, every state EITC, and MN's Child and Working Families Credits (viaeitc_investment_income_eligible) and NM's eligibility (follow-up chip).nm_net_capital_gains_deductionhas the same pooling. Split the New Mexico net capital gains deduction between separate filers #9689, Fix AR, MT and NM income tax gaps found in TAXSIM comparison sweep #9585 and Require Arkansas joint filing with a negative spouse income and use tax table bands #9696 all rewrite the file, so it waits for them (follow-up chip).us_govt_interest.Tests
main.policyengine_us/tests/core/test_dependent_capital_income_state_tax_invariants.py(Hypothesis, 5 derandomized examples of 10–30 ND and VT tax units, each run with and without its dependents' capital income).nd_income_tax,vt_income_tax, federal AGI and federal taxable income match between the twins.nd_qdiv_subtraction,nd_ltcg_subtraction(with its zero floor and distributions),vt_percentage_capital_gains_exclusion,vt_additionsandus_govt_interestequal an independent reference over the filers' own amounts.mainHypothesis shrinks to a dependent with $1 of qualified dividends, giving a filer subtraction of $0.40.vt_capital_gains_exclusionreads the federal adjusted net capital gain.coregroup already pays; 1.27 GB peak footprint.heavy_run.shlock): 132 targeted YAML files, covering every file that names a changed variable, plus the touched states' integration tests and allus_govt_interesttests. Queued for the shared heavy lock; results will be added here.Microsim impact
Pending: a real 2026 microsimulation on the default dataset, base
1da311383bagainst this PR (9ea8aac872), is queued underlockrun.sh. Results will be added here.Invariants
For every tax unit, and any capital income its dependents have, as checked by the property test, the YAML twins and the sweep:
tax_unit_non_dep_addequalsaddwhen no member is a dependent.axiom: TheAxiomFoundation/rulespec-us#1424 queued (extended with the state capital-income cases: TheAxiomFoundation/rulespec-us#1424 (comment)).
us-nd:policies/income_tax/resident_core_liability_pipeline(N.D.C.C. 57-38-30.3(2)(d); inputsnd_pit_2026_federal_net_long_term_capital_gainandnd_pit_2026_allocated_qualified_dividends_taxed_below_regular_rates; companion testfederal capital loss offset precedes north dakota allocation cap).us-wa:statutes/82/82.87/82/87/040#washington_capital_gains_excise_tax(entityPerson).us-vt:policies/income_tax/pilot_liability_pipelinetakes completed normal tax.🤖 Generated with Claude Code