Methodology

This page shows how each tool computes its numbers so you can check them in a spreadsheet. The home-page calculator, the savings-duration tool, the spending calculator, the savings-needed tool, the 4% rule calculator, the withdrawal comparison, the early retirement bridge, the FIRE calculator, the Coast FIRE calculator and the sequence example are covered below. Percentages you type (for example 5) are converted to decimals (0.05) before use. Amounts are in nominal dollars unless labelled today's dollars (see section 1e for the deflation convention).

1. Savings-duration tool and sequence example

Used on how long will my savings last and sequence of returns. Year t = 0 is the first year after the start age; t = 1 is the second, and so on. Income amounts are entered in the dollars of your first withdrawal year, so they rise with inflation both before and after they start. The withdrawal-rate table uses planned first-year spending = rate x starting savings, raised by inflation each year, with no income; when a tax rate is entered, the gross amount taken from savings is larger than that spending (spending / (1 - tax rate)). For each year:

growth      = opening balance x (return - fees)
spending    = monthly spending x 12 x (1 + inflation)^t
income      = sum over income streams of monthly x 12 x (1 + inflation)^t,
              counted only in years from the stream's start age up to (not including) its end age
from savings = max(0, spending - income)
tax          = from savings x tax rate / (1 - tax rate)    (0 when no tax rate is entered)
available   = opening balance + growth + income
closing     = max(0, available - spending - tax)

