Calculate how an investment grows over time with compound interest at various compounding frequencies.