Skip to content

Apply the unearned income filing test only to filers who can be claimed as dependents - #10135

Open
MaxGhenis wants to merge 6 commits into
mainfrom
fix-filing-requirement-dependents
Open

MaxGhenis wants to merge 6 commits into
mainfrom
fix-filing-requirement-dependents

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

What is wrong on main

tax_unit_is_required_to_file (main at 065d0e9560) ends with an unearned income test that it applies to every tax unit:

# (a)(1)(C) - unearned income threshold for dependents
unearned_income_threshold = 500 + tax_unit("additional_standard_deduction", period)
unearned_income = gross_income - add(tax_unit, period, ["earned_income"]) - section_911_exclusion
  1. It applies to filers nobody can claim. The comment says "for dependents", but nothing checks that. A single filer nobody can claim, with $600 of interest and nothing else, is returned as required to file. So is a 70-year-old with $3,000 of interest.
  2. $500 is the unindexed statutory amount. The amount in effect under section 63(c)(5)(A) is $1,300 for 2024 and $1,350 for 2025 and 2026. It is already the parameter gov.irs.deductions.standard.dependent.amount.
  3. Unearned income is computed wrongly. It is gross income less earned_income summed over every member. Gross income counts only the head and spouse and floors each source at zero, but earned_income is net of losses and includes dependents. So a $10,000 self-employment loss counts as $10,000 of unearned income.
  4. The age and blindness addition belongs to the tax unit, not the person. On a joint return the claimed spouse's threshold rises with the other spouse's age.

Reported as "P2, pre-existing" by the independent review of #10022.

What the law requires

2018 to 2025: 26 U.S.C. 6012(f)

every individual who has gross income for the taxable year shall be required to make returns ... except that a return shall not be required of— (1) an individual who is not married ... and who has gross income for the taxable year which does not exceed the standard deduction applicable to such individual ..., or (2) an individual entitled to make a joint return if— (A) the gross income of such individual, when combined with the gross income of such individual's spouse ... does not exceed the standard deduction which would be applicable ... if such individual and such individual's spouse made a joint return, (B) ... same household ..., (C) such individual's spouse does not make a separate return, and (D) neither such individual nor such individual's spouse is an individual described in section 63(c)(5) who has income (other than earned income) in excess of the amount in effect under section 63(c)(5)(A).

The standard deduction of an individual described in section 63(c)(5) (one "with respect to whom a deduction under section 151 is allowable to another taxpayer") is limited. Its basic standard deduction "shall not exceed the greater of— (A) $500, or (B) the sum of $250 and such individual's earned income", indexed under 63(c)(4) to $1,350 and $450 for 2025 (Rev. Proc. 2024-40 §2.15(2)). The additional standard deduction for age and blindness is added on top.

  • A filer nobody can claim: gross income only. Unmarried: over the standard deduction. Joint: combined gross income over the joint standard deduction. Married filing separately: any gross income. There is no unearned income test.
  • An unmarried filer who can be claimed: gross income over the limited standard deduction. There is no separate unearned income test in (f)(1).
  • A joint return where a spouse can be claimed: the gross income test, plus (f)(2)(D): that spouse's own income other than earned income over the section 63(c)(5)(A) amount.

2026 on: 26 U.S.C. 6012(a)(1)

Subsection (f) covers only "a taxable year beginning after December 31, 2017, and before January 1, 2026". Pub. L. 119-21 does not amend section 6012: the word does not occur in the enrolled text. Its §70102 and §70103 made the larger standard deduction (63(c)(7)) and the zero exemption amount (151(d)(5)) permanent. So from 2026 the rule is (a)(1), with an exemption amount of zero. (A) excuses an individual whose gross income is "less than" the basic standard deduction, raised under (B) for age 65. Then:

(C) The exception under subparagraph (A) shall not apply to any individual— (i) who is described in section 63(c)(5) and who has— (I) income (other than earned income) in excess of the sum of the amount in effect under section 63(c)(5)(A) plus the additional standard deduction (if any) to which the individual is entitled, or (II) total gross income in excess of the standard deduction, or (ii) for whom the standard deduction is zero under section 63(c)(6).

IRS charts

Publication 501 (2025), Table 2 and Chart B of the 2025 Form 1040 instructions, for single dependents under 65 and not blind, say a return is due if any of these applies:

  1. Your unearned income was more than $1,350.
  2. Your earned income was more than $15,750.
  3. Your gross income was more than the larger of: a. $1,350, or b. Your earned income (up to $15,300) plus $450.

