Repository navigation
Conversation
The limit used 100% of Schedule C net profit. Plan compensation for a self-employed person is 401(c)(2) earned income, net of the deductible part of self-employment tax and of the plan deduction itself, and 404(a)(8)(C) caps the deduction at that earned income before the plan deduction (Pub. 560 Deduction Worksheet for Self-Employed). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lan limit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 11, 2026
Draft
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.
Draft: waiting on the local test batches, the impact run and the independent review.
Problem
self_employed_pension_contribution_limitreturned min(415(c) dollar limit, max(0, Schedule C profit)), andself_employed_pension_contribution_ald_personreturned min(max(0, Schedule C profit), contributions). So contributions could reach 100% of net profit, and AGI could go negative from this deduction alone: $20,000 of profit with $20,000 of contributions gave AGI = −$1,412.96.The law caps the deduction lower:
Statute text verified on 2026-10-11 against govinfo USCODE-2023 (§§ 401, 404, 414, 415).
The IRS computation is Pub. 560's Deduction Worksheet for Self-Employed, identical in structure in the 2025 edition (p. 39) and the 2022 edition (p. 34), with the Rate Table for Self-Employed (2025 p. 40, 2022 p. 35: a 25% plan rate gives 0.200000):
The worksheet's worked examples match the model's step 2: net profit $200,000 gives an SE tax deduction of $13,596 in 2025 (step 3 = $186,404), and 0.078 × step 3 = $14,680 in 2022.
Which plan the input represents
self_employed_pension_contributions_desiredis the person's total Schedule 1 line 16 contribution. It doesn't say whether the plan is a SEP, a SIMPLE IRA, or a profit-sharing plan with a 401(k) arrangement, and the limits differ:Choice: the limit is the most any line-16 defined contribution plan allows, which is the 401(k) arrangement into which the person defers all of the 402(g) room their deferrals to other employers' 401(k)/403(b) plans leave. Those deferrals use the regular limit first, then the catch-up amount. With no room left, the limit is the SEP and profit-sharing limit, min(dollar limit, 20% of step 3).
Why this choice:
Defined benefit plans are not modeled, as before.
Change
self_employed_pension_earned_income(Person, worksheet step 3): Schedule C net profit (total_self_employment_income, floored at 0) less the part ofself_employment_tax_ald_personattributable to it. That part is split by the business's share of the positive net profits of Schedule C, Schedule F and partnership SE earnings, as on Form 7206 lines 5–8. This is the same split Limit the self-employed health insurance deduction to net profit less half of SE tax and plan deductions #10109 uses for the SE health insurance limit. The model keeps the Schedule C business as the plan's business, as before.gov.irs.gross_income.retirement_contributions.limit.profit_sharing_deduction_rate: 25% from 2002 (EGTRRA § 616 raised it from 15% for years beginning after 2001).self_employed_pension_contribution_limitis now the closed form of the worksheet maximum: min(L, catch-up room + min(dollar limit, 0.2 L + regular room, (L + regular room) / 2)), where L is step 3.self_employed_pension_contribution_ald_person= min(contributions, limit). The limit is applied again so directly supplied contributions are capped too.No circularity.
self_employment_tax_ald_person,elective_deferral_limit,k401_catch_up_limitand the four W-2 deferral variables.Invariants
policyengine_us/tests/unit/test_self_employed_pension_limit_properties.pytests these with Hypothesis. Each draw is a batch of single filers over 2022, 2025 and 2026, run as one vectorized simulation.Mutation check: dropping the halving in the 100%-of-compensation term, or adding catch-up outside the earned income cap, each fails the suite.
Tests
self_employed_pension_contribution_limit.yaml(18 cases, expectations hand-computed from the worksheet, each with the steps in comments):self_employed_pension_contribution_ald.yaml(new, 3 cases): the $20,000 example (deduction $18,587.05, AGI 0), directly supplied contributions, and a couple.self_employment_income.yaml: the SSTB case changes from $8,000 to $7,434.82.~/reviews/se-pension-401c-2026-10/fails-on-main/):self_employment_income.yaml: the SSTB case fails (8,000 vs 7,434.82); the other 5 pass.heavy_run.sh(snapshot of 3fd9f1f).Consumers checked
These read the corrected amounts and need no change:
gov.irs.ald.deductions, tax-unit sum over head and spouse);dependent_taxable_ss_magi;ira_active_participant(positive contributions);mo_adjusted_gross_income), MS (ms_self_employed_retirement_adjustment), SC two-wage-earner subtractions, MI household resources line 16, AL AGI line 9, MN homestead household income, UT homeowner/renter relief, AZ property tax credit income.Limitation (chipped, not changed here). The saver's credit list counts all of
self_employed_pension_contributions. 25B(d)(1) counts elective deferrals but not SEP or profit-sharing employer contributions; the follow-up chip decides how to model the deferral share.Open PRs. #10109's tests with plan contributions ($20,000 of 2023 profit, $3,000 contributed) are within the new limit ($18,587.05), so their expectations hold. Its property tests take the plan deduction from the simulation.
Impact
Pending: a base-vs-PR microsimulation pair for 2026 is queued for the heavy lock.
Follow-ups (chipped)
axiom: TheAxiomFoundation/rulespec-us#1682 queued (§§404 and 414 are not in the corpus yet: TheAxiomFoundation/axiom-corpus#817)
🤖 Generated with Claude Code