A year counts as fully funded when available is at least spending plus tax. The first year in which it is not is the year the money runs short. In the sequence example the return differs each year (it is that year's value from the list below), fees are zero and benefits are zero. In the savings-duration tool the return is the same every year.

  • Annual time steps: the return is applied to the opening balance, then spending is withdrawn and income is added at year end.
  • Year 1 uses your amounts as entered; spending and income both rise with the inflation rate from year 2 (income is treated as fully cost-of-living adjusted, including before it starts).
  • Fees are subtracted from the return every year.
  • The balance cannot go below zero. "Runs short" means that year's spending could not be fully paid, so the balance is zero at year end. Spending that is exactly covered counts as funded.
  • Optional tax: one flat percentage you enter, applied only to money taken from savings (spending minus income, grossed up). Income is treated as already after tax. It is a simplification, not a tax calculation.
  • Required minimum distributions, account types and one-off costs are not modelled.
  • In the savings-duration tool the return is the same every year, so it shows the arithmetic of your inputs, not a forecast. The sequence example instead uses a different return each year.

1b. Spending calculator (reverse solve)

Used on the retirement spending calculator. It runs the same yearly formulas as section 1 and searches for the largest first-year monthly spending (80 binary-search steps, then rounded down to cents) for which every year to the plan age is fully funded and the closing balance is at least the legacy target. The legacy target is entered in today's dollars and converted to plan-age dollars as target x (1 + inflation)^(plan age - start age). If even zero spending misses that target, no spending is reported.

1c. Savings needed (reverse solve)

Used on how much do I need to retire. It uses the shared annual drawdown formulas to find the smallest starting balance that fully funds every year through the plan age and leaves at least the legacy target. It doubles an upper bound until feasible (capped at $10 billion, with an error if no feasible bound is found), then runs 80 binary-search steps and rounds the passing balance up to whole dollars. A zero balance is returned when income and any accumulated surplus already fund the entire plan and legacy target. The legacy target uses purchasing power at the start of withdrawals and becomes target x (1 + inflation)^(plan age - start age) in end-year dollars. Year-1 spending from savings is max(0, monthly spending - income active in year 1); its gross annual withdrawal, including optional flat tax, divided by required savings is the implied withdrawal rate (0 if no savings are required). The annual-gap multiple divides required savings by 12 times that monthly gap before tax, or is undefined when the gap is zero.

1d. 4% rule (constant-dollar withdrawal)

Used on the 4% rule calculator. First-year annual spending = starting balance x withdrawal rate, passed to the shared runDrawdown model as monthly spending = balance x rate / 12, with monthly benefits zero unless optional income is added and flat tax off by default. From year 2 those dollars rise with inflation; the percentage is not reapplied to later balances. Cash flows occur at year end after returns; other studies and tools may use start-of-year withdrawals, which changes results slightly. Duration is fullYearsFunded in a separate run from start age to start age + 60, capped at 60; 60+ means no shortfall within that window, not a claim about later years. Plan-age balances and rows use the user's separate horizon; real ending balance = nominal balance / (1 + inflation)^(plan age - start age). The maximum-rate table uses 60 binary-search steps over first-year rates from 0 to 20%, retaining the feasible side with no shortfall over the specified years. Rates and first-year dollars are displayed rounded independently; reentering a rounded-up rate can produce a shortfall. This is constant-return arithmetic, not historical testing or a probability of success.

1e. Fixed dollar vs fixed percentage withdrawals

Used on the retirement withdrawal calculator. Both methods use annual steps, returns net of fees on opening savings, year-end withdrawals and balances floored at zero, with no income or tax. Fixed dollar uses runDrawdown with monthly spending = starting balance x rate / 12, monthly benefits zero, no income streams and no tax. Planned year-t withdrawal = starting balance x rate x (1 + inflation)^(t - 1), with year 1 as entered. The amount actually paid is max(0, min(planned withdrawal, opening + growth)): a partial payment in the shortfall year, then zero after depletion. Years funded counts full payments before the first shortfall, capped at the selected horizon (1–60 years).

Fixed percentage, year t:
growth     = opening x (return_t - fees)
withdrawal = min(rate x opening, opening + growth)
closing    = opening + growth - withdrawal  (zero only after an extreme loss)
Constant return, positive multiplier:
balance_t  = starting balance x (1 + return - fees - rate)^t
withdrawal_t = rate x starting balance x (1 + return - fees - rate)^(t - 1)

The percentage is applied to opening savings, not the balance after growth; there is no extra return multiplier in the withdrawal. Fixed percentage has no separate inflation increase. Real year-t withdrawal = nominal withdrawal / (1 + inflation)^(t - 1), so year 1 is in today's dollars. Real ending balance = nominal ending balance / (1 + inflation)^(years elapsed). Today means the start of withdrawals; ages label year ends. Year 10, 20 and 30 summaries are null beyond the horizon, with the final-year value shown separately. Lowest withdrawal uses the first age at a tied minimum, allowing for floating-point dust. Totals sum real annual withdrawals without further discounting.

The ordering table replaces the constant return with the 30 invented returns listed in section 3, sorted good-first, as-listed and bad-first; fees remain 0.3%, inflation 2.5%, starting savings $1,000,000, rate 4%, ages 65–95, income and tax zero. These are illustrative returns, not historical data. Fixed-percentage closing savings multiply the same factors in any order, so the ending balance is identical apart from floating-point dust, while interim income and its minimum change. Every factor in these examples is positive, so fixed percentage never reaches zero. A factor at or below zero can exhaust savings; under extreme losses that year pays only what is left and the balance reaches zero. Fixed-dollar results depend on return order because withdrawals subtract scheduled dollars each year. This is arithmetic, not a backtest or probability of success; guardrails, floor-and-ceiling rules and IRS-defined RMD schedules are not calculated.

1f. Early retirement bridge to Social Security

The early retirement calculator solves only the gap between stopping work and starting Social Security. Bridge years = Social Security start age − retirement age. Ages are whole years, retirement is at least 18, and the later Social Security start age must be 62–70. It calls solveRequiredSavings with startAge = retirement age, endAge = Social Security start age, monthlySpending = annual spending / 12, monthlyBenefits = 0, taxRate = 0 and no legacy target. The solver returns the smallest whole-dollar balance funding every year; its funded runDrawdown rows supply the chart, year table and totals. The fund is intended to reach about zero at the bridge end; rounding or surplus income may leave more. Savings for later retirement are separate.

n = Social Security start age - retirement age
No-income cross-check (g = return - fees; i = inflation):
required = ceil(sum from t=1 to n of W x (1+i)^(t-1) / (1+g)^t)
When g = i: unrounded required = n x W / (1+g)
net withdrawal_t = max(0, spending_t - income_t)
total nominal = sum of net withdrawal_t
total real = sum of net withdrawal_t / (1+inflation)^(t-1)
multiple = required / year-1 net withdrawal (null when zero)

Returns net of fees apply to opening savings; spending and income occur at year end. Year 1 uses entered amounts and inflation starts in year 2; today's dollars mean purchasing power at retirement. Ages label year ends, so retirement at 55 with Social Security at 67 produces 12 rows ending at ages 56–67. Optional income begins at retirement and stops at retirement age plus the entered whole number of income years, exclusive; spending and income both rise with inflation. A zero amount or zero duration switches income off. Start-age comparisons cap income duration at each alternative bridge's length and return null when that age does not follow retirement. Surplus income stays in savings. All output numbers must be finite; invalid or unsupported inputs raise RangeError. Constant returns are arithmetic, not a forecast or probability. Taxes, health insurance, account-access rules and Social Security benefit amounts are not modeled.

1g. FIRE number and years to financial independence

The FIRE calculator divides yearly retirement spending by the withdrawal rate, then projects invested savings until the first whole year reaching that target. All amounts are in today's dollars. Yearly contributions stay constant in purchasing power, so nominal contributions rise with inflation. Return minus fees applies to opening savings using the same nominal convention as runDrawdown; dividing the growth factor by 1 + inflation converts it to real terms. Contributions arrive at year end.

FIRE number = yearly retirement spending / withdrawal rate
multiple of spending = 1 / withdrawal rate
savings rate = yearly invested amount / yearly take-home income
G = (1 + annualReturn - annualFees) / (1 + inflation)
growth = opening x (G - 1)
closing = opening + growth + yearly savings
balance after n years = C x G^n + S x (G^n - 1) / (G - 1)
When G = 1: balance = C + n x S
FI year = first year with closing >= FIRE number
FI age = current age + FI year

Take-home income means after-tax income including retirement contributions. Savings must be between zero and take-home income; retirement spending and current investments must be nonnegative. Current age is a whole number from 16 to 80. The withdrawal rate must be above zero and at most 20%; fees are nonnegative; inflation and return net of fees must exceed −100%. Inputs and every returned number must be finite or the solver raises RangeError. Already reaching the target returns zero years and no rows. Otherwise the model stops at the first qualifying year or after 100 years, returning null years and FI age if unreached. Totals sum contributions and real growth across displayed rows, excluding the starting balance. With zero starting savings and retirement spending equal to take-home minus savings, scaling income scales both contributions and target, leaving years unchanged. These are constant-return calculations, not a forecast or probability; they do not test retirement withdrawals, taxes, account access, health insurance or Social Security.

1h. Coast FIRE

The Coast FIRE calculator uses the same real growth factor and year-end contribution timing as section 1g. It discounts the FIRE number to find the investments needed now to reach that target at a chosen retirement age without more saving. All balances, spending and contributions are in today's dollars; constant real contributions imply nominal contributions rise with inflation.

FIRE number = yearly retirement spending / withdrawal rate
G = (1 + annualReturn - annualFees) / (1 + inflation)
coast number now = FIRE number / G^(retirement age - current age)
projected at retirement if saving stops now = current investments x G^(retirement age - current age)
gap = max(0, coast number now - current investments)
growth = opening x (G - 1)
closing = opening + growth + contribution
coast target at age a = FIRE number / G^(retirement age - a)
coast age = first whole age a before retirement with balance(a) >= coast target(a)
years to coast = coast age - current age

If current investments already meet the coast number, coast age is current age and years to coast is zero. Otherwise annual saving is added at each year end until the first qualifying age, including that year's contribution. Contributions are zero thereafter; rows continue through retirement with growth and the target at each row's closing age. If coasting is never reached before retirement, coast age and years to coast are null and contributions continue through the retirement year. Reaching FI only at retirement does not count as coasting. When G = 1, the coast number equals the FIRE number and balance before coasting is current investments + years x yearly saving. G below 1 is allowed, giving a coast number above the FIRE number.

Ages must be whole with 16 ≤ current age < retirement age ≤ 80. Spending, investments, annual saving and fees must be nonnegative; the withdrawal rate must be above zero through 20%; inflation and return net of fees must exceed −100%. Inputs and all numeric outputs must be finite, with a positive representable growth factor, or RangeError is raised. Unrounded balances determine milestones. This is constant-return arithmetic, not a backtest, withdrawal test or forecast; taxes, Social Security and part-time work are not modelled.

2. Home-page calculator

It uses a separate, simpler model. Each year of saving, then each year of retirement:

annual savings = income x savings rate (flat, not increased over time)
saving year:      balance = balance x (1 + return) + annual savings
shortfall         = retirement spending - Social Security - other income
retirement year n (n = 1 is the first year of retirement): balance = balance x (1 + return) - shortfall x (1 + inflation)^(n - 1)

Savings are reported as lasting until the last age at which the balance has not gone below zero (exactly zero counts as funded). The "rule-of-thumb monthly income" card is separate: 4% of the balance at retirement divided by 12, plus Social Security and other income. The "you need X more" figure uses the same convention: it adds up, for each retirement year n, the shortfall x (1 + inflation)^(n - 1) divided by (1 + return)^n, which is the balance needed at retirement for the model to just reach life expectancy, and compares it with the projected balance. This model has no fees, taxes or account types. The spending and Social Security amounts you enter are treated as amounts for your first year of retirement; the shortfall is multiplied by (1 + inflation)^(n - 1), so year 1 uses the amounts as entered and year 2 is inflated once (default: $60,000 - $20,000 = $40,000 in year 1, $41,200 in year 2). Nothing is inflated between today and retirement, and the return you enter is nominal.

Cross-check: both tools give the same answer

Take $500,000 at age 65, spending $60,000 a year ($5,000 a month), Social Security $24,000 a year ($2,000 a month), a 5% return, 2.5% inflation and no fees. The home-page calculator (with the starting savings set so the balance at 65 is $500,000) and the savings-duration tool (fees set to 0) both show spending fully funded through age 82 and the money running short at age 83. Both tools use the same convention: year 1 as entered, inflation from year 2.

3. Sequence-of-returns example data

The example uses 30 invented yearly returns (in percent): 22, 15, 9, 18, -8, 12, 6, -15, 24, 3, 10, -22, 14, 7, 19, -4, 11, 1, -12, 20, 8, 13, -6, 16, 2, -18, 21, 5, 9, -3. They are not market history. The three orders are the list sorted high to low, as written, and sorted low to high. The CSV download has every year's return and balance.

Limits

  • Results are arithmetic on the inputs you choose, not predictions.
  • The tools do not use historical market data or random simulation.
  • Tax rules, account types, required minimum distributions, Medicare and Social Security claiming rules are not modelled (the savings-duration tool has one optional flat tax percentage that you enter); ask a qualified professional about them.

Corrections

If a result does not match your spreadsheet, email support@retirement-calculator.app with your inputs and we will check it.