How We Calculate

    Every calculator on FiscalWiki is transparent about its math and data. This page explains exactly how each tool works, where its numbers come from, and what assumptions we make.

    Compound Interest Calculator

    Open the calculator →

    What it does

    Projects how a starting balance plus a fixed monthly contribution grows over a number of years at a given annual return rate, compounded at a frequency you choose.

    Inputs

    • P — starting balance (principal)
    • C — monthly contribution
    • r — annual return rate (e.g. 8% = 0.08)
    • t — number of years
    • n — compounding periods per year (1/4/12/52/365)

    The math

    We iterate period-by-period rather than using a closed-form formula, so the chart and year-by-year table are exact. For each period i from 1 to n · t:

    balance_i = balance_{i-1} × (1 + r / n) + contribution_per_period
    
    where contribution_per_period = (C × 12) / n

    Monthly contributions are annualized (C × 12) then split evenly across the n compounding periods. This keeps the total amount you contribute each year constant regardless of compounding frequency.

    The closed-form equivalent is:

    FV = P × (1 + r/n)^(n·t)
       + (12C / r) × [(1 + r/n)^(n·t) − 1]

    Assumptions

    • Contributions are made at the end of each compounding period.
    • The return rate is constant. Real markets are not — see the S&P 500 tool for real-world variance.
    • No taxes, fees, or inflation are modeled.
    • "Interest earned" is just the final balance minus everything you contributed.

    Historical S&P 500 Calculator

    Open the calculator →

    What it does

    Takes a lump sum and a start year, then shows what that investment would have grown to by the end of the latest data year — both in raw dollars (nominal) and adjusted for inflation (real).

    Data sources

    • Annual total returns, 1928–2024. S&P 500 total return index (price change plus reinvested dividends). Sourced from the Robert Shiller online dataset and S&P Dow Jones Indices.
    • Annual inflation, 1928–2024. Year-over-year U.S. Consumer Price Index (CPI-U), U.S. Bureau of Labor Statistics.

    All figures are rounded to two decimals and hardcoded on the site, so the tool works without any external API calls.

    The math

    For each year y from your chosen start year through the last data year, we apply that year's return to the running nominal balance and that year's inflation to a running inflation factor:

    nominal_y     = nominal_{y-1}   × (1 + return_y)
    inflation_y   = inflation_{y-1} × (1 + cpi_y)
    
    real_y        = nominal_y / inflation_y

    Without inflation is the final nominal value — what your brokerage statement would show. With inflation is that final value divided by the cumulative inflation factor, so it's expressed in start-year dollars (the purchasing power you'd need back then to match it today).

    The headline stats at the bottom are:

    Total return = (nominal_final / amount) − 1
    CAGR         = (nominal_final / amount)^(1 / years) − 1
    Inflation    = (inflation_factor − 1)

    Assumptions

    • A single lump sum is invested at the start of the chosen year.
    • Dividends are reinvested (we use total return, not price return).
    • No taxes, trading fees, or fund expense ratios are subtracted.
    • You can't actually invest directly in the S&P 500 index; a real investor would use an ETF or index fund with a small tracking error.
    • Past performance doesn't predict the future — this is a retrospective tool, not a forecast.

    FIRE Calculator

    Open the calculator →

    What it does

    Computes your FIRE number (the portfolio size needed to cover your expenses indefinitely) and simulates how long it takes to reach it at your current savings rate.

    The math

    FIRE number comes from the safe withdrawal rate. At 4% (the Trinity Study default), your portfolio is expected to survive a 30-year retirement with high probability:

    FIRE_number = annual_expenses / withdrawal_rate
    
    e.g. $40,000 / 0.04 = $1,000,000  (the "25× rule")

    Time to FI is computed by simulating the portfolio month-by-month until the balance crosses the FIRE number:

    balance_m = balance_{m-1} × (1 + r/12) + monthly_contribution
    
    stop when balance_m ≥ FIRE_number

    Assumptions

    • Expenses stay constant in real terms.
    • Returns are constant; real markets vary and sequence-of-returns risk matters a lot early in retirement.
    • No taxes, healthcare costs, or Social Security are modeled.
    • The 4% rule is a starting point — some researchers suggest 3.25–3.5% for longer retirements.

    Savings Goal Calculator

    Open the calculator →

    What it does

    Solves the compound interest formula backwards: given a target amount, a timeline, a starting balance, and an expected return, it computes the monthly contribution required to hit the goal exactly.

    The math

    Starting from the standard future value formula with monthly compounding and monthly contributions:

    FV = P × (1 + r/12)^(12·t)
       + C × [(1 + r/12)^(12·t) − 1] / (r/12)

    Solving for the monthly contribution C:

    C = (FV − P × (1 + r/12)^(12·t)) × (r/12)
        ─────────────────────────────────────
                (1 + r/12)^(12·t) − 1

    When the return rate is zero, this collapses to C = (FV − P) / (12·t). If your starting balance alone grows past the goal, the required contribution is zero.

    Assumptions

    • Contributions are made at the end of each month.
    • The return rate is constant (same caveat as compound interest).
    • No taxes, fees, or inflation are modeled.

    Inflation Calculator

    Open the calculator →

    What it does

    Translates a dollar amount from one year into its equivalent purchasing power in another year using official U.S. CPI data.

    Data source

    Year-over-year U.S. Consumer Price Index for All Urban Consumers (CPI-U) from 1928–2024, published by the U.S. Bureau of Labor Statistics. The same series is used by the Historical S&P 500 calculator.

    The math

    We precompute a cumulative CPI index anchored at the first data year (1928 = 1), where each year's value is the product of (1 + cpiy) up to that year. The equivalent purchasing power of an amount is then just the ratio of the two index values:

    index_y = Π (1 + cpi_i)    for i = 1929 … y
    
    equivalent = amount × (index_endYear / index_startYear)

    This works in either direction — if the end year is earlier than the start year, the ratio is less than 1 and the result shrinks (your modern dollar was worth more in the past).

    Assumptions

    • CPI-U reflects the average urban consumer basket; individual experiences vary.
    • No forecasting — only historical years we have data for.
    • Figures are rounded to two decimals in the dataset.

    Spot an error in our math or data? Let us know — we want this page to be right.