Retirement readiness check
Will this plan last? Run a 10,000-path Monte Carlo projection and show the client their odds — and the spread of outcomes — in one chart.
1 · Make the call
Post the household's numbers to /v1/retirement/monte-carlo. The
seed makes the run reproducible.
curl -X POST https://api.numeratica.com/v1/retirement/monte-carlo \
-H "Authorization: Bearer nmr_sk_test_xxx" \
-H "Content-Type: application/json" \
-d '{
"current_age": 40, "retirement_age": 65, "end_age": 95,
"current_balance": 500000, "annual_contribution": 30000,
"annual_spending": 60000, "expected_return": 0.07,
"return_volatility": 0.12, "inflation": 0.025,
"num_simulations": 10000, "seed": 12345
}'2 · The response
You get the success probability plus the distribution of ending balances by percentile.
{
"result_id": "mc_5445a80e48d88d60",
"engine_version": "montecarlo-1.0.0",
"seed": 12345,
"result": {
"success_probability": 0.9026,
"median_ending_balance": 16871636.36,
"ending_balance_percentiles": {
"p10": 102175.32, "p25": 6177105.71, "p50": 16871636.36,
"p75": 36221935.82, "p90": 60601503.01
},
"median_depletion_age": 87,
"num_simulations": 10000
},
"disclaimer": "Calculation engine output for informational purposes only; not financial advice."
}3 · Render it
Drop the response into this self-contained chart — inline SVG, no chart library, no build step. Copy the source and point it at your own data.
Rendered output
<div style="font-family:-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;color:#1a2230;max-width:560px">
<div style="display:flex;align-items:baseline;gap:16px;flex-wrap:wrap;margin-bottom:10px">
<div style="font-size:40px;font-weight:700;color:#047857;line-height:1">90.3%</div>
<div style="color:#5b6675;font-size:14px">success over 10,000 simulated retirements<br>median ending balance <strong style="color:#1a2230">$16.9M</strong> · median depletion age <strong style="color:#1a2230">87</strong></div>
</div>
<svg viewBox="0 0 520 240" width="100%" style="max-width:560px;height:auto" role="img" aria-label="Ending-balance percentiles">
<line x1="40" y1="200" x2="480" y2="200" stroke="#e6e9ef"/>
<rect x="40" y="198" width="64" height="2" rx="3" fill="#60a5fa"/>
<rect x="134" y="185" width="64" height="15" rx="3" fill="#60a5fa"/>
<rect x="228" y="158" width="64" height="42" rx="3" fill="#1d4ed8"/>
<rect x="322" y="110" width="64" height="90" rx="3" fill="#60a5fa"/>
<rect x="416" y="50" width="64" height="150" rx="3" fill="#60a5fa"/>
<g font-size="13" font-weight="600" text-anchor="middle" fill="#1a2230">
<text x="72" y="190">$0.1M</text><text x="166" y="177">$6.2M</text>
<text x="260" y="150">$16.9M</text><text x="354" y="102">$36.2M</text><text x="448" y="42">$60.6M</text>
</g>
<g font-size="12" text-anchor="middle" fill="#5b6675">
<text x="72" y="220">P10</text><text x="166" y="220">P25</text>
<text x="260" y="220" font-weight="700" fill="#1d4ed8">P50</text><text x="354" y="220">P75</text><text x="448" y="220">P90</text>
</g>
</svg>
<div style="color:#5b6675;font-size:12px;margin-top:6px">Ending-balance percentiles · result_id mc_5445a80e48d88d60</div>
</div>