Total account balance at the end of the simulation period. Rounded to the nearest cent for precision.
Sum of all monthly contributions made during the simulation period.
Total interest earned through compound growth during the simulation period.
Total number of months simulated. Calculated as Math.ceil((endAge - startAge) * 12)
Starting age from the input parameters.
Ending age from the input parameters.
The glidepath mode that was used for this calculation.
Detailed month-by-month timeline data. Each entry represents the state at the end of that month. Useful for creating charts and detailed analysis.
Money-weighted annual return (internal rate of return) — the single annual rate that would grow every deposit, from the date it was made, to the final balance. Answers "what return did my dollars actually earn?".
Unlike averageAnnualInterestRate, this weights each period's return by how much money was invested during it. On a glidepath that lowers returns with age, most of the money is invested in the later, lower-return years, so this is typically below the time-weighted figure. The two are equal when the return never changes.
Returns 0 when nothing was invested.
Time-weighted annual return (TWR) — the strategy's investment performance, independent of contribution timing.
Calculated as the annualized geometric mean of the period-by-period returns: (product of (1 + r_i))^(periodsPerYear / n) - 1.
For constant-rate strategies this reduces to the effective annual yield (EAR). For glidepath strategies this is the time-weighted average of the path of returns.
This is the metric to compare against benchmarks (e.g., the S&P 500 return over the same window).
Average monthly return rate across all months in the simulation. Simple arithmetic mean of all monthly return rates used.
const result: DynamicGlidepathResult = calculator.getCompoundInterestWithGlidepath(
25000, 1000, 30, 65, config
);
console.log(`Final balance: $${result.finalBalance.toLocaleString()}`);
console.log(`Total months: ${result.totalMonths}`);
console.log(`Money-weighted return: ${(result.moneyWeightedAnnualReturn * 100).toFixed(2)}%`);
Generated using TypeDoc
Comprehensive result object returned by the dynamic glidepath method. Contains final calculations, metadata, timeline data, and summary statistics.