Skip to content

Count everyone in the household, and the missing sources, in Oklahoma gross household income - #11171

Merged
hua7450 merged 2 commits into
mainfrom
ok-gross-income-household
Nov 20, 2026
Merged

hua7450 merged 2 commits into
mainfrom
ok-gross-income-household

Conversation

@DTrim99

@DTrim99 DTrim99 commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

Part of #10812 (state credit income audit).

What was wrong

ok_gross_income feeds Oklahoma's sales tax credit (ok_stc, Form 538-S) and property tax credit (ok_ptc, Form 538-H). It summed its sources over one tax unit and left out several kinds of income the law counts.

What changes

Whose income. 68 O.S. 5012 (sales tax credit) and 68 O.S. 2904(3) (property tax credit) define gross household income as income "received by all persons occupying the same household" (Title 68 compiled, PDF pages 1373 and 1635). OAC 710:50-15-96(c) says the same. Form 538-S Part 3 asks for income "received by ALL members of your household", and line 13 for "income of others living in your household" (2025 Form 538-S, page 1 and page 2). Form 538-H Part 2 is the same (page 1).
The formula still computes each tax unit's own gross income from the source list. Each source is floored at zero per return, and capital gains are netted within the return first, as before. It then spreads each unit's amount evenly over that unit's members, sums the members of each household, and gives every tax unit in the household that total. The mapping goes through persons, so tax units that share a household each count every unit's income once. One member's loss doesn't offset another member's income, because each return's lines are gross positive amounts ("YOU MAY NOT ENTER NEGATIVE AMOUNTS").

Missing sources (added to gross_income_sources.yaml, each with its citation):

Source Rule Source and page
dependent_care_employer_benefits Line 1 counts wages "including nontaxable income from your W-2s"; the definition names "a dependent care reimbursement account". Box 1 wages leave these benefits out. I didn't switch to employment_income, because the definition excludes 401(k) and traditional IRA deferrals. 538-S page 1, page 3
retirement_distributions Line 6: "Other pensions, annuities, and Individual Retirement Accounts (IRAs)". Deferred income counts "when distributed", and Roth IRA earnings count. pension_income leaves out IRA, 401(k), 403(b), SEP and Keogh distributions. 538-S page 1, page 3
tanf "public assistance payments" (statute, 538-S definition); 538-H line 10: public assistance. TANF recipients can't get the sales tax credit at all (ok_stc already checks is_tanf_enrolled), so this matters for the property tax credit. Title 68 pages 1373, 1635; 538-S page 3; 538-H page 1
veterans_benefits "veterans' disability compensation" (statute, OAC, 538-S definition) Title 68 pages 1373, 1635; 538-S page 3
disability_benefits "loss-of-time insurance payments" (statute, OAC, 538-S definition) same
educational_assistance "school grants or scholarships" (538-S definition; 538-H Part 2 instructions) 538-S page 3; 538-H page 3
gambling_winnings "income of every type, regardless of the source" (statute); "any other type of income" (OAC); line 13, other income Title 68 pages 1373, 1635; 538-S page 2
section_911_excluded_income income counts "whether such income was taxable or nontaxable for federal or state income tax purposes" Title 68 pages 1373, 1635
ok_eitc Line 9: "Earned Income Credit (EIC) received in 2025 (if applicable, combine federal and Oklahoma amounts)". The model counted only the federal credit. 538-S page 2

EITC timing (line 9). Line 9 asks for the EIC "received in 2025", which is the prior year's credit. Per David's ruling, the model keeps PolicyEngine's current-year convention, which TAXSIM also uses: it counts the credits on the year's own return, now federal plus Oklahoma. The audit's "EITC received in the year" case stays as a regression test that expects the current-year value (13,000), and its comment states the convention.

The variable's label, documentation and references and the parameter's description, label and references are updated. The parameter now cites the statute, and its description covers both credits.

Who is affected

These are refundable credits, so the changes can only lower them or leave them unchanged:

  • Filers who share a household with someone on another return, such as an adult child, a parent or a roommate. Their household income rises, so some lose the sales tax credit (limits $20,000 / $50,000) or the property tax credit (limit $12,000), and property tax credits shrink by 1% of the added income.
  • Filers with IRA or 401(k) distributions, veterans' or disability benefits, scholarships, gambling winnings, excluded foreign income or employer dependent care benefits.
  • Filers with an Oklahoma EITC. The added income equals 5% of the credit computed under frozen 2020 federal rules.
  • Property tax credit claimants whose household gets TANF.

