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>
Draft
4 tasks done
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
Contributor
Author
|
Picking this up for the US hub. I'll post a hand-off comment here when it's ready. Generated by Claude Code |
Main gained #10109's Form 7206 limit, which subtracts this branch's plan deduction (Schedule 1 line 16), and its tests. No textual conflicts; the SSTB pension case in self_employment_income.yaml keeps this branch's expectation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main's Case 9 (2023, $20,000 of profit, $20,000 desired) expected the old plan deduction of $20,000. The worksheet caps it at earned income, 20,000 - 1,412.955 = 18,587.045, so line 10 is still 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A mutant that added catch-up contributions outside the earned income cap passed both YAML files and failed only the property test. The new case (2025, age 55, $20,000 of profit) has step 3 of $18,587.05 and leaves no room in step 16 for the $7,500 catch-up, so the limit is $18,587.05; the mutant gives $26,087.05. Also correct worksheet comments: case 1's 20% figure is step 5 (step 6 caps step 7 at $90,000), the header now says step 3 subtracts only the Schedule C share of line 15, and the ALD comments use the exact $1,412.955. The changelog no longer says the deduction can't reach 100% of profit, which it can below the $400 threshold. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s out Two readings go to the source-conflict backlog for the register: - SECURE 2.0 section 603(b)(1) struck 402(g)(1)(C) for years after 2023, but Notice 2023-62 and Treas. Reg. 1.402(g)-2 keep pre-tax catch-ups excludable. The model follows them, in elective_deferral_limit and now in this limit's catch-up room. - With more than one business, Pub. 560's step 2 enters all of Schedule 1 line 15; the model splits it by net profit as Form 7206 does. The limit's documentation now says it is the most a defined contribution plan allows, so it overstates a SEP or SIMPLE IRA and cuts defined benefit contributions above it, and that steps 6 and 7 are left out only because they never bind at current law. Earned income says it assumes the personal-services test is met. References name each source once, with the 2025 Pub. 560 at its stable URL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The property test took Schedule 1 line 15 from the model, so a Schedule SE error would have passed it. It now computes line 15 from Schedule SE with the published wage bases, as the SEHI test does, allows float32 rounding explicitly, and checks one year per grid case. New and changed YAML cases: - Deferrals to another employer's 403(b) plan use up the room (2026: $20,000 deferred leaves $4,500, so the limit is $23,087.05). - The partnership-only case asserted a $0 limit that Pub. 560 step 1 and 401(c)(4) contradict. It becomes a Schedule C plan beside a $50,000 partnership share, which counts only the Schedule C business's $929.35 of earned income (Pub. 560 page 7). - The age 55 case adds the catch-up under the dollar limit, so its name no longer claims to show the catch-up sitting outside it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The limit is the most a defined contribution plan allows, so defined benefit contributions above it are cut, as the variable's documentation says. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Picking this up for the US hub. I continue the earlier session's work on this branch (its last commit is Generated by Claude Code |
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.
Part of #10529.
What and why
On
main, the self-employed SEP, SIMPLE and qualified plan deduction (Schedule 1 line 16) is min(desired contributions, the section 415(c) dollar limit, Schedule C net profit). Contributions can reach 100% of profit, so this deduction alone can make AGI negative: $1,000 of 2026 profit with $1,380 desired gives a $1,000 deduction and AGI of −$70.65.This PR caps the deduction at the most the Pub. 560 Deduction Worksheet for Self-Employed allows:
New
self_employed_pension_earned_income(worksheet step 3): Schedule C net profit (total_self_employment_income, floored at 0) less the part of Schedule 1 line 15 attributable to it. With farm or partnership earnings too, line 15 is split by each business's share of the positive net profits of Schedule C, Schedule F and K-1 box 14 code A, as on Form 7206 lines 5 to 8. The Schedule C business stays the plan's business, as onmain.New parameter
gov.irs.gross_income.retirement_contributions.limit.profit_sharing_deduction_rate: 25% from 2002.self_employed_pension_contribution_limitis the worksheet's maximum in closed form, with L = step 3:min(L, catch-up room + min(dollar limit, 0.2 L + regular deferral room, (L + regular deferral room) / 2))
The deferral room is the section 402(g) limit plus the person's catch-up amount, less their deferrals to other employers' 401(k) and 403(b) plans, which use the regular limit first.
self_employed_pension_contribution_ald_person= min(contributions, limit), so directly supplied contributions are capped too.With $1,000 of profit, step 3 is 1,000 − 70.65 = $929.35, so the deduction is $929.35 and AGI is 0.
Sources
Which plan the input represents
self_employed_pension_contributions_desireddoesn't say whether the plan is a SEP, a SIMPLE IRA or a profit-sharing plan with a 401(k) arrangement, and their limits differ. The limit is the most any defined contribution plan allows: a 401(k) arrangement into which the person defers, before tax, all the 402(g) room they have left. With no room left, it is the SEP and profit-sharing limit, min(dollar limit, 20% of step 3).maindoes, because a 401(k) arrangement's deferrals could cover all of step 3.main's 415(c) cap for moderate earners: in 2025 at age 55 with $150,000 of profit,mainallows $70,000 and this PR $58,880.57.Not changed
Source conflicts
Two readings are recorded in
source_conflicts/candidates.yamlfor the register:us:catch-up-deferrals-after-402g1c-repeal. SECURE 2.0 § 603(b)(1) struck 402(g)(1)(C), the catch-up exclusion, for taxable years beginning after 2023. Notice 2023-62 § III.A says non-Roth catch-ups "are not includible in the participant's gross income", and Treas. Reg. 1.402(g)-2(a) still adds the catch-up amount to the 402(g) limit. The model follows the notice and the regulation:elective_deferral_limitalready adds the catch-up in every year, and this limit adds the same catch-up room. The regulation binds unless it flatly contradicts the amended statute, so this goes to the project lead.us:se-plan-step-2-multiple-businesses. With more than one business, the worksheet's step 2 enters all of Schedule 1 line 15. The statute doesn't say how to split the 164(f) deduction. Form 7206 splits it by net profit for the same 401(c) earned income, and so does this PR.Invariants
Tested with Hypothesis in
policyengine_us/tests/unit/test_self_employed_pension_limit_properties.py. Each draw is a batch of single filers over 2022, 2025 and 2026, run as one vectorized simulation.Test plan
self_employed_pension_contribution_limit.yaml, 20 cases: the 2025 and 2022 Pub. 560 example profits; the SEP path (no deferral room); catch-ups at ages 55 and 61, including above the dollar limit and, new, a catch-up that earned income leaves no room for; low profit, where the limit is all of step 3; the 100%-of-compensation region; partial room after W-2 401(k) deferrals and, new, 403(b) deferrals; farm proration; a plan under Schedule C beside a partnership (new; it replaces a case that pinned a partner's limit at 0); the $400 threshold; and a loss.self_employed_pension_contribution_ald.yaml, 3 cases: the $20,000 example (deduction $18,587.05, AGI 0), directly supplied contributions, and a couple.self_employment_income.yaml's SSTB case ($8,000 → $7,434.82),self_employed_health_insurance_earned_income_limit.yamlCase 9 (plan deduction $20,000 → $18,587.045; the limit stays 0), two saver's credit cases (profit raised so the old amounts still fit), and Utah Case 12 ($72,000 → $51,087.05).ruff formatandruff checkon the changed Python files.changelog.d/fix-se-pension-earned-income-limit.fixed.md.Results
Runs at this head (Linux, Python 3.14, one file per process): limit YAML 20 passed, ALD YAML 3 passed, property test 4 passed,
self_employed_health_insurance_earned_income_limit.yaml10,self_employed_health_insurance_ald.yaml8,self_employment_income.yaml9, saver's credit 3, Utah 12, and the source-conflict (103) and reference code-health tests.Readers of the deduction, at the merge commit
e716bc1719: 29 files, 454 items, all passed. They cover the dependent and spouse ALD invariants, ALD determinism, QBI (4 files), IRA compensation, IRA active participation and the IRA invariants, the uprating series, TAXSIM outputs, and the AL, AZ, MI, MN, MO, MS, MT and UT consumers.On
main(4e71481e19, this PR's test files): the limit file has 19 failures and 1 pass (the $500,000 dollar-limit guard), and the ALD file 3 failures.Mutants, each run in its own process with the code restored afterwards:
Each fails at least one file. The catch-up mutant passed both YAML files until the new catch-up case, and the line 15 error passes unless line 15 comes from Schedule SE.
Cost of the new property test. It runs in the Rest job's "remaining" pytest group, which the Makefile records at 14.4 GB and 22:18 in CI run 38141803955. Measured on this session's Linux VM, not CI, two runs: 44.6–56.4 s and 991 MB peak resident memory. The file is new, so there is no before. It catches what the YAML can't: the closed form against the literal worksheet across random filers, ages, wages and other-employer deferrals.
CI: not run; this is a draft.
Overlap with other open PRs
self_employed_health_insurance_premiums.py, between Exclude employer-plan-eligible premiums from the self-employed health insurance deduction #10122 andmain's Document disjoint health premium inputs and correct consumer treatment #10046 rewrite of it.savers_credit_qualified_contributions.yaml. This PR raises its profit to $500,000; Count only elective deferrals of self-employed plan contributions in the saver's credit #10129 rewrites the case. Count only elective deferrals of self-employed plan contributions in the saver's credit #10129's new cases hold under this limit: for example, 2026 profit of $100,000 with $100,000 desired gives a $43,087.05 limit, of which $24,500 is deferrals.self_employed_pension_earned_income(documentation, references and step 1), in the limit YAML's header and its farm and partnership cases (Let farm and partnership plans take the self-employed plan deduction #10131 also rewrites the partnership-only case this PR replaced), and in six regions of the pension property test.Issue #10529
maingives $1,000 and −$70.65. Case 5 (age 55, $300,000, $80,000 to a solo 401(k)) gives $80,000, wheremaingives $72,000. Also fixed: compensation from earned income net of the SE tax deduction, and the 20% rate for a person with no deferral room.impact: the hub will measure
axiom: (hub files pe-parity before landing)
Generated by Claude Code