The formula is (ending / beginning) ^ (1 / years) - 1. Growing $50,000 to $86,000 over seven years gives (86,000 / 50,000) ^ (1/7) - 1 = 8.05% a year.
CAGR smooths away the path entirely, which is its use and its danger. Two strategies with identical 8% CAGR can have maximum drawdowns of 12% and 55%. Always publish CAGR beside max-drawdown and a volatility figure.
Note also that CAGR is not the arithmetic average of annual returns. A +50% year followed by a -50% year averages 0% but compounds to -13.4%, a CAGR of -6.9%. The gap between arithmetic and compound return widens with volatility, which is the arithmetic reason volatility drag matters.
Related: total-return, max-drawdown, time-weighted-return, volatility-drag, sharpe-ratio