This graphic from NY Times shows how well your investment would do depending on which year you invested (left axis) and how many years you invested (the top axis).
For example, if you invested in 1990 for 10 years you made 10% annual return but if you held it for 20 years you didn’t keep up with inflation. If you invested in 2000 — sorry about that.