Skip to content

Pension claiming-age comparison: lifetime totals, present values and break-even ages

Exact prompt

# Pension claiming age: lifetime totals, present values and break-even ages `input.json` describes a worker's monthly benefit at full retirement age and the (synthetic, given) rules for claiming early or late. Write `solve.py` (Python 3 standard library only) so that `python solve.py input.json answer.json` compares claiming ages. We re-run it on fresh inputs, so do not hard-code anything. Use only the rules below and the numbers in the input. ## Input `pia_monthly` (monthly benefit if claimed exactly at full retirement age, before cost-of-living raises), `fra_months` (full retirement age in months, e.g. 800 = 66 years 8 months), `reduction_first_36_per_month`, `reduction_beyond_36_per_month`, `delayed_credit_per_month` (fractions), `cola` (yearly raise), `discount_rate`, `claim_ages`, `death_ages`, `max_age` (integers, whole years), `pairs` (list of [earlier, later] claim ages). ## Rules 1. Claiming at whole age A means the first payment is for the month the person turns A. Let m = A*12 - `fra_months`. 2. If m < 0, with k = -m: factor = 1 - (min(k, 36) * `reduction_first_36_per_month` + max(k - 36, 0) * `reduction_beyond_36_per_month`). If m >= 0: factor = 1 + m * `delayed_credit_per_month`. 3. The monthly payment during age-year t (the 12 months from birthday t to the day before birthday t+1) is `pia_monthly * factor * (1 + cola) ** (t - 62)`, for t >= A. Raises apply from age 62 whether or not the person has claimed yet. No rounding of payments. 4. `monthly_at_claim` = the monthly payment for age-year A. 5. `lifetime[D]` = sum of all monthly payments for age-years A .. D-1 (death at birthday D, nothing paid from then on). 6. `pv[D]` = sum over age-years t = A .. D-1 of (12 * monthly payment for t) / (1 + discount_rate) ** (t - 62). 7. Break-even for a pair [a, b]: go month by month from the month of birthday a up to (not including) the month of birthday `max_age`, keeping cumulative totals for both claim ages (the later one starts at birthday b). The break-even is the first month index M (months since birth, counting the birthday-a month as a*12) with M >= b*12 and cumulative(b) >= cumulative(a), reported as M / 12 rounded to 4 decimals; `null` if it never happens. 8. `best_by_pv[D]` = the claim age with the highest `pv[D]` (lower age on ties). 9. Round money to 2 decimals and `factor` to 6 decimals only when writing. ## Output `answer.json`: ``` {"claims": {"62": {"factor": ..., "monthly_at_claim": ..., "lifetime": {"72": ..., ...}, "pv": {"72": ..., ...}}, ... one entry per claim age}, "breakeven": {"62-67": ..., ...one key per pair "a-b"}, "best_by_pv": {"72": 70, ...one key per death age}} ``` Keys are strings of the integer ages. ## Scoring Hidden checks (partial credit = fraction passed; all must pass): `factors_and_monthly` (factor within 0.000001, money within 0.011), `lifetime_totals`, `present_values` (within 0.011), `breakeven_ages` (within 0.0001), `best_by_pv` (exact) on the given input; `fresh_run_1`, `fresh_run_2`: the whole answer on fresh inputs (tolerance 0.011; integers exact). Each run has a 60-second limit.

Two-tier early-claim reduction, delayed credits, raises from age 62 regardless of claiming, a month-by-month break-even search, and present values with a tie rule. Original benchmark task written for usecaserank.com (not based on a specific public post). Headless, offline run on a reproducible fixture. Each run's notes say how its cost was measured (estimates are marked).

These are synthetic test cases for comparing AI models, not financial advice.

Success criteria: 1. factors_and_monthly 2. lifetime_totals 3. present_values 4. breakeven_ages 5. best_by_pv 6. fresh_run_1 7. fresh_run_2

Best model for this task so far: Claude Haiku 5.5 (effort default (no --effort flag) · thinking on) (success, $0.0080, 39s). Best AI model for Finance / Retirement Planning →

Run this on another model

All runs (6)

83% pass rate across 6 eligible runs: 5 pass, 0 partial, 1 fail. Partial and failed runs are listed below with everything else.ⓘ

Runs for this use case
ModelCostTimeStep-insⓘAutonomyOutcomeTrustⓘDateCompare
DDeepSeek V4.1 Flash (Venice)thinking on$0.0142s0Fully autonomouspassTrust 80%2026-11-04
MMistral Small 3.2 24B Instruct (Venice)thinking on$0.002443s0Fully autonomousfailTrust 80%2026-10-23
OGPT-6.1 Soldefault · thinking on$0.051m0Fully autonomouspassTrust 80%2026-10-20
AClaude Haiku 5.5default · thinking on$0.008039s0Fully autonomouspassTrust 80%2026-10-20
AClaude Opus 5.5default · thinking on$0.1224s0Fully autonomouspassTrust 80%2026-10-20
AClaude Sonnet 5.5default · thinking on$0.0514s0Fully autonomouspassTrust 80%2026-10-20

Embed this result

A live badge for this use case. It links back here and updates as new runs are published.

UseCaseRank badge for Pension claiming-age comparison: lifetime totals, present values and break-even ages

Get new runs and ranking changes weekly

Which models got better or cheaper on real tasks like this one.