Retirement Calculator API
Project retirement savings from current savings, monthly contributions (optionally rising each year) and an expected return, in nominal and today's money, with the monthly income from a safe-withdrawal rate.
POST /api/v1/tools/retirement-calculatorMCP retirement_calculatorCalculatorsProject your retirement savings from your age, savings and monthly contributions, in future and today's money, with a safe-withdrawal income and a yearly table.
Input
Send these as a JSON object. Unknown fields are rejected.
- currentAge
- Current age in whole years. (integer, 0 to 120, required)
- retirementAge
- Retirement age in whole years (later than currentAge). (integer, 1 to 120, required)
- savings
- Current retirement savings. (number, 0 to …, default 0)
- monthly
- Monthly contribution. (number, 0 to …, default 0)
- returnRate
- Expected annual return in percent (−50 to 50). (number, -50 to 50, required)
- increase
- Yearly raise in the monthly contribution, in percent (0 to 50). (number, 0 to 50, default 0)
- inflation
- Expected annual inflation in percent (−10 to 50), for today's-money figures. (number, -10 to 50, default 0)
- withdrawal
- Safe-withdrawal rate, % of the balance per year (above 0, up to 20). (number, 0.01 to 20, default 4)
- breakdown
- Include the year-by-year rows (age, contributions, growth, balance, real balance). (boolean, default false)
curl https://pithlab.com/api/v1/tools/retirement-calculator \n -H "Authorization: Bearer $PITHLAB_KEY" \n -H "Content-Type: application/json" \n -d '{"currentAge":30,"retirementAge":65,"savings":20000,"monthly":500,"returnRate":6,"increase":2,"inflation":2.5,"withdrawal":4}'Example response
{
"ok": true,
"result": {
"years": 35,
"balance": 1068694.3948532005,
"real": 450316.89679755014,
"totalContributions": 319966.86579873663,
"totalGrowth": 748727.5290544638,
"monthlyIncome": 3562.3146495106685,
"monthlyIncomeReal": 1501.0563226585007,
"text": "At 65 you'd have 1,068,694.39 (450,316.90 in today's money). A 4% withdrawal gives 3,562.31 a month (1,501.06 in today's money)"
}
}