Calculation catalog › Social Security
Social security zero year replacement gain
Monthly PIA gain from replacing the latest $0 base year with a year of the sample earnings, recomputed exactly through the benefit formula and given in the dollars of the PIA the step shows.
Field: Zero-year replacement PIA gain Unit: US dollars Basis: today's dollars (real) Computed by: UI-native Status: Complete chain
Appears in: ss-page (SocialSecuritySection PIA explainer "Replacing your $0 year in YEAR with about $X of earnings would add $Y/mo", or, for a year already past, "Had you earned about $X in YEAR, one of your $0 years, your benefit would be $Y/mo higher in START dollars")
Calculation records
-
PIA gain from replacing a year with no earnings Composition record, justified by derivation
Purpose: Show how much one more year of earnings in place of a $0 year would add to the monthly benefit, computed exactly.
Statement: socialSecurity/piaFromEarnings.ts#zeroYearReplacementGain re-runs #computePiaFromEarnings on the same input with the latest base year whose earnings, reported or projected, are $0 given the sample amount, the window, projection and indexing year unchanged (so the amount is capped at that year's base and indexed only if the year is at or before the indexing year), and publishes that year, the amount, the eligibility-year PIA before and after, their difference, and, given the projection's first year, the difference of the two PIAs each raised by the cost-of-living increases from the eligibility year through the year before it (#piaWithCostOfLivingIncreases, as the resolved PIA is), the gain in that year's dollars that the page prints; there is no gain when the history does not compute, no averaged year is $0, or the amount is not positive. #zeroYearSampleEarnings gives the explainer's sample: the projection's assumed earnings for its first projected year, else the latest reported year's amount. #bendTierForAime gives the explainer's tier line, the bend-point rate of the next dollar of AIME. Units: dollars a month at full retirement age, in the eligibility year's dollars and in the projection's first year's. Rounding: the PIA's own, to the dime; each difference is rounded to the dime against float error.
Formula:
gain = PIA(history with raw(Y) := amount) - PIA(history), Y = the latest base year with raw earnings 0-
Y: The replaced base year (unit: year) (domain: a base year whose earnings are 0) -
amount: Sample covered earnings put in year Y (unit: usd/year) (domain: positive)
Timing: once per earnings history
Rounding: each PIA floored to the dime; the difference rounded to the dime
Limits:
- Inherits the earnings computation's conventions and registered limits: indexing floored to the dollar, the computation-year window, and stand-in tables for years not yet published
- The replaced year is the latest $0 base year; replacing an earlier one would index the sample, describing earnings that can no longer be earned. For a person 62 or older every base year has passed, so the page says what the year would have added had it been worked
- A year worked after 61 is outside the computation's base window (usc-42-415-f-2-post-entitlement-pia-recomputation)
Provenance: derived by
claude, implemented byclaude.Independent review:
codexGates (6 of 6 pass): fixture registers a test: pass; pins resolve: pass; families exist: pass; worksheet exists: pass; mutation receipt exists: pass; provenance independent: pass
Worksheet: zero-year-replacement-gain.md Mutation receipt: zero-year-replacement-gain.mutation.md
Evidence tests: piaFromEarnings.zeroYear.evidence.test.ts
Implemented in: piaFromEarnings.ts
Is the number of: social-security-zero-year-replacement-gain
-
Transformations
- socialSecurity/piaFromEarnings.ts#zeroYearReplacementGain: re-run computePiaFromEarnings with the latest base year whose earnings are $0 given the sample (the first projected year's assumed earnings, else the latest reported year's, #zeroYearSampleEarnings), the window and indexing unchanged, raise both PIAs by the cost-of-living increases from the eligibility year through the year before the start (#piaWithCostOfLivingIncreases), and publish the difference (startYearGainMonthly).
The evidence links on this page (each record's worksheet, mutation receipt, evidence tests
and implementation, and the source links) are pinned to engine commit
2624dbdba9fd, committed 2026-10-11.
The live calculation index and
output-family census links point at the repository's main
branch, so you can check this snapshot against them.