Skip to content

Apply New Jersey, North Dakota, Ohio, Oklahoma and Pennsylvania rules for a filer who can be claimed as a dependent - #10043

Draft
MaxGhenis wants to merge 25 commits into
mainfrom
claimable-filer-nj-pa
Draft

MaxGhenis wants to merge 25 commits into
mainfrom
claimable-filer-nj-pa

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A return on which the filer (or, if joint, either spouse) can be claimed as a dependent on another return has no dependents (IRC 152(b)(1); Publication 501: "you and your spouse can't claim any dependents on your joint return"), unless the would-be claimant is not required to file and files only for a refund (Publication 501's exception). New Jersey, North Dakota, Ohio, Oklahoma and Pennsylvania count only federal dependents, and several of their provisions also bar the claimable or claimed filer directly. The model applied none of these state rules. This PR applies them, reading the federal branch's three inputs as each rule's wording requires and never reading only the head:

  • "can be claimed" (an own exemption): claimable_as_dependent_on_another_return;
  • the Dependent Taxpayer Test and the childless EITC (152(b)(1), 32(c)(1)(A)(ii)(III)): head_or_spouse_is_dependent_elsewhere_without_filing_exception;
  • "is a dependent on / listed as a dependent on another return" (an actual claim): claimed_as_dependent_on_another_return.

Stacked on #10087 (claimable-filer-federal, head 35a2cbc: federal CTC/ODC, child care qualifying child, exemptions_count, education credits, student loan interest and the input split) and #10024. Retarget to main once both have merged. repeal_state_dependent_exemptions.py is also changed by #10045 and #10053; the hub's landing order is #10045, then this PR, then #10053.

Formula Rule now Source
nj_dependents_exemption No dependents when a filer can be claimed (outside the refund-only exception); the filer's own exemption stays N.J.S.A. 54A:3-1; NJ-1040 lines 10-11: "each child who qualifies as your dependent for federal tax purposes" (2025 instructions p.9)
nj_dependents_attending_college_exemption Same dependent test N.J.S.A. 54A:3-1.1; line 12: "Student must be claimed as a dependent on line 10 or 11" (p.9)
nj_ctc Counts only dependents the return can claim N.J.S.A. 54A:4-17.1 (dependents under 54A:3-1); line 65 "each dependent who is age 5 or younger" (p.46)
nj_childless_eitc_age_eligible The age fallback applies the federal childless dependency test (either spouse, with the refund-only exception) and the form's "not listed as a dependent" test (an actual claim, either spouse); the age test applies to filers only; the section 911 condition from #9750 stays P.L.2021 c.130 keeps "all qualifications, except for the minimum or maximum age"; IRC 32(c)(1)(A)(ii)(III); line 58: "You are not listed as a dependent on another tax return" (p.44)
nd_stillborn_subtraction None when a filer can be claimed (outside the exception) Schedule ND-1SA line 8: "You would have been eligible to claim the child as a dependent on your 2025 federal income tax return" (2025 ND-1SA p.2); see reading 1
oh_non_public_school_credits_potential Tuition paid for the return's dependents only R.C. 5747.75: tuition "for all of the taxpayer's dependents"; 5747.01(O): "Dependents" means dependents as defined in the IRC
ok_count_exemptions (and ok_exemptions) No regular exemption for a filer who can be claimed (per filer); no dependents when a filer can be claimed (outside the exception); the special (65+) and blind exemptions stay Form 511 item F: "If you can be claimed as a dependent on another return, enter '0' for your exemption"; spouse only if the "spouse cannot be claimed"; dependents "as defined in IRC Sec. 152" (2025 Form 511 packet p.8-9)
ok_stc $40 per allowable exemption, read from exemptions_count (filers who cannot be claimed, plus dependents unless a filer can be claimed outside the exception); the $50,000 limit needs a dependent the return can claim 68 O.S. 5011(D): $40 "multiplied by the number of allowable personal exemptions", those under the Income Tax Act except the blind and 65+ ones (as codified in 2021, quoted in HB 1013XX p.5); 68 O.S. 2358(E) ("in lieu of the personal exemptions allowed by the Internal Revenue Code"); Form 538-S: a dependent "must qualify and be claimed as a dependent for federal income tax purposes"
ok_federal_eitc_demographic_eligible The frozen-2020 childless route applies the dependency test (either spouse, with the exception), and the age test to filers only 68 O.S. 2357.43 uses the 2020 federal rules; IRC 32(c)(1)(A)(ii)(II)-(III); 2020 Pub. 596 p.17: "neither you nor your spouse can be claimed as a dependent by another person"
pa_tax_forgiveness_rate No dependent child allowance when a filer can be claimed (outside the exception) Tax Reform Code 301(e.1): "Dependent" means "a child who is the dependent of a claimant for purposes of section 151" (p.113)
pa_tax_forgiveness_amount, new pa_tax_forgiveness_eligible, pa_tax_forgiveness_eligible_share, input pa_tax_forgiveness_parent_qualifies Forgiveness only on the tax of a filer who is not claimed elsewhere (an actual claim) or whose claiming parent qualifies; one claimed spouse leaves the other spouse's separate claim on joint eligibility income 301(c.2): a "Claimant" "is not a dependent of another taxpayer for purposes of section 151" (p.112); Schedule SP line 1: "Are you a dependent on another taxpayer's ... federal tax return?"; "A dependent child may also be eligible if he or she is a dependent on the PA-40 Schedule SP of his or her parents"; "When one spouse is claimed as a dependent on another person's federal income tax return, otherwise qualifying married taxpayers must file separately" (2025 PA-40 SP p.3-5); PIT guide: "Each spouse's tax forgiveness, if any, must be determined separately"

The contributed reforms that copy these formulas follow suit: nj_dependent_exemption_reform, ok_dependent_exemption_reform, the Oklahoma count in repeal_state_dependent_exemptions (own exemption reads claimability), and TAXSIM's PA forgiveness rate.

Audit rows already fixed upstream (checked against the code on #10087)

These state formulas read a federal output that the base branches correct, so this PR changes no code for them; it adds YAML cases that pin the inherited result (S / J1 / J2 / J0, 2025, hand-computed).

Audit row Reads Fixed by Pinned here
NC child deduction (G.S. 105-153.5(a1)) ctc_qualifying_children #10087: ctc_qualifying_child nc_child_deduction $0 / $0 / $0 / $3,000
NJ EITC, federal path eitc_eligible, eitc #10024 childless gate nj_eitc $0 / $0 / $0 / $91.80
OH EITC (5747.71) eitc #10024 not pinned (30% of the federal credit)
PA Working Pennsylvanians credit eitc #10024 pa_eitc $0 / $0 / $0 / $22.95
NJ, OH, OK, PA child and dependent care credits cdcc, cdcc_potential #10087: is_cdcc_eligible ordinary-child branch and cdcc_qualifying_childcare_expenses pa_cdcc $0 / $0 / $0 / $320
OK combined child care / child tax credit, CTC branch ok_federal_ctc (federal CTC) #10087 ok_child_care_child_tax_credit $0 / $0 / $0 / $56.25
OH dependent personal exemptions and $20 exemption credit oh_personal_exemptions_eligible_person, exemptions_count #10087 (#10087 tests)
Student loan interest in the NC, ND, OH and OK income bases federal AGI #10087 (#10087 tests)

Readings for Max (for the US + core hub to batch)

  1. North Dakota stillborn subtraction. N.D.C.C. 57-38-30.3(2)(p) allows it "for each birth resulting in stillbirth" with no dependency condition (current code p.35); Schedule ND-1SA adds "You would have been eligible to claim the child as a dependent". Implemented: the form (S / J1 / J2 / J0 = $0 / $0 / $0 / $5,241 in 2025). Statute-only alternative: $5,241 in all four.
  2. Pennsylvania, one claimed spouse. Implemented: the unclaimed spouse claims Tax Forgiveness on their own tax, using joint eligibility income and the married table, as Schedule SP says for "Married with a spouse who is a dependent" (Columns B and C; Table 2 "Married Claimants, even if filing separately"); J1 with $3,000 each = $92.10. Alternatives: treat the federal joint return as an invalid PA joint claim ($0), or forgive the whole return ($184.20). The PIT guide also lists married-filing-separately claimants among single claimants, which would point to Table 1. Each spouse's own tax is approximated by that spouse's share of the spouses' Pennsylvania taxable income, leaving out amounts recorded only for the tax unit (US government interest, the 529 deduction).
  3. Pennsylvania parent exception as an input. A claimed filer qualifies only if "the taxpayer on whose return the dependency is claimed also qualifies" (Schedule SP line 2). The model does not link the claiming parent's return, so this is a new person input, pa_tax_forgiveness_parent_qualifies (default false), the answer to that form line. Alternative: no input, always deny. (The Axiom report notes 301(c.2) on its face excludes any dependent from being a claimant; the route rests on Schedule SP and the PIT guide.)
  4. Oklahoma special (65+) and blind exemptions for a claimable filer. Kept: Form 511 asks for "0" only on the regular exemption, and the special and blind exemptions are separate boxes "for each taxpayer or spouse" with no dependency bar. Alternative: drop them with the regular exemption (a claimable 66-year-old single filer: 1 exemption kept vs 0).
  5. Ohio unsubsidized health insurance / LTC deduction (audit P2). Not changed. R.C. 5747.01(A)(10) imports IRC 213's rules, and 213 defines a dependent "without regard to subsections (b)(1), (b)(2), and (d)(1)(B)" of 152, which supports the current (broad) reading; the narrower reading would deny a claimable filer's dependents' premiums. The audit recommends getting the department's interpretation first.

The earlier reading on actual claim vs claimability is no longer a reading: with the federal branch's split inputs, the actual-claim wording (NJ line 58, PA Schedule SP) reads claimed_as_dependent_on_another_return, and the "can be claimed" and dependent rules read claimability.

Not implemented (audit P2/P3 and unmodeled programs)

  • ND renter refund: related co-residents share one refund (N.D.C.C. 57-02-08.1); this needs linked households and a claimant choice, not a claimability gate.
  • OH Pell/OCO grant deduction: modeled from raw pell_grant; the error is not claimability-specific (needs a qualifying-grant input).
  • Unmodeled programs with a dependent branch: NJ organ donor and college tuition deductions, NJ health insurance mandate, ND organ donor deduction and homestead credit, OH home-instruction credit and adopted-student grant deduction, OK living organ donor deduction, PA HSA/MSA deductions and 2025-26 student loan deduction (statute/form conflict).
  • Federal HSA deduction (IRC 223(b)(6), per account beneficiary), which the NC, ND, OH and OK income bases inherit: health_savings_account_ald is an input with no eligibility formula, so there is nothing to gate (audit P2, model scope).
  • PA child care credit's 2022 federal-percentage freeze (Fiscal Code 1605-W) is a separate year issue, not a claimability one; so is the audit's note that the model applies Oklahoma's frozen 2020 EITC rules in 2021, while the 2021 Form 511 refers to the current federal credit and HB 2962's change begins in 2022.
  • PA's dependent-child definition (children, grandchildren and foster children only) is not applied; is_qualifying_child_dependent is the existing proxy.

Changes not gated on the claimability inputs

Three fixes sit in lines this PR touches and apply even when nobody can be claimed: Ohio's tuition credit no longer counts tuition recorded on a filer (the existing cases now record it on a dependent child), and the NJ and Oklahoma childless-EITC age tests look only at filers, as the federal formula does, so a dependent's age no longer qualifies a filer. MICROSIM_UNGATED_PLACEHOLDER

Invariants

  1. Swap invariance. Every changed output is the same under either head/spouse labelling, with claimability, the actual claim and the refund-only exception drawn per adult.
  2. Monotonicity. Marking another filer as claimed (and so claimable) never raises any changed benefit, exemption, deduction or forgiveness amount.
  3. No change when nobody can be claimed, apart from the three ungated fixes above (checked on the default dataset, where nobody is flagged).
  4. Pennsylvania share. pa_tax_forgiveness_eligible_share is in [0, 1] and equals 1 when no filer is claimed; forgiveness never exceeds tax before forgiveness.

Tests

  • YAML: variable-named cases for every changed formula: a single claimable filer, a joint return with one claimable spouse under both head/spouse labellings (person_a keeps every input), both claimed, neither claimed, and an unclaimed single control; cases where a filer can be claimed but is not, and where the would-be claimant files only for a refund; the PA parent exception, the OK special/blind boxes, the OK $50,000 limit, filer-only age tests, the reform copies and the rewritten Ohio tuition cases. YAML_RESULTS_PLACEHOLDER
  • Property test policyengine_us/tests/core/test_claimable_filer_nj_pa_invariants.py reuses check_swap and check_monotone on Hypothesis batches (tuition on dependents, the PA parent input, and claimability, claim and exception drawn per adult) and a seeded population in the six states, 2022, 2025 and 2026. PROPERTY_RESULTS_PLACEHOLDER

Microsimulation impact

MICROSIM_PLACEHOLDER

Axiom parity

AXIOM_PLACEHOLDER

🤖 Generated with Claude Code

Merge with main after #10087

Merged main at 6989afda4698d6c643f5dd0ef7ad19aff9f769b8. Conflicts in nm_medical_expense_credit.py, nm_medical_expense_credit.yaml, and ca_cdcc_relevant_expenses.yaml take main's reviewed versions because this PR left all three unchanged from its federal base. Removed the obsolete federal changelog fragments claimable-filer-federal.fixed.md and head-dependent-elsewhere-swap.fixed.md. Before the syntax-only repair below, the exact replay check passed: the merge diff against main matched all 39 paths in this PR's original patch, with no unrelated changes.

A separate syntax-only commit quotes 148 YAML case names across 14 files whose unquoted colons prevented parsing. Verification confirms that the intended names and every test input/output value are preserved, with no other line changes; all 19 YAML files parse into 299 cases. The final diff matches the original patch in substance, with this name-quoting syntax repair as the only exception.

Validation: all 20 changed test files passed (299 YAML cases and 4 Python tests). make format and Ruff 0.15.5 format --check / check passed.

MaxGhenis and others added 18 commits October 8, 2026 11:03
The federal standard deduction and 17 state formulas read only whether the
tax-unit head is claimed elsewhere, so a joint return where one spouse can be
claimed was taxed differently depending on which spouse was labelled head.
Each formula now applies its jurisdiction's rule for that case (either spouse,
single filers only, per spouse, or only when every filer is claimed), using
two new label-independent helpers. Adds swap-pair YAML cases and a Hypothesis
property test.

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

The New Mexico, Maine and Hawaii renters gates counted filers who are not
claimed elsewhere, so a tax unit with neither a head nor a spouse (252 in
the default dataset) looked like one whose every filer was claimed. A new
helper, every_filer_is_dependent_elsewhere, requires a claimed filer and no
unclaimed one.

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

- Hawaii's dependent standard deduction uses earned income net of the
  deductible part of self-employment tax, as the N-11 worksheet does.
- New Mexico's medical care credit needs a filer who is both 65 or older
  and not a dependent when a filer is a dependent elsewhere (NMSA 7-2-18.13).
- The federal EITC without a qualifying child requires that no filer can be
  claimed as a dependent (IRC 32(c)(1)(A)(ii)(III), Publication 596), so
  Missouri's working family credit no longer reaches such a couple.
- Hawaii's food/excise credit keeps minor children receiving public support
  (HRS 235-55.85(c)) on a joint return where one spouse can be claimed.
- Comments label the readings the law does not settle, and the property
  test covers the EITC and the food/excise exemption amount.

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

- The federal and Oregon dependent worksheets use earned income net of the
  deductible part of self-employment tax, as Hawaii's now does.
- Hawaii's food/excise minor-child count excludes children who can be
  claimed by another taxpayer and the filers themselves (Form N-311 line 3).
- claimed_as_dependent_on_another_return documents what it stands for: a
  §151 deduction for the person is allowable to another taxpayer, so a
  person whose would-be claimer files only for a refund is not one
  (Publications 501 and 596); rules on actually being claimed read it too.
- Hawaii's renters comment labels the mixed joint reading as an inference;
  the Hawaii dependent threshold cites HRS 235-2.4(a)(3) on its page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A filer who can be claimed on another return is treated as having no
dependents (IRC 152(b)(1); on a joint return either spouse counts) and has no
personal exemption (IRC 151(d)(2)); one who is claimed gets no education
credits (25A(g)(3)), student loan interest deduction (221(c)) or recovery
rebate (6428(d)(2), 6428A(d)(2), 6428B(c)(2)). The model read none of these.
Now the child tax credit and credit for other dependents, the under-13 child
and dependent care qualifying person, exemptions_count and its RI, DE, OH, OR,
WI, HI and NM readers, the recovery rebates, the education credits and the
student loan interest deduction apply them symmetrically for joint returns.
Georgia keeps its own counts; the HI, WI and Treasury exemption reforms
follow the corrected count.

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

A return on which the filer (or, if joint, either spouse) can be claimed as a
dependent has no dependents (IRC 152(b)(1)), and these states count only
federal dependents. Now, on such a return:
- New Jersey gives no dependent or college-dependent exemption and no child
  tax credit, and its childless EITC age fallback applies the federal
  dependency test (P.L.2021 c.130) and the filer-only age test;
- North Dakota gives no stillborn child subtraction (Schedule ND-1SA line 8);
- Ohio's nonpublic school tuition credit counts tuition for the taxpayer's
  dependents only (R.C. 5747.75, 5747.01(O));
- Oklahoma gives a claimable filer no regular exemption (Form 511 item F),
  counts no dependents, counts only allowable exemptions for the sales tax
  credit (68 O.S. 5011(D)), and its frozen-2020 childless EITC applies the
  dependency and filer-only age tests;
- Pennsylvania gives no dependent child allowance, and Tax Forgiveness covers
  only the tax of a filer who is not claimable or whose claiming parent
  qualifies (Tax Reform Code 301(c.2), Schedule SP), so one claimable spouse
  leaves the other's separate claim.
The NJ and OK dependent-exemption reforms, the repeal-state-dependent-
exemptions reform's Oklahoma count and TAXSIM's PA rate follow suit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Child and dependent care: childcare expenses do not count on a return with a
  claimable filer unless a child under 13 still qualifies (IRC 21(b)(2)(A)(ii)).
- Tuition and fees deduction: not allowed to a filer who can be claimed (IRC
  222(c)(3)), so the education credit bar no longer makes such a filer eligible.
- Recovery rebates: the Armed Forces exception waives the identification rule
  only, not the exclusion of a spouse who is another taxpayer's dependent.
- Georgia: the contributed refundable credit and SB 520 reforms count the same
  children as ga_ctc_potential through a new ga_ctc_eligible_child.
- Education credits and student loan interest read the claimed input directly,
  since IRC 25A(g)(3) and 221(c) turn on an actual claim.
- One reference per source document; quote IRC 24(h)(4)(A) exactly.
- Tests: mixed-recipient care, tuition deduction, military rebates, Georgia
  refund cap, and the swapped New Mexico rebate case; the property test now
  covers the state readers of the exemption count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/exemptions/personal/oh_personal_exemptions_eligible.yaml
#10024 now separates three facts: is claimed, can be claimed, and the would-be
claimant's filing exception.

- IRC 152(b)(1) gates (child tax credit, credit for other dependents, under-13
  care child and its expenses, dependents in exemptions_count, ARPA dependents,
  Ohio dependents, the Hawaii and Wisconsin reforms) read
  head_or_spouse_is_dependent_elsewhere_without_filing_exception, so a filer
  within the Publication 501 exception keeps their dependents.
- Own exemptions, recovery rebates and the tuition deduction read claimability.
- Education credits and student loan interest keep reading the claimed input.
- Tests: the filing exception and a filer who can be claimed but is not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#10024's food/excise credit, Act 115 rebate and renters credit took claimable
filers off exemptions_count themselves. exemptions_count now leaves them out
(and, outside the filing exception, the return's dependents), so those credits
read it as it is; the filing-exception cases were one exemption short.

The renters credit also leaves out a dependent who can be claimed by another
taxpayer (Schedule X counts only people who cannot be), as the food/excise
credit already did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Education credits: a dependent student is not eligible on a return whose
  filer can be claimed outside the filing exception (IRC 25A(f)(1)(A)(iii),
  152(b)(1)); the filer's own eligibility still turns on an actual claim.
- Recovery rebates: no credit when every filer is a dependent of another
  taxpayer (IRC 6428B(a)); the CARES and CAA child prerequisite is a spouse
  with a valid SSN, whether or not that spouse is an eligible individual.
- Child and dependent care: cdcc_qualifying_childcare_expenses holds the
  expense rule, and the single-parent work requirement reform and California's
  expenses read it.
- References: Georgia HB 136 page 3; one entry per recovery rebate statute;
  quote IRC 24(h)(4)(A) exactly in the test comment.
- Tests: dependent students, the two rebate cases, the reform and California
  expenses, and the Hawaii, Wisconsin and Treasury reforms with a claimable
  filer under both labellings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Education credits: is_barred_from_education_credits_by_dependency holds the
  claimed-filer and dependent-student rules; both eligibility formulas and the
  reconciliation SSN reform's Lifetime Learning Credit read it, so the reform
  no longer turns a barred student's tuition into that credit.
- Child and dependent care: childcare counts when any child under 18 is still a
  qualifying individual, so an incapacitated child aged 13 to 17 keeps it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Setting meets_eitc_identification_requirements on one person made it an input
for every person, so the other spouse lost their SSN too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis and others added 5 commits October 11, 2026 12:01
…only

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… where each state's rule does

After the input split on the federal branch:
- the 152(b)(1) "no dependents" gates (NJ dependent, college and child tax
  credit counts, ND stillborn subtraction, OH tuition credit, OK dependent
  exemptions and sales tax credit dependents, PA dependent child allowance,
  the NJ/OK reform copies and TAXSIM's PA rate) and the childless EITC tests
  (NJ fallback, OK frozen 2020) read
  head_or_spouse_is_dependent_elsewhere_without_filing_exception, so a
  would-be claimant who files only for a refund leaves them in place;
- Oklahoma's own regular exemption (Form 511: "if you can be claimed")
  reads claimable_as_dependent_on_another_return, here and in the
  repeal-state-dependent-exemptions copy;
- the NJ line 58 condition ("not listed as a dependent on another tax
  return") and Pennsylvania's Tax Forgiveness filer test and separate-claim
  split ("a dependent on another person's federal tax return") read the
  actual claim, claimed_as_dependent_on_another_return.
The property test draws claimability, the claim and the exception per adult.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nt who files only for a refund

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

Copy link
Copy Markdown
Contributor Author

Status (owner session resumed 2026-10-11 ~16:00Z; not for adoption):

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