How do you find the total value of investment with how much he invests for how many years at what rate and the interests

To find the total value of an investment, you can use the formula for compound interest:

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

Where:
A = Total value of the investment
P = Principal amount (initial investment)
r = Annual interest rate (expressed as a decimal)
n = Number of times the interest is compounded per year
t = Number of years the investment is held

For example, if someone invests $10,000 for 5 years at an annual interest rate of 5%, compounded quarterly, the calculation would be:

P = $10,000
r = 0.05
n = 4 (quarterly compounding)
t = 5 years

A = $10,000(1 + 0.05/4)^(4*5)
A = $10,000(1 + 0.0125)^(20)
A = $10,000(1.0125)^20
A = $10,000(1.282)
A = $12,825

Therefore, the total value of the investment after 5 years would be $12,825.