Here is an example I found:
hp 12c (platinum) - Calculating a Compound Annual Growth Rate : HP Calculator : Educalc.net
Start with $1,000. In year one you get a 20% return ($1,200 at year end). In year two you go up another 10% ($1,320 at end of year two), down 15% in year three ($1,122), and up 30% in year four ($1,458.60 ending amount).
Multiply the returns for each year to get the total return.
1.20 * 1.10 * 0.85 * 1.30 = 1.4586 (or 45.86%)
Now, all we need is the CAGR. For two years we took the square root. For three years, you would take the cube root. For four years, that's the... quad root or something? I just use my trusty spreadsheet to do these calculations. Spreadsheets and some calculators take roots by using the inverse of the root as an exponent, so a square root is 1/2, a cube root is 1/3, etc. In this example, that's:
1.4586^(1/4), or 1.4586^0.25, which equals 1.099.
1.099 - 1= 0.099, or 9.9%.