Tests

Moved from #10812 (ok_gross_income_audit.yaml) into ok_gross_income.yaml, with the arithmetic and citations kept: household members (48,000 on both returns), dependent care benefits, IRA distributions, TANF, veterans' benefits, disability benefits, scholarships, gambling, the EITC case and foreign earned income. Cases that isolate one source now set both line 9 credits (eitc and ok_eitc) to zero. Per the ruling, the EITC case now expects the current-year value, 13,000.

Added:

  • A combined federal and Oklahoma EIC case for a parent with one child and $10,000 of wages: 10,000 + 3,400 + 170 = 13,570.
  • A rental loss on one return doesn't offset the other return's wages (48,000 on both).
  • Sales tax credit at exactly the $50,000 limit once an adult child's wages count (household 50,000: the 70-year-old parent gets 40) and just above it (50,001: 0).
  • The property tax credit ends when a household member's wages count (40,000 against the $12,000 limit; the parent's 10,000 alone would allow 200).
  • The property tax credit ends when TANF counts (12,600; without the TANF, 12,000 would allow 180).

Existing tests changed:

  • ok_gross_income.yaml, "OK gross income unit test 1" (2021): 14,800 becomes 14,814.62. The Oklahoma EIC is now counted. Under 2020 rules for a filer with no qualifying child: min(538, 12,000 x 7.65%) = 538, less 7.65% x (12,000 - 8,790) = 245.565, gives 292.435; 5% of that is 14.62175. The 2021 nonrefundable cap doesn't bind, because the tax of 72 on 4,650 of taxable income is higher.
  • tests/core/test_state_estate_income_invariants.py: also sets ok_eitc to zero, next to the federal eitc it already zeroed. The Oklahoma credit moves with an estate loss or with rental income (which counts toward the EITC investment income limit), so the estate and rental identities would no longer isolate line 11.

Not in this PR

Other Oklahoma gaps from the audit, left for later:

  • Other nontaxable W-2 income the definition doesn't name: pre-tax health premiums and HSA payroll contributions. Military housing assistance has no input.
  • Other income with no list entry: strike benefits, non-Social Security survivor benefits, guaranteed income payments, Pell grants (pell_grant) and paid family leave benefits.
  • A Roth distribution counts in full. The form counts only the distributed earnings, but the inputs don't separate earnings from returned contributions.
  • Two-readings rows with no ruling: gross business receipts versus positive net profit, each capital gain versus net gain, and housing assistance or other in-kind aid.
  • Railroad retirement benefits: open PR Count railroad benefits in state tax worksheets, income tests and limits as each state's law does #10722 adds them to this same list and test file, so whichever PR merges second will need a rebase.

Tested on Modal: run w1-ok-b, 240/240 passed (the Oklahoma test folder, the partner tests, every other YAML file with an Oklahoma household, and 9 Python test files including the estate-income and claimable-filer invariants and the source-conflict guard).

🤖 Generated with Claude Code

@codecov

codecov Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8999568) to head (26cf088).
⚠️ Report is 238 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main    #11171   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           24        22    -2     
  Branches         0         2    +2     
=========================================
- Hits            24        22    -2     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DTrim99
DTrim99 requested a review from hua7450 November 19, 2026 23:28

@hua7450 hua7450 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, David. Counting every member of the household is right for both credits: 68 O.S. 5012 (sales tax relief) and 2904(3) (property tax relief) define gross household income in the same words, so the one shared variable serves both. Each return's income counts once per household, SPM-unit TANF is not double counted across returns, none of the nine added sources overlaps another, and there is no path from the newly read benefits back to the credits. Two fixes before I approve.

Before merge

  1. The Oklahoma EIC counts as income in 2021, when it was nonrefundable. ok_eitc is added to gross_income_sources.yaml, whose only date is 2021-01-01. The credit became refundable in 2022 (2022 packet, "What's new": "The Oklahoma Earned Income Credit (EIC) was made refundable"), and a nonrefundable credit lowers tax; it is not income received. Run at this head for 2021: a married couple with three children and wages of 48,000 gets ok_gross_income 50,076.31 and ok_stc 0; without ok_eitc it is 49,983.18 and 200. Please keep the 2021-01-01 list without ok_eitc, add a 2022-01-01 list with it, restore 14,800 in the 2021 test and drop its ok_eitc assertion. Form 538-S asks to "combine federal and Oklahoma amounts" only from 2024, so 2022 and 2023 rest on the statute; a comment should say so.
  2. += in the formula. ok_gross_income.py line 51 (unit_income += ...) is a line this PR rewrites. The repo rule is to write the addition out (unit_income = unit_income + ...).

Optional

  • Two capital gain items. The statutes list "capital gains" and Form 538-S line 11 reads "gains from the sale or exchange of property (taxable & nontaxable)". Capital gain distributions (non_sch_d_capital_gains) and Form 4797 gains (other_net_gain_gross_income) are in the federal list but not Oklahoma's, and the "Not in this PR" list does not name them.
  • Comments and references. The TANF comment is now inaccurate for the sales tax credit, the 538-H line 10 quote drops "housing assistance", and two packet URLs lack #page.
  • Tests. Four ok_stc and ok_ptc cases sit in ok_gross_income.yaml, and no case combines a multi-member return with a second return.

DTrim99 and others added 2 commits November 20, 2026 11:06
Oklahoma's sales tax and property tax credits test gross household income,
which 68 O.S. 5012 and 2904(3) and Forms 538-S and 538-H define as the
income of everyone living in the household. The model summed one tax unit.
Each tax unit in a household now gets the total over every tax unit there.

The source list also adds dependent care benefits, retirement account
distributions, TANF, veterans' and disability benefits, scholarships,
gambling winnings, excluded foreign earned income and the Oklahoma EITC
(Form 538-S line 9 combines it with the federal credit), keeping the
current-year convention for the credits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Oklahoma earned income credit was nonrefundable in 2021 and became
refundable in 2022, so it joins the gross income sources list from
2022-01-01. The 2021 test expects 14,800 again (wages + Social Security
+ federal EIC). The variable no longer mutates the accumulator in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DTrim99
DTrim99 force-pushed the ok-gross-income-household branch from 7ad0c03 to 26cf088 Compare November 20, 2026 16:07
@DTrim99

DTrim99 commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks, Ziming. Fixed in 26cf088, rebased on main.

Fixed (your "Before merge" items)

  1. Oklahoma EIC from 2022. gross_income_sources.yaml now has a 2021-01-01 list without ok_eitc, and a 2022-01-01 list that is the same plus ok_eitc. The comment cites the 2022 packet's "What's new" (the EIC "was made refundable", PDF page 3). It also says Form 538-S asks to "combine federal and Oklahoma amounts" only from 2024, so 2022 and 2023 rest on 68 O.S. 2904(3) and 5012. The 2021 test is back to 14,800 (wages 12,000 + Social Security 2,000 + federal EIC 800), without the ok_eitc assertion. Your 2021 household (married, three children, wages 48,000) now gives ok_gross_income 49,983.18 and ok_stc 200.
  2. +=. ok_gross_income.py line 51 now reads unit_income = unit_income + max_(0, add(tax_unit, period, [source])).

Skipped (optional, not in this round): the two capital-gain items, the comment and reference fixes, and test placement.

Verification: the Oklahoma income tax tests pass locally (222/222), as does test_state_estate_income_invariants.py. An independent check confirmed the two lists differ only by ok_eitc and checked the comment against the 2022–2024 packets.

@DTrim99
DTrim99 requested a review from hua7450 November 20, 2026 16:08

@hua7450 hua7450 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, David. Both fixes are in. ok_eitc joins the list from 2022, when the credit became refundable, and the 2021 test is back to 14,800 with the ok_eitc assertion dropped; the comment explains the 2022-2023 statutory basis. The += is written out. Comparing the PR's own diff before and after the rebase, those are the only changes. Approving.

@hua7450
hua7450 merged commit f14ac0f into main Nov 20, 2026
40 checks passed
@hua7450
hua7450 deleted the ok-gross-income-household branch November 20, 2026 17:45
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.

2 participants