I want to solve interest rate calculation of a Bank.

But i don't know about the algorithm of interest rate calculation for bank.

suppose one customer has a account. ha has 5000US in his account for five month.

so how can i calculate the total interest of 5 months (suppose, monthly interest rate is 0.05 )

Please if any body know about interest calculation of a bank help me...