Start date as a supported structured string, millisecond timestamp, or Date.
End date in the same accepted forms. It must be strictly later than startDate.
Total period return. Numbers are decimal ratios; strings are percentage values.
The unrounded CAGR as a decimal ratio.
Calculate an investment's Compound Annual Growth Rate (CAGR).
Numeric total returns use decimal ratios. For example,
0.202represents20.2%. String total returns use percentage values, so"20.2%"and"20.2"both represent20.2%. A trailing percent sign is optional, and the complete trimmed string must be a finite JavaScript number. Scientific notation such as"2.02e1%"is accepted.The returned CAGR is a decimal ratio and is not rounded. The calculation uses:
CAGR = (1 + totalReturn)^(365 / durationInDays) - 1Usage:
Possible output: