DynamicGlidepathResult: {
    finalBalance: number;
    totalContributions: number;
    totalInterestEarned: number;
    totalMonths: number;
    startAge: number;
    endAge: number;
    glidepathMode: GlidepathMode;
    monthlyTimeline: MonthlyTimelineEntry[];
    moneyWeightedAnnualReturn: number;
    averageAnnualInterestRate: number;
    averageMonthlyReturn: number;
}

Comprehensive result object returned by the dynamic glidepath method. Contains final calculations, metadata, timeline data, and summary statistics.

Type declaration

  • finalBalance: number

    Total account balance at the end of the simulation period. Rounded to the nearest cent for precision.

  • totalContributions: number

    Sum of all monthly contributions made during the simulation period.

  • totalInterestEarned: number

    Total interest earned through compound growth during the simulation period.

  • totalMonths: number

    Total number of months simulated. Calculated as Math.ceil((endAge - startAge) * 12)

  • startAge: number

    Starting age from the input parameters.

  • endAge: number

    Ending age from the input parameters.

  • glidepathMode: GlidepathMode

    The glidepath mode that was used for this calculation.

  • monthlyTimeline: MonthlyTimelineEntry[]

    Detailed month-by-month timeline data. Each entry represents the state at the end of that month. Useful for creating charts and detailed analysis.

  • moneyWeightedAnnualReturn: number

    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.

  • averageAnnualInterestRate: number

    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).

  • averageMonthlyReturn: number

    Average monthly return rate across all months in the simulation. Simple arithmetic mean of all monthly return rates used.

Example

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