How this calculator works
It runs your retirement month by month: each month your balance earns one month of investment return, then your withdrawal comes out. If you enter an inflation rate, the withdrawal gets a raise every 12 months — because the $2,500 that covers your bills today won't cover them in 2040. The answer is the moment the balance hits zero, or a happy notice that it never does.
That second outcome is real: if your balance earns more each month than you take out, the portfolio grows forever and the honest answer isn't a number of years — it's "indefinitely."
The formula
R is your annual return as a decimal and r is its monthly equivalent. The withdrawal is multiplied by (1 + inflation) at the end of each year. There's no closed-form answer once inflation is involved, which is exactly why this is a simulation and not a one-line formula.
Worked example
$500,000 saved, withdrawing $2,500/month, earning 5% a year, with withdrawals rising 3% a year for inflation:
The money lasts about 20 years, 7 months. After 5 years you'd still have about $458,643; after 10 years, $377,270; after 15, $240,273 — the decline accelerates as withdrawals grow and the balance shrinks. Ignore inflation and the same money appears to last 34 years, 7 months. That 14-year gap is why the inflation field matters.
The 4% rule — and its fine print
The classic guideline says: withdraw 4% of your starting balance in year one, raise it with inflation each year, and a diversified portfolio has historically survived 30 years. It's a genuinely useful starting point — on $500,000 that's about $1,667/month. But it came from backtests of US markets in the 20th century, assumed a roughly 50/50 stock/bond mix, and ignores taxes and fees. Some researchers now argue for 3.3%; others say 4.5%+ is fine if you can cut spending in bad years. Treat it as a sanity check, not a guarantee.
One risk this calculator can't show: sequence-of-returns risk. We assume a smooth, identical return every year, but real markets deliver lumpy ones — and two retirees with the same average return can get wildly different outcomes depending on the order. A crash in your first years of withdrawals forces you to sell more shares at low prices, permanently shrinking the base that later recoveries compound on. It's why retiring into a bear market is more dangerous than living through one mid-retirement, and why many planners keep 1–2 years of spending in cash.