Inspect the Arithmetic — Inflation-Adjusted Investment Calculator
Version 1.0
Last updated: March 2026
Transparent arithmetic is the operating system of this calculator.
This document publishes the formulae, computational structure, and assumptions used to generate the outputs displayed on the calculator page.
No opinions. No hidden assumptions. Just arithmetic.
Purpose
This calculator estimates the future value of an investment in both nominal (future dollars) and real (inflation-adjusted, today's dollars)
terms. It uses a starting balance, ongoing contributions, a time horizon in years, an expected nominal annual return, and an assumed annual
inflation rate. The primary output is the real (inflation-adjusted) ending balance; the nominal balance is shown for comparison.
It is an educational tool only. It does not replicate a full financial plan, tax system, or specific account rules. It does not apply taxes,
fees, contribution limits, or asset allocation constraints.
Definitions
Let:
- S = starting amount (today's dollars)
- C = contribution per period, entered in today's dollars
- Y = time horizon in years (1–60)
- rnom = expected nominal annual return (percent, converted to decimal)
- π = assumed annual inflation rate (percent, converted to decimal)
- m = number of contribution periods per year (12 for monthly, 1 for yearly)
- rreal,annual = real annual return (after inflation)
- rreal,period = real return per contribution period
- t = period index, from 0 to T − 1, where T = m × Y
- Bt = real (inflation-adjusted) balance at the end of period t
- NominalFinal = nominal (future dollars) ending balance
- RealFinal = real (today's dollars) ending balance
Core Equations
1. Real Return from Nominal Return and Inflation
The calculator first converts the user-supplied nominal annual return and inflation rate into a real annual return:
rreal,annual = (1 + rnom) / (1 + π) − 1
If π ≤ −100% (an edge case guard), the calculator skips this adjustment and uses rnom directly.
2. Period Return
Contributions can be monthly or yearly, but compounding is always modeled at the real annual rate translated into the matching period rate:
m = 12 (monthly contributions) or 1 (yearly contributions)
rreal,period =
{ (1 + rreal,annual)1/12 − 1, if m = 12;
rreal,annual, if m = 1. }
3. Period-by-Period Simulation (Real Dollars)
The calculator runs a simple simulation in real (today's) dollars over T = m × Y periods. Contributions are entered in today's dollars and
treated as fixed real amounts; inflation is accounted for through the real return.
Let B0 = S. For each period t from 0 to T − 1:
1. If contributions are at the beginning of the period:
Bt ← Bt + C
2. Apply real growth for the period:
Growtht = Bt × rreal,period
Bt ← Bt + Growtht
3. If contributions are at the end of the period:
Bt ← Bt + C
The calculator tracks cumulative contributions in real dollars as the sum of all C applied over the simulation, and real growth as
RealFinal − S − (total real contributions).
4. Real and Nominal Final Balances
After T periods, the real ending balance is simply the simulated balance:
RealFinal = BT
The nominal ending balance is derived by re-applying the inflation assumption over the whole horizon:
InflationFactor = (1 + π)Y
NominalFinal = RealFinal × InflationFactor
Schedule and Breakdown
The calculator builds a real (inflation-adjusted) accumulation schedule from the same period-by-period simulation:
-
A yearly schedule records, for each year y from 0 to Y, the year's total real contributions, real growth, and ending real balance.
Year 0 is the starting point (S, with zero contributions and growth).
-
When the "Monthly" view is selected and contributions are monthly, a monthly schedule records each period's contribution, growth, and ending
real balance.
-
The on-page breakdown bar uses the final real balance and decomposes it into starting amount, total real contributions, and real growth.
Inputs, Parsing, and Edge Cases
-
All numeric inputs are read directly from the form fields. NaN or non-finite values are treated as 0 for amounts and as 0% for rates,
except that the time horizon is clamped between 1 and 60 years and rounded to the nearest whole year.
-
Contributions are interpreted in today's dollars. They are not explicitly inflated as separate nominal amounts; instead, the simulation
runs entirely in real terms via the real return rreal,period.
-
This simplified version does not subtract taxes, fees, or account-level frictions. It does not model contribution limits, withdrawals,
or different account types.
-
Extremely high or low return and inflation inputs may produce unrealistic outputs but are allowed for "what if" scenarios.
Implementation Notes
-
The arithmetic described above is implemented in the JavaScript function
simulateInvestment() inside
/calculators/investment-calculator-inflation-adjusted/script.js. The on-page results (headline figures, breakdown, schedule,
CSV export) read values directly from that function's return object.
-
Real and nominal balances are computed once per input change; the accumulation schedule is reconstructed from the same simulated path.
-
All calculations use JavaScript's standard floating-point arithmetic. Display formatting (e.g., rounding to whole dollars) happens only at
the presentation layer.
If any discrepancy is identified between this documentation and the live calculator behavior, the JavaScript engine
(simulateInvestment() in script.js) is the source of truth. This page will be updated to match the engine.