Calculate the Compound Annual Growth Rate of an investment.
CAGR = (Ending value / Beginning value)1/years − 1.