If 65 or older or blind, the amounts are $3,350 ($5,350 if both), $17,750 ($19,750), and $3,350 ($5,350) or earned income plus $2,450 ($4,450). For married dependents 65 or older or blind, the unearned income test is "more than $2,950 ($4,550 if 65 or older and blind)". Chart A, for everyone else, has a gross income test only. The 2024 charts (page 10) have the same form with $1,300, $14,600 and $450.

For an unmarried filer, tests 1 and 2 never decide anything on their own: each implies test 3. The limited standard deduction is at least $1,350 plus the additions, and, up to the regular amount, at least earned income plus $450. So the existing comparison of gross income with standard_deduction already gives Chart B's answer: basic_standard_deduction applies the section 63(c)(5) limit when the head can be claimed. The unearned income test changes the result only on a joint return where a spouse can be claimed.

Fix

  • The unearned income test applies only to the head, and on a joint return each spouse, who can be claimed on another return (head_is_dependent_elsewhere, spouse_is_dependent_elsewhere). No new input.
  • The amount is the existing section 63(c)(5)(A) parameter gov.irs.deductions.standard.dependent.amount, plus that person's own additional standard deduction (is_irs_aged and is_blind times aged_or_blind.amount for the filing status).
  • Unearned income is that person's gross income from every source in gov.irs.gross_income.sources except the earned income sources, each floored at zero as in irs_gross_income. The earned sources are a new parameter, gov.irs.income.filing_requirement.dependent.earned_income_sources: wages, business income and farm income. That is Form 1040 line 1z and Schedule 1 lines 3 and 6, the earned income of the IRS dependent worksheet (2025 instructions, page 35). Schedule 1 line 5 (rents, royalties, partnerships, S corporations, trusts) is not on that list, so partnership income counts as unearned here, as it is outside earned_income on main. A general partner's earnings for services can be earned income (Publication 501). The model's inputs do not separate them, so a claimed spouse whose only income is such earnings can trip the unearned income leg; that needs a separate input.
  • The earned and gross income legs of Chart B need no new code (see above). The formula comments say so, and the tests check it against Table 2's own numbers.

Nothing else changes: the gross income test, the section 911 add-back (#10022) and the standard deduction are untouched.

Where the statute and the charts differ (decision d1395)

The fix keeps three readings that main already used, and queues them for Max as d1395. No test asserts anything that depends on them.

  • Age and blindness in the 2018–2025 joint test. §6012(f)(2)(D) uses the section 63(c)(5)(A) amount alone. Chart B adds the additional standard deduction ($2,950 for a married dependent 65 or older). The fix follows Chart B, as main did (main added the tax unit's additional standard deduction). It matters only for a claimed spouse who is 65 or older or blind and files jointly. Section 152(b)(2) bars a dependent who files a joint return; Publication 501 excepts a joint return filed only to claim a refund.

  • 2026 for claimable filers who are blind, and the exact dollar. Read literally, (a)(1)(A)–(B) leave blindness out of the threshold and require a return at exactly the threshold ("less than"). The 2017 Chart B, the last under the same text (page 9), includes blindness and says "more than". The model's gross test uses > and the standard deduction with blindness, for every year, and this PR does not change that. The 2026 instructions will show the IRS reading.

  • A claimable filer who is married and files separately. Chart B (married dependents) requires a return only if the spouse itemizes or one of the $1,350, $15,750 or earned-income-plus-$450 tests is met. Section 6012(f) and (a)(1) give such a filer no exception, so any gross income requires a return. The model follows the statute here, as main does.

Also open, and handed to the 2026 PR (#10137): from 2026, §6012(a)(1)(A)(iv)'s joint exception "shall not apply if ... any other taxpayer is entitled to an exemption for such spouse under section 151(c)".

Out of scope and proposed as a separate session (now #10137): from 2026, filers nobody can claim face (a)(1)(A)–(B), whose thresholds leave out blindness and use "less than". The model applies the 2025 rule in every year.

Tests

  • tax_unit_is_required_to_file_dependents.yaml: 49 cases, 2024, 2025 and 2026. They cover non-dependents with small unearned income, a dependent a dollar under and over each Chart B leg, the 65-or-older and blind additions (single and joint), the $15,300 earned income cap, a self-employment loss, a claimed spouse's farm profit (earned income), a child's income in the tax unit, and the claimed spouse on a joint return. 19 of the 49 fail on main (065d0e9560).
  • tests/core/test_filing_requirement_dependent_invariants.py: a boundary grid at every Table 2 threshold, Hypothesis properties, and one pinned exception. Invariants below.
  • Unchanged and passing on this branch: tax_unit_is_filer.yaml (both), eitc_filer_gate.yaml, section_911_state_eitc.yaml and medicaid_person_is_required_to_file.yaml.

Invariants (each executed)

  1. Differential with Table 2. For a single filer who can be claimed and has wages and interest, the result equals Table 2's three tests, computed directly from its published 2025 amounts. Checked on a grid at every threshold, a dollar under and over, for each combination of age 65 and blindness.
  2. Differential with Medicaid (2025). The same result equals medicaid_person_is_required_to_file, the other Table 2 implementation on main. It is not compared in 2026, where the §6012(a)(1) treatment of blindness and the exact dollar is open (d1395).
  3. Split invariance. For a tax unit nobody can claim, the result depends on gross income only: moving income between wages and interest never changes it (2025 and 2026).
  4. Joint differential (2025). On a joint return where the claimable spouse is under 65, not blind and has interest only, the result is the unearned income test (over $1,350), whatever the other spouse's age and blindness.
  5. Monotonicity. More wages, interest, dividends or self-employment profit never turns "required" into "not required", for any tax unit, in 2025 or 2026.
  6. Claimability never removes a requirement (filers who are not blind and do not file separately; both are d1395 points).
  7. A tax unit dependent's income never changes the result.
  8. Lower bound (2025). On a single, separate or joint return, a claimable head or spouse whose interest and dividends exceed Table 2's unearned income amount always makes the return required. Table 2's amount is never below the statute's, so this holds under either reading of d1395.
  9. Earned income sources. Every source in the new parameter is a gross income source, so a renamed earned source cannot silently become unearned.

Every Hypothesis batch starts with a unit that must file and one that need not; each property asserts that it has rows to check, and the batch asserts that it holds both answers.

Intended exception (pinned): a smaller self-employment loss can end the requirement for a claimable filer. A loss does not reduce gross income (Chart A: "don't reduce your income by any losses"), but it does reduce the earned income that sets the limited standard deduction.

Mutation check (at a9e58977ff; logs in ~/reviews/us-hub/reviews-gen/us-10135/mutation-r2.txt on the hub host). Each mutant of the formula ran against both test files:

Mutant Python (4 tests) YAML (48 cases at the time)
main's formula (065d0e9560) 2 fail 19 fail
no claimability check 2 fail 3 fail
no unearned income test 2 fail 2 fail
no age or blindness addition 2 fail 6 fail
the tax unit's addition instead of the person's 2 fail 1 fail
unearned = person's gross less earned income pass 1 fail (self-employment loss case)
test every member when the head or spouse can be claimed 1 fail 1 fail
hard-coded $500 2 fail 11 fail
>= instead of > 1 fail 7 fail
spouse never tested 2 fail 2 fail
farm income left out of the earned sources (checked later) not run 1 fail (farm case; 49 cases)

Every mutant fails at least one test.

Merges with open PRs

CI cost

The new Python file runs in the core group of the rest Python tests. Locally (macOS, shared host at load 150 to 250), its four tests take 10.4 s inside pytest and 29.8 s wall time including the model import, with a peak memory footprint of 1.08 GB. These are not Linux CI measurements.

Impact

Real microsimulations of the default dataset (hf://datasets/policyengine/populace-us/populace_us_2024.h5@populace-us-2024-spm-20260909), policyengine-core 3.32.15, one run per side and year under the shared heavy-job lock; weighted sums. Run outputs and record-by-record comparisons are on the hub host in ~/reviews/us-hub/fixes/10135-impact/ and ~/reviews/us-hub/fixes/aca-ptc-take-up-impact/.

This PR alone: main 065d0e9560 (policyengine-us 2.39.0) against this PR's formula

Output 2025 baseline 2025 reform 2025 change 2026 baseline 2026 reform 2026 change
Tax units required to file 135.52M units 127.69M units −7.83M units 137.83M units 129.81M units −8.02M units
Tax units filing 159.26M units 157.63M units −1.63M units 160.51M units 158.84M units −1.67M units
EITC $68.99bn $68.99bn 0 $70.09bn $70.09bn 0
Federal income tax $2,419.53bn $2,419.53bn 0 $2,593.32bn $2,593.32bn 0
State income tax $548.46bn $548.46bn 0 $576.78bn $576.78bn 0
aca_ptc (entitlement) $169.31bn $168.50bn −$800.3M $144.99bn $143.78bn −$1.21bn
People eligible for Medicaid 77.356M people 77.386M people +0.030M people 76.064M people 76.094M people +0.030M people
Household net income $16,349.51bn $16,349.51bn +$0 $17,169.14bn $17,169.14bn +$1

This PR with #10140: main c09ffb4b30 (policyengine-us 2.40.0) against the two merged (f9102afc46 = 7fed1d3d27 + 00570b48b7)

Output 2025 baseline 2025 reform 2025 change 2026 baseline 2026 reform 2026 change
Tax units required to file 135.52M units 127.69M units −7.83M units 137.83M units 129.81M units −8.02M units
Tax units filing 159.26M units 157.63M units −1.63M units 160.51M units 158.84M units −1.67M units
EITC $68.99bn $68.99bn 0 $70.09bn $70.09bn 0
Federal income tax $2,419.24bn $2,419.24bn 0 $2,593.32bn $2,593.32bn 0
State income tax $548.39bn $548.39bn 0 $576.78bn $576.78bn 0
aca_ptc (entitlement) $169.31bn $168.57bn −$732.9M $144.99bn $144.00bn −$998.6M
assigned_aca_ptc (take-up weighted) $60.58bn $60.58bn −$11 $47.66bn $47.66bn +$460
used_aca_ptc $60.17bn $60.17bn −$11 $47.52bn $47.52bn +$460
California premium subsidy $0 $0 0 $75.7M $75.7M 0
Maryland Premium Assistance $0 $0 0 $626.2M $612.9M −$13.4M
New Mexico premium assistance $0 $0 0 $755.6M $755.6M −$5
People eligible for Medicaid 77.356M people 77.386M people +0.030M people 76.064M people 76.094M people +0.030M people
Household net income $16,349.96bn $16,349.96bn +$0 $17,169.14bn $17,169.14bn +$1

What the numbers show:

  • Fewer tax units are required to file: 7.8M (2025) and 8.0M (2026). These are filers nobody can claim whose unearned income was over $500 plus their additions but whose gross income is under the standard deduction. Most still file: in the dataset would_file_taxes_voluntarily is set for 86% of records. So filers fall by only 1.6M and 1.7M.
  • EITC, federal income tax and state income tax do not change. Income taxes never read tax_unit_is_filer; the one filing gate inside them is the EITC's, which already counts anyone who would file to claim the credit (eitc.py; would_file_if_eligible_for_refundable_credit is not in the dataset, so it defaults to true).
  • The premium tax credit (review P1). Alone, this PR lowers aca_ptc by $0.80bn and $1.21bn. Of that, $0.07bn and $0.22bn belongs to units that take up the credit (aca_ptc × takes_up_aca_if_eligible, computed from the same runs; assigned PTC $60.58bn → $60.51bn and $47.66bn → $47.44bn). Those units file to claim the credit, but tax_unit_is_filer has no such reason to file. Count ACA premium tax credit take-up as filing a return to claim it #10140 adds it. With both PRs the take-up-weighted and used credit change by less than $500 in total. The remaining fall in aca_ptc, $0.73bn and $1.00bn, is entitlement for 85k and 105k tax units that do not take up the credit and no longer file: Gate aca_ptc on tax_unit_is_filer (closes #7748) #8056's gate, working as designed. So does Maryland Premium Assistance's 2026 fall of $13.4M (one record, 14k tax units).
  • People eligible for Medicaid rise by 30k. A tax unit that does not file falls under Medicaid's non-filer household rules (medicaid_uses_non_filer_rules; 42 CFR 435.603(f)(3)).

Merge order: land #10140 with or before this PR, so the take-up-weighted credit never dips.

Medicaid and the filing signal (decision d1415). With #10140, a tax unit that files only to claim the premium tax credit counts as filing for the credit. For Medicaid's household rules it still counts as a non-filer: medicaid_uses_non_filer_rules reads tax_unit_is_filer. 42 CFR 435.603(f)(1) applies the tax-filer rules to someone who "expects to file". For a unit not required to file, that expectation depends on the credit, the credit depends on Medicaid, and Medicaid depends on the expectation. The review of this PR (round 2, P1) found a household that flips between them: a California couple aged 62 with a $30,000 taxable pension and a claimed adult student. On main the old $500 test makes them "required", so they are filers: a Medicaid household of three at 112.6% FPL, eligible for Medicaid, with no credit. With both PRs they are non-filers for Medicaid: a household of two at 141.8% FPL, above California's 138% limit. They take up the credit, which is a reason to file. Making the two consistent needs Medicaid computed both ways, a methodology choice queued as d1415.

In the data it moves almost nothing. Of the 1.6M (2025) and 1.7M (2026) tax units that stop counting as filers, 10,438 and 22,932 take up ACA. Their take-up-weighted credit changes by −$590 and −$134 in total. Three records a year in them, 0.43 weighted people, change Medicaid eligibility. The other Medicaid changes, about 45k people a year, are in units that stop filing and do not take up ACA. (Computed from the record-level outputs of the runs below, joined to the dataset's tax units.)

axiom: TheAxiomFoundation/rulespec-us#1696 queued

(rulespec-us encodes only §6012(f), with the section 63(c)(5) unearned income test as two free inputs that every fixture sets false, and nothing for §6012(a)(1) from 2026. The issue carries the verbatim law, required outputs, a pasteable review_finding and 14 hand-computed companion cases from the same sources as these YAML tests.)

🤖 Generated with Claude Code

MaxGhenis and others added 4 commits October 11, 2026 19:38
…ed as dependents

The federal filing requirement tested every tax unit's unearned income
against $500 plus the additional standard deduction. Under 26 U.S.C.
6012(a)(1)(C)(i)(I) and (f)(2)(D) that test applies only to an individual
described in section 63(c)(5), and the amount is the section 63(c)(5)(A)
amount for the year ($1,350 in 2025), not the unindexed $500.

- Apply the test to the head, and on a joint return each spouse, who can be
  claimed as a dependent on another return.
- Read the amount from gov.irs.deductions.standard.dependent.amount and add
  that person's own additional standard deduction for age or blindness.
- Count gross income from every source except wages and self-employment
  income, so a self-employment loss or a tax unit dependent's wages no longer
  change the filer's unearned income.

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

- Hypothesis properties: split invariance for filers nobody can claim,
  monotonicity in income, claimability never removing the requirement, and
  tax unit dependents' income never mattering.
- A boundary grid checked against Publication 501 (2025), Table 2, computed
  directly from its published amounts, and against
  medicaid_person_is_required_to_file, the other Table 2 implementation.
- Keep the YAML cases a dollar away from the two thresholds where the statute
  and the IRS charts differ at the exact dollar, and say in the formula that
  the joint return test follows Table 2.

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

When a spouse can be claimed, the Standard Deduction Worksheet for
Dependents limits the joint standard deduction, which PR #10024 adopts.
The case now isolates the per-spouse unearned income test under either
deduction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Section 6012(a)(1)(A) excuses a filer only when gross income is less than
the basic standard deduction, while Chart B says more than; the 2026
instructions are not yet out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t of tests

- Move the earned income sources of the unearned income test into
  gov.irs.income.filing_requirement.dependent.earned_income_sources, citing
  the IRS dependent worksheet, and count Schedule F farm income as earned.
  A test checks that every listed source is a gross income source.
- Stop pinning decision d1395: drop the 2025 case of a claimed spouse aged 65
  at exactly $2,950 and the case of a claimable filer filing separately,
  limit the joint grid to claimed spouses under 65 and not blind, and compare
  with medicaid_person_is_required_to_file only in 2025.
- Start every Hypothesis batch with a unit that must file and one that need
  not, and assert each property has rows to check.
- Drop the duplicate section 6012 reference entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…invariant, test farm income

- Property 7 (claimability never removes a requirement) now leaves out
  separate filers as well as blind ones: Table 2 and the statute differ for a
  claimable married dependent filing separately (decision d1395).
- Add a 2025 joint case where a claimed spouse's $2,000 of farm profit is
  earned income; dropping farm income from the earned sources fails it.
- Correct the docstring's claim about what the anchor units guarantee.

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

Copy link
Copy Markdown
Contributor Author

Hand-off to the US + core hub (session local_86926433-2987-4d6a-81c8-7f4a586fc066).

This branch has not been deployed

No deployments
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