# Math Help - Interest Formula Help Please!!

1. ## Interest Formula Help Please!!

Hey,

I forgot the formula for interest.

The formula sloves this:
Let say you got a savings account and you got $1,000 in it. The interest is 5% every month (i wish) so the formula is 1000 * 1.05 = B B= Balance But next month it will be 1050 * 1.05 = B Can you guys give me the formula for this. If i remember right it was like startbalance [1 + interest ^ 2) * month] = newbalance But that is wrong i think Thanks for you help. EDIT: I think it is this: StartBalance * (1+I)^ number of years 2. That is correct just don't square the interest. NewBalance = 1000(1+0.05)^M Where M is the number of months. 3. Originally Posted by topher0805 That is correct just don't square the interest. NewBalance = 1000(1+0.05)^M Where M is the number of months. No, because if you do it that way it will always multiply by the$1,000. The formula i was looking for for every month it will multiply by the last month balance.

4. Originally Posted by hechen
No, because if you do it that way it will always multiply by the \$1,000. The formula i was looking for for every month it will multiply by the last month balance.
Using my formula:

After Month 1: 1050

Month 2: 1102.5

Month 3: 1157.625

What is wrong with this? This formula will give you the correct balance after any month.

5. Originally Posted by topher0805
Using my formula:

After Month 1: 1050

Month 2: 1102.5

Month 3: 1157.625

What is wrong with this? This formula will give you the correct balance after any month.
Because it for JAVA Programming

6. Are you familiar with the compound interest formula? The general formula is:

$C = P(1 + i)^n$

Where P is the principal, i is the interest in decimal form and n is the amount of periods.

7. Originally Posted by hechen
Because it for JAVA Programming
That doesn't change the formula.

8. Originally Posted by hechen
Because it for JAVA Programming
Originally Posted by topher0805
Using my formula:

After Month 1: 1050

Month 2: 1102.5

Month 3: 1157.625

What is wrong with this? This formula will give you the correct balance after any month.
Yeah you gave me that.
In JAVA i need a formula.

Thanks for confirming my EDIT up there.

9. Originally Posted by hechen
Yeah you gave me that.
In JAVA i need a formula.

Thanks for confirming my EDIT up there.

amount = principal * Math.pow( 1.0 + rate, year );

Something like that...

10. Originally Posted by topher0805
amount = principal * Math.pow( 1.0 + rate, year );

Something like that...
I seen like you know JAVA too.
Do you remember the power symbol for JAVA i kinda forgot about it

11. Originally Posted by hechen
I seen like you know JAVA too.
Do you remember the power symbol for JAVA i kinda forgot about it
You don't need it. Just use Math.pow and use the format like I showed.

12. Originally Posted by topher0805
You don't need it. Just use Math.pow and use the format like I showed.
Thanks!

There is my code if you wan to see it:

import java.io.*;
import java.text.NumberFormat;

public class Interest {

public static void main(String args[]) throws IOException {

double Principal, Rate, Month, Balance;
NumberFormat currency = NumberFormat.getCurrencyInstance();

Rate = 5 / 100.00; /*To change the rate change the 5 to any other number.*/
System.out.print("How many months? ");
System.out.println("------------------------------");

Balance = Principal * Math.pow( 1.0 + Rate, Month );