After reading (and attempting the solutions offered in some) several articles about SQL and CAGR, I have reached the conclusion that none of them would stand testing in a real-world environment. For one thing, the SQL queries offered as examples are overly complex or don't use the correct math for calculating proper CAGR. Since most DBAs don't have an MBA or Finance degree, let me help.
The correct equation for calculating Compound Annual Growth Rate (as a percentage) is:
Some key points about CAGR:
- The compounded annual growth rate (CAGR) is one of the most accurate ways to calculate and determine returns for anything that can rise or fall in value over time.
- Investors can compare the CAGR of two alternatives to evaluate how well one stock performed against other stocks in a peer group or a market index.
- The CAGR does not reflect investment risk.