Skip to content

Fix IA standard deduction to include elderly/blind additional#7937

Open
PavelMakarchuk wants to merge 2 commits intomainfrom
ia-standard-deduction-elderly-fix
Open

Fix IA standard deduction to include elderly/blind additional#7937
PavelMakarchuk wants to merge 2 commits intomainfrom
ia-standard-deduction-elderly-fix

Conversation

@PavelMakarchuk
Copy link
Copy Markdown
Collaborator

Summary

Iowa's standard deduction was missing the elderly/blind additional amount. The code used the base federal parameter (fed_p.standard.amount[filing_status] = $31,500 MFJ) instead of the full federal standard_deduction variable ($34,700 for elderly joint couple).

Closes #7936

Root Cause

Both ia_standard_deduction_joint.py and ia_standard_deduction_indiv.py looked up fed_p.standard.amount[filing_status] which returns only the basic standard deduction, omitting:

  • Additional standard deduction for elderly/blind ($1,600 per person 65+)

Per IA 1040 line 1d: "Standard deduction or itemized deductions from federal 1040, line 12e" — which includes the full federal standard deduction.

Fix

Replaced the parameter lookup with the standard_deduction variable (= basic_standard_deduction + additional_standard_deduction + bonus_guaranteed_deduction). For the individual (MFS) path, each spouse gets half.

Test plan

  • Existing 2021/2022/2023 tests still pass (no elderly, amounts unchanged)
  • New 2025 elderly joint test: $31,500 + 2×$1,600 = $34,700
  • New 2025 non-elderly joint test: $31,500
  • CI passes

References

  • Iowa Code §422.7 — "net income means the taxable income as properly computed for federal income tax purposes under section 63"
  • IA 1040 line 1d: "Standard deduction from federal 1040, line 12e"

🤖 Generated with Claude Code

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (d95d3cd) to head (99e93f7).
⚠️ Report is 144 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##              main     #7937    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           19         2    -17     
  Lines          297        42   -255     
  Branches         0         2     +2     
==========================================
- Hits           297        42   -255     
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 Sentry.
📢 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.

Both ia_standard_deduction_joint and ia_standard_deduction_indiv used
the base federal parameter (fed_p.standard.amount[filing_status]) which
omits the additional standard deduction for elderly/blind filers.

Per IA 1040 line 1d, Iowa uses the full federal standard deduction from
federal 1040 line 12e, which includes the additional amount.

Fix: use the federal standard_deduction variable (basic + additional +
bonus_guaranteed) instead of the base parameter lookup.

Closes #7936

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@PavelMakarchuk PavelMakarchuk force-pushed the ia-standard-deduction-elderly-fix branch from def67db to 7b50e5d Compare April 6, 2026 18:17
@DTrim99
Copy link
Copy Markdown
Collaborator

DTrim99 commented Apr 6, 2026

Checks failing

ia_standard_deduction_joint is a Person variable that returns the
full deduction on head and 0 on spouse (via is_head * deduction).
Test expected a scalar; change to [34_700, 0].

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

IA standard deduction missing elderly additional and OBBBA enhanced senior deduction

2 participants