Retirement Spending Simulator
Model retirement outcomes with deterministic projections and Monte Carlo analysis across 10,000 simulated lifetimes.
This tool projects portfolio balances from the current age through life expectancy, accounting for inflation-adjusted spending, Social Security, pensions, Required Minimum Distributions (RMDs), and taxes across three distinct account types. It answers the fundamental question: "Will my money last?"
Quick Start
Fill in the left panel with age, portfolio balance, expected return, spending, and income details. Hover over ? icons for guidance on each field.
Click Run Simulation (10,000 runs) to generate both a deterministic baseline and Monte Carlo probability bands.
Check the four metric cards at the top, then explore the Projection, Cash Flow, and RMD Schedule tabs for detailed breakdowns.
Use Save to export assumptions as a JSON file. Use Load to restore a previous scenario and compare outcomes.
How It Works
The simulator models two distinct life phases year by year:
| Phase | Years | What Happens |
|---|---|---|
| Accumulation | Current Age → Retirement Age | Portfolio grows via investment returns and annual contributions. No withdrawals occur. |
| Decumulation | Retirement Age → Life Expectancy | Spending begins. Income streams (SS, pension) offset needs. Remaining shortfall is drawn from the portfolio using a tax-aware withdrawal waterfall. |
Two projection methods run simultaneously:
- Deterministic: A single path using the exact expected return every year — no randomness. Useful as a baseline.
- Monte Carlo: 10,000 independent simulations, each with randomized annual returns. Produces probability bands (25th, 50th, 75th percentiles) showing the range of likely outcomes.
Input: Personal
- Current Age: Starting point for the simulation.
- Retire Age: The age at which contributions stop and spending begins. If Current Age ≥ Retire Age, the simulator enters "already retired" mode — contributions are disabled and the accumulation phase is skipped.
- Life Exp.: The simulation end point. Plan conservatively — approximately 30% of 65-year-olds will live past age 90.
Input: Portfolio & Accounts
Simple vs. Detailed Mode
Toggle between two input modes at the top of the Portfolio section:
- Simple: Enter a single total balance and contribution. The entire balance is treated as pre-tax for modeling purposes (conservative default).
- By Account Type: Split balances and contributions across three tax-treatment buckets for accurate RMD and tax modeling.
| Account Type | Tax Treatment | Subject to RMDs? |
|---|---|---|
| Pre-Tax (Traditional 401k/IRA) | Withdrawals taxed as ordinary income at the effective tax rate | Yes |
| Roth (Roth 401k/IRA) | Withdrawals are completely tax-free | No |
| After-Tax (Brokerage) | Only investment gains are taxed at the capital gains rate | No |
Other Portfolio Fields
- Expected Return (%): Average annual nominal return. Historical S&P 500 ≈ 10%; a balanced stock/bond portfolio ≈ 7%.
- Volatility / Std Dev (%): Annual standard deviation of returns. S&P 500 ≈ 15%; balanced portfolio ≈ 10%. Higher volatility widens the Monte Carlo bands.
- Inflation Rate (%): Applied to spending, Social Security, and COLA-adjusted pensions each year.
- Model RMDs: When enabled, forces minimum withdrawals from the pre-tax bucket starting at the specified RMD Start Age.
Input: Spending
- Retirement Spending ($): The desired annual (or monthly) spending in today's dollars. Use the Monthly / Annual toggle to set the entry frequency — the simulator converts to annual internally.
Spending is automatically inflation-adjusted each year of the projection. A $5,000/month budget today becomes approximately $6,720/month in 10 years at 3% inflation.
Input: Retirement Income
Social Security
- SS Amount ($/month): Expected monthly benefit in today's dollars.
- SS Start Age: The age at which benefits begin (62–70). Benefits are inflation-adjusted from the simulation start.
Pension
Choose between two payout types using the Monthly / Lump Sum toggle:
- Monthly Pension: Ongoing income starting at a specified age. Optionally enable COLA to inflation-adjust the pension from its start date.
- Lump Sum Pension: A one-time payment at a specified age. If "Roll into portfolio" is checked, the full amount enters the pre-tax bucket with no immediate tax. If unchecked, the effective tax rate is applied at receipt and the net amount enters the after-tax brokerage account.
Input: Taxes
- Filing Status: Controls the IRS provisional income thresholds used for Social Security taxation. Single and Married Filing Jointly have different threshold levels.
- Effective Tax Rate (%): Blended rate applied to ordinary income (pre-tax withdrawals, taxable SS, pension). Typical retiree range: 10–22%.
- Cap Gains Rate (%): Long-term capital gains rate applied to gains in the after-tax brokerage account. Most retirees: 15%. Low income: 0%. High income: 20%+.
Results: Projection Chart
Purpose: Visualize portfolio balance from the current age through life expectancy, showing both the deterministic baseline and Monte Carlo probability bands.
- Deterministic Line (solid blue): Single-path projection using the exact expected return every year. No randomness.
- Median / 50th Percentile (cyan): The middle outcome across 10,000 simulations — half of simulations ended higher, half ended lower.
- 25th / 75th Percentile Bands (shaded): The range containing the middle 50% of all simulated outcomes.
Results: Cash Flow Chart
Purpose: Show exactly where money comes from and where it goes each year. Uses a "Perfect Mirror" design where total sources always equal total uses.
Reading the Chart
Left Y-Axis (Stacked Bars):
- Upward bars (Sources): Working Income, Social Security, Pension, Lump Sum, Portfolio Withdrawal
- Downward bars (Uses): Spending, Taxes Paid, Portfolio Deposit / Reinvestment
Right Y-Axis (Dashed Line): Portfolio balance trajectory for context.
What is "Portfolio Deposit / Reinvestment"?
When RMDs force a larger withdrawal than needed for spending, the after-tax surplus is reinvested into the after-tax brokerage account. This appears as a downward (use) bar to maintain the perfect balance between sources and uses.
Results: RMD Schedule
Purpose: Display a year-by-year table of Required Minimum Distributions from the pre-tax account, based on the IRS Uniform Lifetime Table III.
| Column | Description |
|---|---|
| Age | The year of the distribution |
| Year-Start Balance | Prior year-end pre-tax balance used for the RMD calculation |
| Distribution Period | IRS divisor from the Uniform Lifetime Table for that age |
| RMD Amount | Balance ÷ Distribution Period |
| Effective Rate | RMD as a percentage of the starting balance |
The first RMD year is highlighted in green for quick identification.
Results: Metric Cards
Four summary cards appear above the chart tabs. Each card is color-coded green (success), yellow (warning), or red (danger) based on the result.
| Metric | What It Measures | Green / Yellow / Red |
|---|---|---|
| Success Rate | Percentage of 10,000 Monte Carlo runs where the portfolio lasted through life expectancy | ≥ 80% / ≥ 50% / < 50% |
| Years Funded | Number of retirement years the median portfolio balance remains above zero, shown as "X / Y" where Y is total years needed | ≥ 90% / ≥ 60% / < 60% |
| Shortfall Age | The first age at which the 25th percentile (pessimistic) balance hits zero — the earliest stress point. "None" if the portfolio survives in all scenarios. | None / — / Age shown |
| Median Ending Balance | The 50th percentile portfolio balance at life expectancy | > $0 / — / $0 |
Accumulation Phase
During working years (Current Age to Retirement Age), each account bucket grows independently via investment returns and receives its designated annual contribution.
Mathematical Details: Compound Growth
Each year, each account bucket is updated as:
- $B_t$: Balance at end of year $t$.
- $B_{t-1}$: Balance at end of the prior year.
- $r$: Annual expected return (e.g., 0.07 for 7%).
- $C$: Annual contribution to that specific bucket.
The after-tax brokerage account also tracks cost basis — the cumulative sum of contributions (not growth). This is used later to determine what portion of a withdrawal is taxable gain vs. return of principal.
Decumulation Phase
Each retirement year follows a specific sequence: calculate income streams, inflate spending, compute RMDs, grow all buckets, then execute the withdrawal waterfall to fund any remaining shortfall.
Income Streams
Mathematical Details: Social Security & Pension
Social Security begins at the specified start age and is inflation-adjusted annually from the simulation start:
- $SS_y$: Annual Social Security income in year $y$.
- $SS_{\text{monthly}}$: Monthly benefit entered in today's dollars.
- $i$: Annual inflation rate.
- $y$: Years since simulation start (not since retirement).
Monthly Pension (with optional COLA) inflates from the pension start date:
- $P_y$: Annual pension income at the given age.
- $P_{\text{monthly}}$: Monthly pension entered in today's dollars.
- If COLA is disabled, the multiplier is 1 (no inflation adjustment).
Inflation-Adjusted Spending:
Example: A $60,000/year budget today becomes approximately $80,635 in 10 years at 3% inflation.
Withdrawal Waterfall
After income streams (Social Security, pension) offset spending, any remaining need is funded from the portfolio in a strict tax-optimized priority order:
Mathematical Details: Gross-Up & Gain Ratio
Pre-Tax Gross-Up: To net a specific dollar amount from a pre-tax account, the gross withdrawal must account for taxes:
- NetNeed: The after-tax dollars required to cover remaining spending.
- TaxRate: The effective tax rate on ordinary income.
Example: To net $10,000 at a 15% tax rate, the gross withdrawal is $10,000 / 0.85 = $11,765.
After-Tax Brokerage Gain Ratio: Only the gain portion of a brokerage withdrawal is taxable:
- GainRatio: Proportion of the account that represents unrealized gains (0 to 1).
- CostBasis: Cumulative contributions (original invested dollars, not growth).
- CapGainsRate: Long-term capital gains tax rate.
Example: A $200,000 brokerage account with $120,000 cost basis has a gain ratio of 0.40. At a 15% cap gains rate, the effective tax rate on withdrawals is 6%.
Required Minimum Distributions (RMDs)
The IRS requires annual minimum withdrawals from pre-tax retirement accounts starting at a specified age (73 for those born 1951–1959; 75 for those born 1960+). The simulator uses the Uniform Lifetime Table (Table III), effective 2022+.
Mathematical Details: RMD Calculation
- Prior Year-End Balance: The pre-tax account balance at December 31 of the prior year.
- Distribution Period: A divisor from the IRS table that decreases with age, forcing larger withdrawals over time.
Sample Distribution Periods:
| Age | Period | Effective Rate |
|---|---|---|
| 73 | 26.5 | 3.8% |
| 75 | 24.6 | 4.1% |
| 80 | 20.2 | 5.0% |
| 85 | 16.0 | 6.3% |
| 90 | 12.2 | 8.2% |
| 95 | 8.9 | 11.2% |
RMD Surplus Handling: If the after-tax value of the RMD exceeds the net spending need, the surplus is reinvested into the after-tax brokerage account (with cost basis updated). This prevents forced over-withdrawal from distorting the projection.
Social Security Taxation
Up to 85% of Social Security benefits may be subject to federal income tax, depending on "provisional income." The IRS thresholds have not changed since 1983/1993 and are not inflation-indexed.
Mathematical Details: IRS Provisional Income Formula
Step 1 — Calculate Provisional Income:
- Other Taxable Income: Pre-tax withdrawals + pension income (Roth withdrawals and return of after-tax basis are excluded).
- SS Benefits: Total annual Social Security benefits.
Step 2 — Apply Thresholds:
| Filing Status | Lower Threshold (50% tier) | Upper Threshold (85% tier) |
|---|---|---|
| Single | $25,000 | $34,000 |
| Married Filing Jointly | $32,000 | $44,000 |
Step 3 — Determine Taxable Amount:
- Below lower threshold: $0 of SS is taxable.
- Between thresholds: Taxable = lesser of 50% of SS benefits or 50% of excess over the lower threshold.
- Above upper threshold: Base amount from the 50% tier, plus 85% of excess over the upper threshold.
The IRS caps the taxable amount at 85% of total benefits regardless of income level.
Monte Carlo Simulation
The Monte Carlo engine runs 10,000 independent simulations, each with randomized annual returns. This produces a probability distribution of outcomes rather than a single prediction.
How to Interpret the Results
- 75th Percentile (upper band): 25% of simulations ended above this line — an optimistic but plausible outcome.
- 50th Percentile / Median: The central tendency — half of simulations ended higher, half lower.
- 25th Percentile (lower band): 75% of simulations ended above this line — a pessimistic but plausible outcome.
- Success Rate: The percentage of all 10,000 runs where the portfolio balance remained above $0 at life expectancy.
Mathematical Details: Log-Normal Returns & Volatility Drag
Random Return Generation (Box-Muller Transform):
Two uniform random numbers $U_1, U_2 \in (0, 1)$ are transformed into a standard normal variable:
This is then converted to a log-normal return to ensure returns cannot fall below -100%:
- $r$: Expected annual nominal return (e.g., 0.07).
- $\sigma$: Annual standard deviation / volatility (e.g., 0.12).
- $\mu_{\log}$: Log-space mean, adjusted downward by $\frac{\sigma^2}{2}$ to correct for volatility drag.
- $R_{\text{year}}$: The randomized annual return for one simulation year.
Volatility Drag Explained
The $-\frac{\sigma^2}{2}$ term is the mathematical expression of volatility drag — the phenomenon where variance reduces geometric (compounded) returns below arithmetic (average) returns.
Example: A portfolio with 7% arithmetic return and 12% volatility:
This is why the deterministic line (which uses the full 7%) always appears higher than the Monte Carlo median (which compounds at approximately 6.3%).
Percentile Calculation
After all 10,000 iterations complete, balances at each age are sorted and percentiles are extracted via linear interpolation:
- $\text{idx}$: $(n - 1) \times k$, where $n$ is the number of simulations and $k$ is the desired percentile (e.g., 0.25).
- $\lfloor \cdot \rfloor$, $\lceil \cdot \rceil$: Floor and ceiling functions.
- frac: The fractional part of idx, used for interpolation between adjacent sorted values.
Saving & Loading Scenarios
Scenarios are saved as JSON files to the local file system — no server or account required.
- Save: Click the save button, enter a scenario name, and a
.jsonfile is downloaded containing all input field values. - Load: Click the load button, select a previously saved
.jsonfile, and all inputs are restored — including toggle states, checkboxes, and account detail mode.
Glossary
- Accumulation Phase
- The period from the current age to retirement age during which contributions are made and the portfolio grows without withdrawals.
- After-Tax Brokerage Account
- A taxable investment account where contributions are made with after-tax dollars. Only investment gains are taxed upon withdrawal, at the capital gains rate.
- Box-Muller Transform
- A mathematical method for generating normally distributed random numbers from uniformly distributed random numbers. Used to produce randomized annual returns in the Monte Carlo simulation.
- COLA (Cost of Living Adjustment)
- An annual increase to a payment (e.g., pension) to keep pace with inflation.
- Cost Basis
- The original amount invested in an after-tax account. When withdrawing, only the amount exceeding the cost basis (the gain) is subject to capital gains tax.
- Decumulation Phase
- The period from retirement age through life expectancy during which the portfolio is drawn down to fund spending.
- Deterministic Projection
- A single-path forecast using the exact expected return every year with no randomness. Serves as a baseline for comparison.
- Distribution Period
- The IRS-defined divisor used to calculate RMDs. Decreases with age, resulting in progressively larger required withdrawals.
- Effective Tax Rate
- A blended, flat rate representing the overall tax burden on ordinary income. Simpler than modeling marginal brackets but sufficient for planning purposes.
- Inflation Rate
- The annual rate at which purchasing power decreases. Applied to spending, Social Security, and COLA-adjusted pensions.
- Log-Normal Distribution
- A probability distribution where the logarithm of the variable is normally distributed. Used for modeling investment returns because it prevents returns from falling below -100%.
- Monte Carlo Simulation
- A technique that runs thousands of randomized scenarios to produce a probability distribution of outcomes, rather than a single deterministic prediction.
- Percentile
- The value below which a given percentage of observations fall. The 25th percentile means 25% of simulated outcomes were lower.
- Pre-Tax Account
- A tax-deferred retirement account (Traditional 401k/IRA) where contributions reduce taxable income but withdrawals are taxed as ordinary income. Subject to RMDs.
- Provisional Income
- An IRS calculation used to determine how much Social Security is taxable: other taxable income plus 50% of SS benefits.
- RMD (Required Minimum Distribution)
- The minimum annual withdrawal the IRS requires from pre-tax retirement accounts starting at age 73 or 75, depending on birth year.
- Roth Account
- A retirement account (Roth 401k/IRA) funded with after-tax dollars. Qualified withdrawals are completely tax-free and not subject to RMDs in this model.
- Success Rate
- The percentage of Monte Carlo simulations where the portfolio balance remained above $0 at life expectancy.
- Volatility (Standard Deviation)
- A measure of how much annual returns vary from the average. Higher volatility means wider swings in portfolio value and greater uncertainty in outcomes.
- Volatility Drag
- The mathematical reduction in compounded (geometric) returns caused by return variance. A portfolio averaging 7% with 12% volatility compounds closer to ~6.3%.
- Withdrawal Waterfall
- The priority order in which accounts are tapped during retirement: Pre-Tax (RMD first) → After-Tax Brokerage → Roth. Designed to minimize lifetime tax burden.