Calculation catalog › Social Security
Social security survivor switch PV
Expected present value of a widow(er)'s strategy that takes the survivor benefit and the own benefit at chosen ages and switches between them, with strategies paying the same benefits shown once.
Field: Survivor switching expected PV Unit: US dollars Basis: today's dollars (real) Computed by: UI-native Status: Complete chain
Appears in: ss-page (Survivor vs. personal timing table "Strategy" and "Expected PV")
Calculation records
-
Survivor and own benefit switching for a widow(er) Model record, justified by derivation
Purpose: Rank the orders in which a widow(er) living alone can take the survivor benefit and their own, by expected value.
Statement: socialSecurity/analysis/survivorSwitching.ts#survivorSwitchingInputs takes a single household's one claimant and, of the deceased or surviving-divorced former-spouse records that pass the ledger's modeled widow(er) gates, the one whose survivor benefit at the claimant's survivor full retirement age is largest (the first on a tie), with the deceased's benefit the PIA x the deceased's claim factor (full retirement age when none is entered); a claimant whose benefit is paid as a disability benefit from its onset gets none. #expectedPvSwitch values a strategy as the sum over ages from the current age to 119 of S x the larger claimed yearly benefit x s(y) x (1 + r)^-(age - current age); with the widow(er)'s wages (the plan's wage rows), each year before the full-retirement-age year is priced month by month and the ledger's earnings-test year (socialSecurity/earningsTest.ts#earningsTestYear) charges the excess against the benefits she is entitled to that month, a month it only partly covers in proportion to the own benefit and the survivor excess (POMS RS 02501.145 B.2), and a month the claim-year convention pays the own benefit before its entitlement against the survivor benefit alone; its crediting months raise the own benefit from the FRA month and the survivor benefit from the survivor FRA month, and the months withheld before 62 raise it from the month of 62 too (20 CFR 404.412(b)), each counting only months of its own reduction period, with s(y) the plan's COLA factor over its inflation factor times the haircut for the year the age is reached (socialSecurity/analysis/expectedValue.ts#realBenefitScale, the ranking's own), the survivor benefit from socialSecurity/survivorBenefit.ts#survivorBenefitMonthly at its whole-year age and the own benefit at its claim factor, S the engine's survival curve. #rankSwitchStrategies offers survivor ages (the current age, at least 60, and the survivor full retirement age's year) and own ages (the current age from 62 to 70, the full retirement age's year, 70), every pairing and each alone, keeps one strategy per distinct yearly stream (the one with fewer claims, then the earlier survivor age, then the earlier own age), and ranks them by value, ties in the same order. Units: start-year dollars. Rounding: none.
Formula:
EV(s, o) = sum_{a = x..119} S(a) x B(a) x s(y) x (1 + r)^-(a - x), B(a) = sum_{m = 1..12} (max([a >= s] W_m, [a >= o] O_m) - D_m); with no wages D_m = 0 and B(a) = 12 x max([a >= s] W(s), [a >= o] P f(o))-
B(a): The year's benefits paid at age a, month by month, in start-year dollars before s(y) (unit: usd/year) (domain: nonnegative) -
W_m: The survivor benefit in month m: survivorBenefitMonthly at survivor claim age s, held to the widow's limit, its reduction months cut from the month of 62 by the months withheld before 62 and from the survivor full-retirement-age month by every month withheld before it (20 CFR 404.412(b)); W(s) when nothing is withheld (unit: usd/month) (domain: nonnegative) -
O_m: The own benefit in month m: the own PIA x the claim factor at own age o, its reduction months cut by the months withheld from the full-retirement-age month; P f(o) when nothing is withheld (unit: usd/month) (domain: nonnegative) -
D_m: The month's earnings-test deduction: the year's excess earnings (42 U.S.C. 403(f)(3)), restated in start-year dollars at the year's COLA factor and haircut, charged from January, only before the full-retirement-age month and only against a benefit from its first month of entitlement (403(f)(1)), a month it only partly covers in proportion to the own benefit and the survivor excess (POMS RS 02501.145 B.2); 0 with no wages (unit: usd/month) (domain: nonnegative) -
W(s): Monthly widow(er) benefit at survivor age s (unit: usd/month) (domain: nonnegative) -
P f(o): Own PIA x the claim factor at own age o (unit: usd/month) (domain: nonnegative) -
x: Age in the start year (unit: years) (domain: integer) -
s(y): The COLA factor over the inflation factor, times the haircut, for the year y the age a is reached (unit: 1) (domain: positive) -
r: Real discount rate (unit: rate/year) (domain: above -1)
Timing: monthly in each year, annual weights, from the start year to age 119
Rounding: none
Limits:
- Whole-year ages: the survivor benefit at the current age (at least 60) or the survivor full retirement age's year; the own benefit at the current age (62 to 70), the full retirement age's year or 70
- The deceased's benefit is the claim age entered for the record, or full retirement age when none is; a death before the deceased claimed is priced only through the claim age entered
- Single households only; no taxes or child benefits
- The earnings test on the widow(er)'s wages is charged against the benefits paid each month, as the ledger charges it; wages are whole calendar years spread evenly over their months, with no grace year, and only wage streams are earnings (usc-42-403-f-5-earnings-counted)
- A benefit paid as a disability benefit from its onset is not ranked, since no own claim age starts it
- Survival on the engine's one curve, the SSA period table
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: survivor-switching-expected-value.md Mutation receipt: survivor-switching-expected-value.mutation.md
Evidence tests: survivorSwitching.evidence.test.ts
Implemented in: survivorSwitching.ts; expectedValue.ts; earningsTest.ts
Is the number of: social-security-survivor-switch-pv
-
Records that feed this number
-
One-year death probability: SSA's published q(x) Formula record, justified by derivation
Purpose: The annual death probability of a man or a woman that every survival curve and stochastic-longevity draw reads, straight from SSA's published table.
Statement: montecarlo/deathProbability.ts#annualMortality(age, sex) (re-exported by montecarlo/mortality.ts), for a man or a woman of age a with x = floor(a): the probability of dying within one year is the death probability SSA publishes for that sex and exact age x in Table 4C6 (ssa-period-life-table), for x from 0 to 118. At 119 and above it is 1: the table's last row is closed, so a life at 119 dies during that year, although SSA prints 0.926604 there. Below 0 it is 0. A person whose sex is 'average' has no single death probability, and the function refuses 'average' with a RangeError; the survival curve builds 'average' as the mixture of the two sexes (survival-probability-product). Units: probability. Rounding: none; the published six decimals.
Formula:
q(a) = q_SSA(sex, floor(a)) for 0 <= floor(a) <= 118; q(a) = 1 for floor(a) >= 119; q(a) = 0 for floor(a) < 0-
a: Age as passed (unit: years) (domain: real) -
q_SSA(sex, x): SSA's published probability of dying within one year at exact age x, male or female column (ssa-period-life-table) (unit: 1) (domain: [0, 1], six decimals) -
q(a): Probability of dying between ages floor(a) and floor(a) + 1 (unit: 1) (domain: 0 <= q(a) <= 1)
Timing: one-year transition between consecutive integer ages
Rounding: none
Limits:
- The table end: SSA prints q(119) = 0.926604 for both sexes, and e(119) = 0.58, which counts life past 120; the engine closes the table at 119 instead, as the Monte Carlo horizon and the expected-value loops assume. Reading the printed q(119) and closing the table at 120 would change the chance of being alive at 120 from 0 to 6.8e-12 for a man and 2.3e-11 for a woman of 65, 2.8e-7 at 110, 0.00138 at 117 and 0.0734 for someone already 119, and would change no survival probability to an age below 120
- The period table is applied unchanged to the person's whole remaining life: it describes 2023's death rates, not an individual's risk or future mortality improvement
- No interpolation within a year of age: a fractional age reads the row of its whole years
- A negative age returns 0 and is not flagged
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: mortality-published-death-probability.md Mutation receipt: mortality-published-death-probability.mutation.md
Evidence tests: mortality.evidence.test.ts
Implemented in: deathProbability.ts
Feeds: longevity-survival-percentile-age, monte-carlo-success-rate, monte-carlo-ending-investable-histogram, social-security-expected-present-value, social-security-survivor-switch-pv, social-security-fica-return-ratio, income-annuity-annual, spending-base-annual
-
-
SSA period life table, 2023 (2026 Trustees Report) Data record, justified by derivation
Purpose: The death probabilities and life expectancies by age and sex that every survival figure and the longevity questionnaire read.
Statement: longevity/ssaPeriodLifeTable.ts#SSA_PERIOD_LIFE_TABLE carries SSA's Table 4C6 period life table for 2023, as used in the 2026 Trustees Report: the probability of dying within one year, q(x), and the period life expectancy, e(x), at each exact age x from 0 to 119, for men and for women, as printed (q to six decimals, e to two), read from SSA's page on 2026-09-27. Its source record names the page, the table's caption, the period and Trustees Report years, the read date, an Internet Archive capture of the page and the SHA-256 of the four columns in a canonical text, which the evidence rebuilds from the numbers. #LAST_TABLE_AGE is the last row, 119. #baselineRemainingYears reads e: the printed e(x) at a whole age, linear between the two rows at a fractional one, and for 'average' the mean of the male and female values; the longevity questionnaire prints it as its baseline. #CURRENT_LIFE_TABLE_EDITION names the edition a percentile pick or a saved questionnaire result records, and #storedLifeTableEdition reads a stored figure that names none as made on the 2022 period table of the 2025 Trustees Report, the table the engine carried before. Units: probability; years. Rounding: none; the printed figures.
Limits:
- The number-of-lives columns SSA also prints are not carried; nothing reads them
- A period table: 2023's death rates at every age, applied to a person's whole remaining life, not a cohort projection with future mortality improvement
- When SSA publishes the next edition, the embedded table trails it until a reviewed data change replaces it; the tax-rule record for the table's edition (SSA Table 4C6) names it and is re-verified yearly (annuallyIndexed, the rules:due queue and verify:quotes, whose quoted introduction and row 65 stop matching the page when the edition changes)
- The last row is closed: the engine reads q(119) as 1 (mortality-published-death-probability) although the table prints 0.926604 there for both sexes; the printed value is carried, not read
- Which projections read it. The year-by-year projection reads the table in two cases only: when a plan's amortization-based spending is set to amortize to the age reached with a 25 or 10 percent chance (projection/simulate.ts, through survival-percentile-age and joint-survival-percentile-age, worked out again on every projection), and when a plan holds a joint-and-survivor annuity whose exclusion ratio is fixed (projection/annuityForms.ts, through mortality-joint-last-survivor-expectancy). Such a plan gets new year-by-year figures when the table changes: under-saved-single with its spending amortized to the 25 percent age ends with an after-tax estate of $9,840 on the 2022 table and $212,538 on the 2023 table. The Social Security analysis page, the percentile picker, the questionnaire and Monte Carlo with longevity modelled read it on their own pages; a percentile pick is stored once with its edition and not recomputed
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: ssa-period-life-table.md Mutation receipt: ssa-period-life-table.mutation.md
Evidence tests: ssaPeriodLifeTable.evidence.test.ts
Implemented in: ssaPeriodLifeTable.ts
Feeds: longevity-survival-percentile-age, monte-carlo-success-rate, monte-carlo-ending-investable-histogram, social-security-expected-present-value, social-security-survivor-switch-pv, social-security-fica-return-ratio, income-annuity-annual, spending-base-annual
-
The survival curve: product of hazard-adjusted one-year survivals, and the 50/50 mixture for 'average' Formula record, justified by derivation
Purpose: The probability someone alive today is still alive at a later integer age, on SSA's published death probabilities with an optional health hazard.
Statement: montecarlo/survival.ts#survivalCurve is the engine's one survival curve, for a whole starting age a (at least 0), sex and hazard power h (a positive finite number, default 1). For a man or a woman, survivalTo(t) = product over x = a..a+t-1 of (1 - q(x))^h (mortality-published-death-probability), multiplied left to right, where the factor is 0 when q(x) >= 1; 1 for t <= 0, and 0 once the running product reaches 0; deathProbabilityInYear(t) = survivalTo(t) x (1 - (1 - q(a + t))^h); and deathProbabilityGivenAlive(t) = 1 - (1 - q(a + t))^h, which at h = 1 is q(a + t) itself. For 'average', survivalTo(t) is the mean of the man's and the woman's survivalTo(t) from a, each under the power h: the chance for someone equally likely to be either; deathProbabilityInYear(t) = survivalTo(t) - survivalTo(t + 1); and deathProbabilityGivenAlive(t) = 1 - survivalTo(t + 1)/survivalTo(t), or 1 once survivalTo(t) is 0. Both death probabilities are 0 for t < 0. A fractional age or an invalid hazard is refused. #survivalProbabilityTo(c, sex, g, h) is a view of it: with from = floor(max(c, 0)) and to = floor(g), it returns 1 when to <= from and otherwise the curve from `from` at t = to - from, the same product in the same order. The percentile ages, the hazard solver, the death-age draw, the joint expectancy and the Social Security analysis models read the curve. Units: probability. Rounding: none.
Formula:
S(t) = prod_{x=a}^{a+t-1} (1 - q(x))^h for a man or a woman; S_average(t) = (S_male(t) + S_female(t))/2; S = 1 when t <= 0-
a, t: Whole starting age and whole years elapsed (unit: years) (domain: integer, a >= 0) -
q(x): SSA's published one-year death probability at x for the sex (mortality-published-death-probability) (unit: 1) (domain: [0, 1]) -
h: Proportional-hazards power (q' = 1 - (1 - q)^h; h > 1 is worse health), applied to each sex before mixing (unit: 1) (domain: h > 0) -
S: Probability of being alive t years on (unit: 1) (domain: [0, 1])
Timing: annual; one factor per integer age from the current age up to, not including, the target
Rounding: none
Limits:
- Ages are floored; a fractional current or target age is not interpolated
- A target at or below the current age returns exactly 1 without consulting the table
- survivalProbabilityTo does not validate the hazard power (a non-positive h is used as passed); survivalCurve refuses one
- annualSurvival is module-private; survivalCurve and survivalProbabilityTo read it, and the evidence reaches it through both
- 'average' is the 50/50 mixture of the two sexes' curves from the person's current age, not a q(x) table: its one-year chance of dying given alive depends on the starting age, because the survivors of a mixed group become more female with age (at 90: 0.14086 for a mixture formed at 22, 0.14155 at 65 and 0.14327 at 85, against the mean q 0.144317). Every survival probability, the life expectancy (0.5 plus the sum of the survivals) and every expected value linear in the curve are the means of the male and female ones; ages read off the curve and hazard powers solved on it are not (at 65 the ages reached with 50, 25 and 10 percent chance are 85, 91 and 95, against 83, 89 and 94 for a man and 86, 92 and 96 for a woman)
- The hazard power applies to each sex's curve before mixing: the person is one sex or the other, with that sex's death rates raised to h, and one power serves both halves
- Two 'average' people are independent mixtures: each is a man or a woman with probability 1/2, independently of the partner, so a couple's expected value, joint expectancy or either-alive probability is the average over the four equally likely sex pairings (man-man, man-woman, woman-man, woman-woman). It is not the reading "an opposite-sex couple, order unknown", which averages only the two mixed pairings; that reading differs by up to 0.135 percent of a benefits-only row on the examples' two couples of 'average' people (all-401k-no-bridge and brokerage-bridge-401k) and changes no top claim age at 0, 2 or 4 percent
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: survival-probability-product.md Mutation receipt: survival-probability-product.mutation.md
Evidence tests: survival.evidence.test.ts
Implemented in: survival.ts
Feeds: longevity-survival-percentile-age, social-security-expected-present-value, social-security-survivor-switch-pv, social-security-fica-return-ratio, income-annuity-annual, spending-base-annual
-
-
Survivor benefit under RIB-LIM Composition record, justified by derivation
Purpose: Reduce the survivor base for the survivor's age, then cut it to the widow's limit when the deceased was paid a reduced benefit.
Statement: socialSecurity/survivorBenefit.ts#survivorBenefitMonthly takes the survivor base as the larger of the deceased's PIA and the deceased's actual benefit (42 U.S.C. 402(e)(2)(A) and (C)) and multiplies it by the widow(er) factor #survivorReductionFactor returns: a linear ramp from 71.5% at age 60 to 100% at the SURVIVOR full retirement age, clamped to 0.715 at or before 60 and to 1 at or after that FRA. When the deceased was ever entitled to an old-age benefit reduced for an early claim, the result is then cut, if it is greater than both, to the larger of the deceased's actual benefit and 82.5% of the deceased's PIA (402(e)(2)(D), "after application of subsection (q)"; POMS RS 00615.320 A.3). A deceased with no PIA returns zero. Units: nominal USD per month, in today's dollars before COLA and haircut. Rounding: none.
Formula:
B = max(deceasedPia, deceasedActual) x factor; benefit = min(B, max(deceasedActual, 0.825 x deceasedPia)) when everReduced, else B; factor = 1 - 0.285 x (1 - (m - 720) / (F - 720)) for 720 < m < F, 0.715 at m <= 720, 1 at m >= F-
deceasedPia: Deceased worker's primary insurance amount (unit: usd/month) (domain: positive; zero or less returns 0) -
deceasedActual: Deceased worker's actual benefit after their own claim factor (unit: usd/month) (domain: nonnegative) -
everReduced: Whether the deceased was ever entitled to an old-age benefit reduced for claiming before full retirement age (unit: true or false) (domain: false for a worker who never claimed, claimed at or after FRA, or was paid disability benefits; a caller may omit it, and it is then taken as deceasedActual < PIA, which gives the same amount) -
m: Survivor age in total months at which the benefit is reduced: in the projection, the age at the first month of widow(er) entitlement (survivor-reduction-entitlement-month) (unit: months) (domain: integer) -
F: Survivor full retirement age in total months (unit: months) (domain: integer above 720)
Timing: once per survivor claim
Rounding: none
Limits:
- The survivor FRA is a separate schedule from the worker FRA, and using the worker FRA would change every reduction between 60 and FRA; the survivor schedule is registered as usc-42-416-l-survivor-fra-age-60-attainment-cohorts
- The deceased's actual benefit is taken as the caller supplies it; for a worker who died before claiming, the projection supplies the benefit the worker would have received for the month before the death, with the credits earned by then, registered as usc-42-402-e-survivor-of-worker-who-died-before-claiming
- For a worker who dies before 62, the projection uses the PIA as entered; the law computes that PIA with the death as the eligibility event (20 CFR 404.211 and 404.212) and, for a survivor, can raise it by indexing the worker's earnings to a later year (42 U.S.C. 402(e)(2)(B)), which is not modeled
- For a former spouse who died, the survivor base is priced at the claim age entered for that person, or at full retirement age when none is entered; an entered claim age before full retirement age counts as a reduced benefit for the limit; for a former spouse who died after full retirement age without claiming, entering the age in years and months in the month of death counts the credits earned by then, while a whole-year age drops the months since the last birthday
- The two forms agree whenever the deceased's actual benefit is at or above the PIA, which is every case the projection can produce for a deceased who was never paid a reduced benefit; the limit also applies to a deceased paid a reduced disability benefit, which the projection does not produce
- Inputs are monthly, in today's dollars, before COLA and any benefit haircut; callers scale to their own annual frame
- The family maximum is not applied to a survivor benefit here; POMS applies the limit after that adjustment, and with no other auxiliary on the record the two orders agree
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: survivor-benefit-rib-lim.md Mutation receipt: survivor-benefit-rib-lim.mutation.md
Evidence tests: survivorBenefit.evidence.test.ts
Implemented in: survivorBenefit.ts
Feeds: social-security-benefit-annual, social-security-expected-present-value, social-security-survivor-switch-pv
-
Transformations
- socialSecurity/analysis/survivorSwitching.ts#rankSwitchStrategies: for each strategy, weight the larger claimed yearly benefit (the survivor benefit from the ledger's helper, the widow's limit after the age reduction) by survival from the engine's curve, scale it by the plan's COLA drift and haircut (expectedValue.ts#realBenefitScale, as the ranking) and discount it; with the widow(er)'s wage rows, the retirement earnings test is charged month by month against the larger claimed benefit before full retirement age by the ledger's earnings-test year (socialSecurity/earningsTest.ts#earningsTestYear), never against a benefit before its first month of entitlement, and its crediting months raise each benefit from that benefit's own full retirement age, counting only months of its own reduction period, and the survivor benefit also from 62 for the months withheld before 62 (20 CFR 404.412(b)). Strategies with the same yearly stream collapse to the one with fewer claims, then earlier ages; no input for a disability benefit from its onset.
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.