Conversation
…2 Credit Limit Worksheets A and B) The CTC's tax-liability limit subtracted every other non-refundable credit, and the residential clean energy credit (26 U.S.C. 25D) was ordered before the CTC and before the 25C, elderly and clean vehicle credits. Section 25D(c) orders it last. Follow the IRS worksheets: - Credit Limit Worksheet A line 2 is a parameter (gov.irs.credits.ctc_tax_liability_limit.preceding_credits); line 3 is the new ctc_tax_liability_after_preceding_credits. - Worksheet A line 4 / Worksheet B line 15 (subsequent_credits) reduces the limit only when Worksheet B applies (ctc_credit_limit_worksheet_b_applies). - Worksheet B line 14 is ctc_non_refundable_minimum, the CTC that precedes the residential clean energy credit on the Form 5695 line 14 worksheet. - The residential clean energy credit's limit subtracts every other credit; the 25C, elderly and clean vehicle lists no longer subtract it. - Colorado's 2022-2023 replica reads Worksheet A line 3 (DR 0104CN 4-6). - The Alabama 2020-IRC pin, CRFB and AFA reforms update the new lists. Adds YAML tests (hand-worked 2025 households) and a statutory differential plus Hypothesis property tests; adds hypothesis to the dev extra. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sheet B The section 911 exclusion bar was added as 24(d)(5) and redesignated (d)(3) by Pub. L. 115-141; Cornell LII has no #d_5 anchor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Child Tax Credit's tax-liability limit (
ctc_limiting_tax_liability) subtracted every other non-refundable credit, including the residential clean energy credit (Schedule 3, line 5a), and PolicyEngine ordered that credit before the CTC, the energy efficient home improvement credit, the elderly or disabled credit and the clean vehicle credits. The law orders it last. This PR follows Schedule 8812 Credit Limit Worksheets A and B and the Form 5695 credit limit worksheet:gov.irs.credits.ctc_tax_liability_limit.preceding_credits: Schedule 3, lines 1, 2, 3, 4, 5b, 6d, 6f and 6m (6l is not modeled). It replaces filtering the aggregatenon_refundablelist. Line 3 is the new variablectc_tax_liability_after_preceding_credits.subsequent_credits(the residential clean energy credit; the adoption, mortgage interest and DC homebuyer credits also belong there but are not modeled) reduces the limit only when Worksheet B applies (ctc_credit_limit_worksheet_b_applies: a CTC-qualifying child, no Form 2555, CTC not fully refundable; 26 U.S.C. 24(d)(3) bars the refundable CTC for Form 2555 filers).ctc_non_refundable_minimum, the CTC that cannot be refunded whatever the liability.residential_clean_energy_credit_credit_limitnow subtracts every other non-refundable credit and the CTC on Form 1040, line 19 (or Worksheet B, line 14 when Worksheet B applies).tools/pinned_tbs.py(Alabama's 2020-IRC recompute), the CRFB Social Security credit reform and the AFA reform update the new lists so their credits keep their order.Why not just drop the residential clean energy credit from the limit
Only subtracting the Worksheet A line 2 credits would be wrong for most claimants. Worksheet B line 15 puts the residential clean energy credit back on Worksheet A line 4 whenever the filer has a qualifying child. That is how the IRS carries out 26 U.S.C. 24(d)(1)(B), which refunds the CTC by "the amount by which the aggregate amount of credits allowed by this subpart ... would increase" if the 26(a) limit rose. The aggregate includes the residential clean energy credit, so that credit displaces the non-refundable CTC into the refundable part. For a married couple with two children, $60,000 of wages and $10,000 of solar spending in 2025, a line-2-only limit gives an ACTC of $1,457. The worksheets and the statute give $3,400.
Sources (read for this PR)
Effect
Households. For filers whose liability binds, the reported residential clean energy credit falls to its legal amount (the rest is a carryforward, which the model does not track). The CTC limit, Colorado's 2022–2023 replica, and the split between the credits that share the liability all change. For filers with a credit for other dependents but no qualifying child, the CTC limit no longer subtracts the residential clean energy credit.
Total income tax is unchanged for standard-deduction filers. Before this PR, the over-wide residential clean energy credit and the aggregate cap in
income_tax_unavailable_non_refundable_creditsproduced the same totals as the statute.test_ctc_credit_limit_worksheets.pychecks the new code against a direct encoding of 24(d)(1), 25D(c) and 26(a) on a 720-household grid and on Hypothesis-generated households.Known interaction.
ctc_tax_liability_after_preceding_creditsstill uses liability with SALT removed (the no-SALT branch, moved here unchanged fromctc_limiting_tax_liability). For a SALT itemizer who claims the residential clean energy credit with a qualifying child, the old over-wide credit partly offset that inflated liability. Now these filers get the same understated ACTC that #9741 and #9649 fix for every SALT itemizer. Either fix, applied to the new line-3 variable, removes it.Microsimulation (real runs, no scaling).
main(087664b) against this branch, compared per tax unit and per household:populace_us_2024(pinned default)populace_us_2024(pinned default)small_enhanced_cps_2024No value changes in any of the compared variables:
income_tax,income_tax_before_credits,ctc,refundable_ctc,non_refundable_ctc,ctc_limiting_tax_liability,ctc_value, the residential clean energy credit and its potential, the energy efficient home improvement, elderly or disabled, and new and used clean vehicle credits, the capped and uncapped non-refundable totals,state_income_tax,co_ctc,ok_federal_ctc,ny_ctcandhousehold_net_income.The reason is in the data:
residential_clean_energy_credit_potentialis zero for every tax unit, because neither dataset carries residential clean energy or home improvement spending, clean vehicle purchases or a foreign earned income exclusion. On the fullenhanced_cps_2024file, themainrun (55,264 tax units) shows the same zeros; the branch run on that file did not finish (the host ran out of memory and the run was stopped), so the Enhanced CPS before/after is on the small sample only. Peak memory on that sample was 2.07 GB onmainand 2.09 GB on this branch.So this PR changes household calculations for filers who enter those inputs. It does not move any aggregate the model publishes from these datasets.
Invariants (tested)
refundable_ctc,residential_clean_energy_creditandincome_tax_capped_non_refundable_creditsequal 24(d)(1)(B) (increase in the aggregate subpart A credits), 25D(c) (last) and 26(a), applied directly.Tests
ctc_tax_liability_after_preceding_credits,ctc_credit_limit_worksheet_b_applies,ctc_non_refundable_minimum,residential_clean_energy_credit_credit_limit, two newctc_limiting_tax_liabilitycases, a Colorado case, and five hand-worked 2025 integration cases inctc/credit_limit_worksheets_integration.yaml, including the residential clean energy claimant whose CTC is limited.test_ctc_credit_limit_worksheets.py(grid differential, two Hypothesis properties). This addshypothesisto the dev extra, as Compute the CTC tax-liability limit from actual liability (fixes request-order dependence) #9649 does.Related
ctc_limiting_tax_liabilitywith actualincome_tax_before_credits. Neither has merged, so this PR builds onmain. They conflict with this PR in that file: whichever merges second moves the direct read intoctc_tax_liability_after_preceding_credits, where the no-SALT branch now lives.axiom: TheAxiomFoundation/rulespec-us#1426 queued (us:statutes/26/24/d, us:statutes/26/25D, us:statutes/26/26; 25D companion cases added there)
🤖 Generated with Claude Code