Build a retirement calculator that projects savings to a target age, assumptions on show
A retirement calculator is a projection, not a promise: the answer depends almost entirely on assumptions about growth, inflation and spending decades ahead. The useful ones make those assumptions visible and editable, show results in today's money, and say clearly that they illustrate rather than advise. Anticode can build one that runs entirely in the browser, so nobody's savings figures are sent anywhere.
Inputs the user owns
Group the inputs in the order people think about them, with plain labels and a short note on each.
- Now
- Current age, current savings and investments set aside for retirement, and monthly contributions, including any employer contribution.
- Target
- The age they'd like to stop working and the yearly income they'd like in retirement, in today's money.
- Other income
- Any expected state or workplace pension income and the age it starts, entered by the user from their own statements.
- Assumptions
- Investment growth before inflation, inflation, how contributions rise each year, fees, and the withdrawal approach in retirement.
- Horizon
- The age to plan to. Planning to 95 or beyond is a common cautious choice, because running out is worse than leaving some unspent.
Show the assumptions, and their effect
The difference between a 4 per cent and a 6 per cent growth assumption over 30 years is enormous, so a calculator that hides its rate is close to meaningless. Put every assumption on screen with a default the user can change, and add a sensitivity view: the same projection at a lower and a higher growth rate, drawn as a band rather than a single line.
- Today's money. Show results adjusted for inflation by default, with a switch to future money. Large nominal numbers in thirty years' time mislead people into feeling secure.
- Real returns. Subtract inflation and fees from growth explicitly, and show the resulting real rate.
- Withdrawal approach. A fixed percentage of the pot each year, or a fixed income rising with inflation. Explain each in a sentence. FIRE (financial independence, retire early) communities often discuss a rule-of-thumb withdrawal rate; if you include one, label it as a rule of thumb from historical studies, not a promise of safety.
- The gap. If the projection falls short, show how much more a month, or how many more working years, would close it.
Label it honestly
Put a short, visible statement near the result, not hidden in a footer: this is an illustration based on the assumptions shown; actual returns vary and can be negative; it doesn't account for tax or your personal circumstances; it isn't financial advice. Pensions and tax rules differ a great deal between countries, so don't build country-specific tax rules into the projection unless you can check them carefully and keep them up to date. A financial adviser publishing it should also check what their regulator expects of tools on their site.
Describe it to Anticode
"A retirement calculator for a financial planning blog. Inputs: age, current pot, monthly contribution with yearly increase, target retirement age, desired yearly income in today's money, other pension income and its start age. Assumptions on screen, editable, with defaults: growth before inflation, inflation, fees. Withdrawal choice: fixed percentage or inflation-linked income. Results in today's money by default: projected pot at retirement, how long it lasts, a chart of the pot over time with a band for lower and higher growth, and the extra monthly saving needed to close any gap. A clear illustration-only statement beside the result. Remember inputs in this browser. Export the year-by-year table as CSV."
Check the arithmetic yourself before publishing: work one simple case on a spreadsheet (say, a fixed contribution at a fixed real rate for ten years) and compare. Version history keeps earlier copies if a change goes wrong.
Limits
- No live data. The app can't fetch market returns, inflation figures or the user's real pension balances. Everything comes from what the user types.
- No tax modelling unless you write the rules in and maintain them.
- No advice. It doesn't recommend products or tell anyone what to do.
- Private, but local. Inputs are saved in the user's own browser and aren't sent to you. If you want a follow-up, add an optional contact form for people who want to talk to an adviser.
For related tools, see the compound interest calculator, the budget tracker and the rent vs buy calculator. Advisers building a site around the calculator can start from the financial advisers page.
Questions people ask
How accurate is a retirement calculator?
Only as accurate as its assumptions, which no one can know decades ahead. Treat it as a way to compare scenarios, not a forecast.
Are my savings figures sent anywhere?
No. The app has no network. Inputs stay in your browser and are saved there only if the app is built to remember them.
Can it include my country's state pension?
You can type the amount and start age from your own statement. The calculator doesn't look it up.