Skip to content

dependent_gross_income counts total Social Security and nets capital losses in the IRC 152(d)(1)(B) test #9678

Closed

Description

@DTrim99

Problem

dependent_gross_income (policyengine_us/variables/gov/irs/income/dependent_gross_income.py) feeds the qualifying-relative gross income test in is_qualifying_relative_dependent (IRC 152(d)(1)(B)). That test, in turn, drives head-of-household eligibility and filing status. The variable differs from IRC 61 gross income in two ways:

  1. Social Security. It replaces taxable_social_security with total social_security (the CIRCULAR_SOURCES map). Only the IRC 86 taxable part is gross income, and a dependent whose provisional income is below the base amount has none.
  2. Capital losses. It floors the netted capital_gains source. Gross income includes gains but not losses, so long-term and short-term gains should each be floored at zero before they are added.

Evidence

  • IRS Pub. 501 (2022), p. 2: no Social Security is gross income "unless ... one-half of your social security benefits plus your other gross income and any tax-exempt interest is more than $25,000", and "Gross income includes gains, but not losses".
  • Pub. 501 (2022), p. 19: the qualifying-relative gross income test counts "taxable social security benefits".
  • 26 USC 86 and 26 USC 152(d)(1)(B).
  • Example (2022, model-verified while fixing Fix AR, MT and NM income tax gaps found in TAXSIM comparison sweep #9585): the tax-unit head has $50,000 of wages and a dependent parent aged 70 with $12,000 of Social Security and no other income. Provisional income is 0.5 × 12,000 = $6,000, below $25,000, so the parent's gross income is $0, below the $4,400 limit. The parent is therefore a qualifying relative, and the model would then file the head as head of household, as it does when the same parent has $3,000 of unemployment compensation instead. The model counts all $12,000, fails the parent, and files the head as single.
  • The capital-loss netting affects results only when the netted amount is below the limit and the gross amount is above it. For example, $5,000 of long-term gains and a $2,000 short-term loss net to $3,000 but give $5,000 of gross income. This example is illustrative and was not run.

Proposed fix

Mirror the Montana measure added in #9585 (mt_dependent_gross_income):

  • Split the capital_gains source into long_term_capital_gains and short_term_capital_gains, each floored at zero.
  • Replace total Social Security with the IRC 86 taxable part, computed on the dependent's own income. Use provisional income = other gross income + unemployment compensation + tax-exempt interest + combined_income_ss_fraction × benefits, with the single base amounts. This avoids the filing_status cycle that CIRCULAR_SOURCES works around.

After that, mt_dependent_gross_income could reuse the federal measure, excluding only unemployment compensation. Expect changes in head-of-household and qualifying-relative test outputs, and re-check partner contract tests before changing any expected values.

Found while fixing #9585.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH

Activity

  1. added a commit that references this issue on Oct 2, 2026
    c8a0a2c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions