Skip to content

Count only the filer and spouse in the Schedule R section 22 amount, and keep the pension return of cost out of its reduction - #11701

Open
peyton-thalman wants to merge 3 commits into
PolicyEngine:mainfrom
peyton-thalman:section-22-filer-and-spouse
Open

peyton-thalman wants to merge 3 commits into
PolicyEngine:mainfrom
peyton-thalman:section-22-filer-and-spouse

Conversation

@peyton-thalman

Copy link
Copy Markdown

What

Two fixes to section_22_income, the amount the credit for the elderly or the disabled (Schedule R) is figured from.

  1. Dependents are counted as if they were the filer. It counts every tax unit member who is 65 or older or retired on disability, and sums Social Security and disability income over the whole unit. Section 22 looks only at the taxpayer and, on a joint return, the spouse.
    • 26 U.S.C. 22(c)(2)(A) picks the initial amount by the spouses who qualify. A joint couple over 65 with a dependent parent over 65 counts three on main and falls to the zero default instead of $7,500.
    • 22(c)(2)(B) caps an under-65's amount at their own disability income. On main a disabled filer under 65 with an elderly dependent counts two, starts from $7,500 and gets $6,000 instead of $5,000.
    • 22(c)(3)(A) reduces by amounts "received by the individual (or, in the case of a joint return, by either spouse)", and the 2026 Schedule R instructions, line 13a ask for benefits "you (and your spouse if filing jointly) received". On main a dependent parent's $5,000 of Social Security wipes out a head of household's $5,000 amount.
  2. The tax-free part of a pension reduces the amount. It subtracts pension_income - taxable_pension_income, the return of the employee's own cost under section 72. 22(c)(3)(A) reduces only by benefits excluded under the Social Security Act, the Railroad Retirement Act or a VA law, or "under any provision of law not contained in this title", and section 72 is in title 26. The Schedule R line 13b instructions say "Don't include amounts that are treated as a return of your cost of a pension or annuity."

Changes

  • section_22_income.py restricts the qualifying count, the elderly count and under-65 disability income to is_tax_unit_head_or_spouse, uses tax_unit_social_security_for_taxability (filers only) for untaxed Social Security, and drops the nontaxable pension term, with the statute and instructions cited in comments.
  • New section_22_dependents.yaml and section_22_return_of_cost.yaml (6 cases, arithmetic in comments), each failing on main and passing here.
  • test_elderly_disabled_credit_invariants.py reference function updated, since it mirrored the old formula.
  • Changelog fragment changelog.d/section-22-filer-and-spouse.fixed.md.

Expected values (2026)

Case Law Main
Joint, 70 and 68, dependent parent 90 $7,500 $0
Head of household 67, dependent parent with $5,000 Social Security $5,000 $0
Disabled filer 58, $6,000 disability pay, dependent 80 $5,000 $6,000
Single 70, $9,000 pension, $3,000 of it tax free $5,000 $2,000
Disabled single 60, $10,000 disability pay, $10,000 annuity ($3,000 tax free), tax after credit $52.50 $90

Tests run locally

section_22_income.yaml, section_22_dependents.yaml, section_22_return_of_cost.yaml, permanent_disability_retirement_pay.yaml, the elderly and disabled integration file, and the state files that read the credit or section_22_income (Michigan subtractions, Vermont and Nebraska elderly or disabled credits, among others) pass, as does core/test_elderly_disabled_credit_invariants.py.

Notes

🤖 Generated with Claude Code

peyton-thalman and others added 3 commits December 3, 2026 02:13
section_22_income subtracted pension_income minus taxable_pension_income
(the tax-free part of an employer pension or annuity) from the section 22
amount. 26 U.S.C. 22(c)(3)(A) reduces the amount only by pensions,
annuities and disability benefits excluded from gross income and payable
under title II of the Social Security Act, the Railroad Retirement Act or a
VA law, or excluded under a provision of law not in title 26. The tax-free
part of a pension is a return of cost under section 72, inside title 26,
and the 2026 Schedule R line 13b instructions say not to include it.

A single filer aged 70 with a $9,000 pension, $3,000 of it tax free, had a
section 22 amount of $2,000 instead of $5,000.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
section_22_income counted every tax unit member who was 65 or older or
retired on disability as a qualified individual, so a dependent parent
aged 65 or older raised the count. A joint couple over 65 with such a
parent counted three and fell to the zero default instead of $7,500, and
a disabled filer under 65 with an elderly dependent counted two and
started from $7,500 instead of $5,000. It also reduced the amount by the
dependents' nontaxable Social Security (tax_unit_social_security includes
them while the taxable part covers only the filers), and added dependents'
disability income to the under-65 cap.

26 U.S.C. 22(c)(2)(A) sets the initial amount by the filer and spouse,
22(c)(2)(B) uses their disability income, and 22(c)(3)(A) reduces it by
amounts received by the individual or, on a joint return, either spouse.
Restrict all three to the head and spouse.

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

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