How we calculate
Last reviewed
Every number Coastyear shows comes from the rules on this page. If something here doesn't match what the calculator does, that's a bug and we'd like you to tell us.
The short version
Coastyear follows your money one year at a time, from your age today to the end of your plan, in today's dollars. Each year belongs to exactly one stretch of your life: saving, coasting, part-time work, or full retirement. The stretch decides what goes in and what comes out.
The same engine runs every calculator on the site. It runs in your browser, and the same inputs always give the same outputs. Results are estimates under the assumptions you enter. They are not predictions.
Today's dollars and returns after inflation
Every amount is in today's dollars: spending, contributions, income and results. That way a $50,000 budget at 60 means what $50,000 buys now. To keep the math consistent, the engine only ever uses returns after inflation.
r = (1 + r_in) × (1 − f) − 1r_in is the return after inflation you enter, before fees, and f is the yearly fee. Fees are taken out once, here, and nowhere else.
r = (1 + g) × (1 − f) ÷ (1 + i) − 1If you enter a return before inflation g, the calculator converts it using inflation i. This is the exact conversion, not g minus i.
Switching the return field between after inflation and before inflation converts the number at your inflation rate, so it never changes a result. The return after inflation must be between −10% and 15%. If you choose to see future dollars, each year's amount is multiplied by (1 + i) raised to the number of years from now. That changes the display only.
The yearly simulation
The main result, the history check and the Monte Carlo runs all use the same loop.
for each year, at age a:
B = B − withdrawal(a) start of the year
if B < −$1: money runs out at a, stop
B = B × (1 + r) + deposit(a) end of the yearWithdrawals happen at the start of the year and contributions at the end, which is slightly conservative. The $1 allowance only absorbs rounding.
A plan works if it gets through its final year without running out. Ending at exactly zero counts as working. Once a plan runs out it stays out: later income or contributions can't bring it back.
Stretches of your plan and where money comes from
In any year, money comes from one source only. These are the four kinds of stretch and what each one does to your savings. E is spending in retirement, H is health insurance before 65, and τ is the tax rate on withdrawals.
| Stretch | What you enter | What happens each year |
|---|---|---|
| Saving | Yearly contribution C | C is invested at the end of the year. Spending and other income aren't modeled. |
| Coast | Yearly surplus X (default 0) | Net = X + pensions − H. A positive net is invested at the end of the year. A negative net is withdrawn at the start, divided by (1 − τ). |
| Part-time | Take-home pay L and spending S | Net = L + pensions − S − H, handled the same way as Coast. |
| Retired | Nothing new | Withdraw max(0, E + H − pensions) ÷ (1 − τ) at the start of the year. Pension income above spending isn't reinvested. |
Health insurance before 65
H is entered per person as a yearly amount. It counts only in stretches where self-paid insurance is switched on: by default, part-time and retirement yes, saving and Coast no, since those years usually come with employer coverage. It stops in the year each person turns 65, the US Medicare age. Spending amounts never include it.
Pensions and Social Security
Future income is entered after tax and in today's dollars. Each stream belongs to one person and is paid from that person's start age to their stop age, or to the end of the plan. Social Security and other public pensions keep pace with inflation by default.
real value at age a = amount ÷ (1 + i) ^ (a − A₀)For a pension that doesn't rise with inflation, you enter the amount it will pay when it starts. Each year it's converted to today's dollars at your inflation rate. In the history check, each run uses that run's own inflation instead.
The FIRE number
Your FIRE number F_R is what you need invested at the start of the year you retire fully, at age R. The calculator first works out the gap your savings must fill in each year of retirement, then adds those gaps up with a discount rate tied to your withdrawal rate.
G_k = max(0, E + H_k − I_k) ÷ (1 − τ) k = 0 is the year you retire
F_R = Σ G_k ÷ (1 + r_w) ^ k k = 0 … n − 1, n = P − R + 1I_k is all pension and Social Security income in year k and P is the age your plan runs to. Every year's gap is counted separately, so income that starts after you retire, or stops, is handled correctly.
Σ (1 + r_w) ^ (−k) = 1 ÷ w k = 0 … n − 1r_w is the rate that makes n level payments worth exactly 1 ÷ w. It's found by bisection between 0% and 100%. If the retirement is 1 ÷ w years or shorter (25 years at 4%), r_w is 0 and the gaps are simply added up.
When the gap is the same every year, this gives exactly gap ÷ w, the familiar 25-times rule at 4%. r_w depends only on your withdrawal rate and the length of retirement, not on the return you expect. These five cases are part of the engine's test suite. All use a 4% withdrawal rate, no tax, and a plan that runs to 95.
| Case | Inputs | FIRE number |
|---|---|---|
| No other income | Spend $40,000 a year from 60 | $1,000,000 |
| Income arrives a year after retiring and exceeds spending | Spend $40,000 from 60; $80,000 a year from 61 | $40,000 |
| Social Security from 67 | Spend $60,000 from 60; $24,000 a year from 67 | $1,057,252 |
| Short retirement, 16 years | Spend $40,000 from 80 | $640,000 |
| Exactly 25 years | Spend $40,000 from 71 | $1,000,000 |
In the Social Security case, r_w is 2.262%. In the second case, only the first year of retirement needs savings, because the later income more than covers spending.
The classic Coast number
CN = F_R ÷ (1 + r) ^ (R − A₀)A₀ is your age today. CN assumes nothing goes in or comes out from today until R. This is the standard Coast FIRE number most calculators show.
Progress is what you have invested divided by CN, capped at 100%. If pensions already cover your spending, F_R is zero, the calculator says you don't need a Coast number, and progress shows 100%.
Three states are reported separately, because they mean different things. You could retire today if your savings are at least the FIRE number worked out as if you retired this year. You've reached classic Coast if your savings are at least CN, though you still need work income to cover spending until R. Your plan works now if the Coast age below equals your age today.
Your plan: the age you can stop saving
Your plan starts with a saving stretch, then a Coast stretch, then any stretches with fixed ages, such as part-time work and retirement. The calculator moves only one thing: the age where saving ends and coasting begins, called the Coast age A_c. Every year before A_c is a saving year. Every year from A_c until the first fixed stretch follows the Coast settings.
A_c can be any whole age from today up to the start of the first fixed stretch. The calculator picks the smallest one where the money doesn't run out before R and reaches F_R by R. Whether it then lasts to the end of the plan is what the withdrawal rate and the history check speak to. To test each age, it works backward from retirement.
need(R) = F_R
need(t) = W(t) + max(0, (need(t + 1) − D(t)) ÷ (1 + r)) t = R − 1 … A₀W(t) and D(t) are the withdrawal and deposit in year t if you were already coasting. need(t) is the least you can have at the start of that year and still make it. Coasting from t is possible when the balance you'd have by saving until t is at least need(t).
The result shows the Coast age, the calendar year it falls in (the plan's base year plus A_c − A₀), and your balance at that age. The chart, the history check and the share card all use this timeline.
When no age works
If saving all the way to the first fixed stretch still isn't enough, the timeline keeps you saving until then and the result shows how far short you'd be at R, in today's dollars. It also shows how much more you'd need to save each year to close the gap. That figure is found by bisection, which works because saving more always means a larger balance at every age.
If the money would run out before R, the result shows the age it runs out. For plans with one part-time stretch, it also shows the lowest part-time income that would make the plan work, found the same way.
The Barista FIRE number
Your Barista FIRE number is need(B), where B is the age part-time work starts: the smallest balance that covers every part-time year's withdrawal and still reaches F_R by R. The figure for today is need(A₀), assuming you start coasting now.
We don't use the closed-form Barista formula some calculators use. It only checks your balance at retirement, so it accepts plans that run out of money in an early part-time year and recover on paper later. The backward method checks every year.
The lowest part-time income is calculated whenever your plan has exactly one part-time stretch, whether or not the plan already works. More part-time income always lowers what you need, so bisection finds the exact amount.
Couples
- The household retires fully when the later of the two partners does. F_R is worked out for that year, with gaps counted from then to the end of the plan.
- The plan ends in the year the younger partner reaches the plan-to age, 95 by default.
- Stretches belong to the household, such as both working, then one part-time, then both retired, and there's one household spending figure.
- Each income stream belongs to one partner and follows that partner's age. Health insurance before 65 is counted per person.
- The classic Coast number is discounted from the household retirement year.
- Ages on the chart are the first partner's. If the money runs out, the calculator shows the calendar year and both partners' ages.
Sensitivity table and age matrix
Both tables show classic Coast numbers, recalculated with one input changed. Part-time stretches and the Coast age don't affect them.
- The sensitivity table varies the return after inflation from 3% to 7% and the withdrawal rate between 3.5% and 4%. Returns are before fees, like the input field, and your fee is still applied.
- The age matrix varies the retirement age across 50, 55, 60, 65 and 67 and the return across 4%, 5% and 6%. A cell is left blank when that retirement age isn't after your current age or doesn't fit inside your plan.
The history check and Monte Carlo
Data
We use Robert Shiller's monthly US market data: S&P Composite prices and dividends, the consumer price index, and the 10-year Treasury yield. The current snapshot, shiller-2026-09, gives yearly returns for every January-to-January year from 1871 through 2025. If a month we need is missing, the build fails. Nothing is filled in.
We only publish the yearly returns we calculate from this data, with credit to the source. The original spreadsheet isn't redistributed.
stock(y) = (P_Jan,y+1 + D_y) ÷ P_Jan,y × CPI_Jan,y ÷ CPI_Jan,y+1 − 1P is the index price and D_y is the average of the year's 12 monthly dividend figures, received once at the end of the year.
bond(y) = y₀ + y₀ ÷ y₁ × (1 − (1 + y₁) ^ −9) + (1 + y₁) ^ −9 − 1This is the return from buying a 10-year Treasury at January's yield y₀, collecting a year of interest, and selling it as a 9-year bond at the next January's yield y₁. It's then adjusted for inflation with the same CPI ratio.
Your portfolio is s in stocks and the rest in bonds, rebalanced every year, with your fee taken once: (1 + s × stock + (1 − s) × bond) × (1 − f) − 1. The default split is 90% stocks. Each run also uses that period's actual inflation for any pension that doesn't keep pace with prices.
Two measures
| Measure | Starts with | Money in and out | Counts as success |
|---|---|---|---|
| Plan success rate | What you have invested today | Every stretch of your plan, on the solved timeline | Getting through the final year without running out |
| Classic Coast success rate | The classic Coast number | None | Reaching your FIRE number by R. The FIRE number stays fixed and doesn't change with each run. |
- History: one run for every starting year that has a full window, from today to the end of the plan for the first measure and from today to R for the second. Windows don't wrap around. The two measures can have different numbers of runs, and each says how many it used.
- If fewer than 30 full windows exist, no historical figure is shown for that measure, only the Monte Carlo figure, with the reason.
- Percentile bands (10th, 50th and 90th) are taken across all runs each year. Runs that failed count as zero from the year they ran out, so the bands don't only show survivors.
- For runs that fail, we report the age the money ran out and the average number of years short: the plan's final age minus the age it ran out, plus one. The worst starting year is reported too.
Monte Carlo
The 10,000 Monte Carlo runs are built from the same yearly data. Each run is stitched together from blocks of 5 consecutive years, each block starting at a random year and wrapping from the end of the data back to the start. Stocks, bonds and inflation for a year are always drawn together, so the way they moved together is kept. The random numbers come from the mulberry32 generator with a seed stored in your plan, so a shared link reproduces the same 10,000 runs.
With the Canada, UK or Australia preset, the history check still uses US stocks, bonds and inflation. The history card says so.
Default assumptions and why
| Assumption | Default | Why |
|---|---|---|
| Return after inflation | 5% | Popular Coast FIRE calculators default to anywhere from about 4% to 7% after inflation. 5% sits in the middle and leans cautious. The sensitivity table shows 3% to 7%. |
| Inflation, when you enter returns before inflation | 3% | A common long-run assumption. With it, 5% after inflation converts to 8.15% before inflation. |
| Withdrawal rate | 4% | From the Trinity study. For retirements longer than 40 years, Early Retirement Now's research suggests 3.25% to 3.5%, and the calculator has a one-click switch. |
| Fees | 0% | Returns you enter are before fees. Add your fund and advice fees here and they're taken out once. |
| Tax on withdrawals | 0% | Worth setting if most of your savings are in pre-tax accounts like a 401(k) or traditional IRA. |
| Plan runs to age | 95 | For couples, the younger partner's age. |
| Stocks and bonds in the history check | 90% / 10% | A design choice for the history check only. It's not a recommendation. |
The default example
The calculator opens with this example so you see a full result straight away. It uses the US preset and 2026 as its base year.
What the calculator shows on first visit
A 35-year-old with $300,000 invested, saving $15,000 a year, who wants to retire fully at 60 and spend $50,000 a year.
| Age today | 35 |
|---|---|
| Invested today | $300,000 |
| Saving per year | $15,000 |
| Retire fully at | 60 |
| Spending per year in retirement | $50,000 |
| Return after inflation | 5% |
| Withdrawal rate | 4% |
| FIRE number at 60 | $1,250,000 |
|---|---|
| Classic Coast number | $369,128 |
| Progress | 81.3% |
| Coast age | 41 |
| Coast year | 2032 |
| Balance at the Coast age | $504,057 |
Limitations
The model is simple on purpose. These are the things it leaves out or approximates.
- Taxes are one flat rate on withdrawals. There are no tax brackets, Roth conversions, required minimum distributions, Medicare surcharges or state taxes. Part-time pay and pensions are entered after tax.
- It doesn't model death or survivor benefits. Both partners are assumed to live to the end of the plan, and each income stream is paid in full until its stop age.
- Public pension amounts are what you enter. The calculator doesn't estimate them or adjust them for claiming early or late.
- Health insurance before 65 is a flat amount you enter, and it stops at 65 for every preset because it follows US Medicare. There are no premium estimates and no subsidy checks.
- Spending during saving years isn't modeled. Only the contribution is.
- The main result uses one steady return. Real returns vary from year to year, which is what the history check is for.
- Money moves once a year, never monthly.
- The history check uses US data only, including for the Canada, UK and Australia presets, and covers 1871 through 2025. Past markets are no guarantee of future ones.
- Country presets change labels and default ages. They don't add any country's tax or pension rules.
- Nothing here is investment, tax or legal advice. See our disclosures.
How we test it
The engine has automated tests built from hand-worked cases, including the five FIRE number cases and the default example above, part-time plans, couples crossing 65, pensions that don't keep pace with inflation, and the statistics behind the history check. Dollar amounts must match to within $1 and percentages to within 0.1 percentage points. The worked examples on this site are checked against the engine the same way, so if the engine changes, the tests fail until the examples are updated.
The history check was also rebuilt twice from scratch, from the raw Shiller data and the formulas on this page, without using our code. Year by year, across three test periods starting in 1929, 1966 and 2000, every balance matched ours to the cent.
Changes to the method
- October 1, 2026: first version. Engine version 1, historical data snapshot shiller-2026-09.
- October 2, 2026: engine version 2. On the Barista calculator, "needed today" now assumes you stop saving entirely, and minimum-income suggestions are rounded up to the dollar so the amount shown is always enough. Plans shared before this change are recalculated when opened.
Sources
- Cooley, Philip L., Carl M. Hubbard and Daniel T. Walz. "Retirement Savings: Choosing a Withdrawal Rate That Is Sustainable." AAII Journal, February 1998. Usually called the Trinity study.
- Jeske, Karsten (Early Retirement Now). The Safe Withdrawal Rate Series. earlyretirementnow.com/safe-withdrawal-rate-series
- Shiller, Robert J. Monthly US stock prices, dividends, earnings, consumer prices and long-term interest rates since 1871. shillerdata.com
- US Social Security Administration. Retirement benefits. www.ssa.gov/benefits/retirement
- US Social Security Administration. my Social Security (your personal benefit estimate). www.ssa.gov/myaccount
- Government of Canada. Canada Pension Plan. www.canada.ca/en/services/benefits/publicpensions/cpp.html
- Government of Canada. Old Age Security. www.canada.ca/en/services/benefits/publicpensions/old-age-security.html
- GOV.UK. The new State Pension. www.gov.uk/new-state-pension
- GOV.UK. Check your State Pension forecast. www.gov.uk/check-state-pension
- Services Australia. Age Pension. www.servicesaustralia.gov.au/age-pension
- FINRA Rule 2214, Requirements for the Use of Investment Analysis Tools. We borrow its disclosure format; the rule itself applies to broker-dealers. www.finra.org/rules-guidance/rulebooks/finra-rules/2214