Suppose Mary deposits $200 at the end of each month for 30 years into an account that pays 5% interest compounded monthly. How much total money will she have in the account at the end?

i = .05/12 = .001466666...

n= 30*12 =360

amount = 200( 1.00146666..^360 - 1)/.00416666
= 166451.75

To calculate the total amount of money Mary will have in the account at the end of 30 years, we need to use the formula for compound interest:

A = P(1 + r/n)^(nt)

Where:
A = the future value of the investment/loan, including interest
P = the principal investment amount (the initial deposit or balance)
r = the annual interest rate (expressed as a decimal)
n = the number of times that interest is compounded per year
t = the number of years the money is invested or loaned for

In this case, Mary deposits $200 at the end of each month, so her principal investment amount is $200. The annual interest rate is 5%, which we convert to a decimal (r = 0.05). Interest is compounded monthly, so n = 12. She will be investing for 30 years, so t = 30.

Now we can plug in these values into the formula and calculate the future value:

A = 200(1 + 0.05/12)^(12*30)

To simplify the calculation, we can first divide the annual interest rate by 12:

A = 200(1 + 0.00417)^(12*30)

Next, raise the expression in brackets to the power of (12*30):

A = 200(1.00417)^(360)

Finally, calculate the future value:

A ≈ 200 * 3.243

A ≈ 648.6

Therefore, at the end of 30 years, Mary will have approximately $648.6 in the account.