
Nicholas H. answered 06/14/20
Master of Math and Research Software Developer
I think a good way to look at this is think of what happens after 1 year and then apply that 18 times. Similarly to figure out what happens after 1 year we can look at 1 month.
After 1 month we get 8/12 (remember compounding monthly on the 8 percent annual rate) percent interest on the 5000 dollar. So we would have 5000 plus the interest we get paid, so all together 5000 + 5000*(0.08/12) = 5000 * ( 1+ 0.0067)= 5033.33.
Okay, so that is one month, now the next month the same thing happens but we have interest on the 5033.33 since that is the amount in the account at the start of the month. So this time we get 5033.33 + 5033.33*(0.08/12).
Here we notice the pattern, namely that this is equal to 5000 * ( 1+ 0.0067) *( 1+ 0.0067)= 5000 * ( 1+ 0.0067)^2.
So after n many months we have 5000 * ( 1+ 0.0067)^n many dollars.
Cool, so how many months are in the question? Well 12 months in a year and 18 years in the question. All together we get 5000 * ( 1+ 0.0067)^(12*18) = 21,002.87.
If you want to fiddle with some other numbers https://www.thecalculatorsite.com/finance/calculators/compoundinterestcalculator.php
lets you change interest rates etc. and not have to fiddle with the formulas themselves.