## Compound Interest

Interest is the cost of borrowing money, and is a percentage of the borrowed amount, usually expressed an an annual percentage rate (APR). Interest applies both to consumers when they borrow money from banks in the form of car and home loans, and to banks when they borrow money from consumers in the form of savings accounts.
There are two main types of interest: simple and compound. For simple interest, the amount every year is based on the borrowed amount, which is called the principal. Car and home loans use simple interest, which was discussed in a previous section. For compound interest, the amount every year is based on both the principal and accumulated interest. Savings accounts use compound interest. When earning money from interest, the annual percentage rate is called an annual percentage yield (APY).
To calculate an account balance from a principal, APY, and number of years, divide the APY by 100 to get a decimal, multiply that by the principal to get the interest amount for the first year, and add that to the account balance. Then multiply the account balance by the interest rate to get the interest amount for the second year, and add that to the account balance. Repeat this process for the total number of years.
For example, you deposit \$100 into a savings account with 10% interest, and keep it there for 3 years. To calculate the account balance, do the following:
```percent = 10
decimal = 10 ÷ 100 = 0.1
years   = 3
principal                      = \$100.00
```
```1st year interest = \$100 × 0.1 =  \$10.00
1st year balance               = \$110.00
```
```2nd year interest = \$110 × 0.1 =  \$11.00
2nd year balance               = \$121.00
```
```3rd year interest = \$121 × 0.1 =  \$12.10
3rd year balance               = \$133.10
```
In the example above, interest is added to the account once per year. In reality, interest can be added at more frequent intervals, such as monthly or daily. This is called the compounding frequency, but that's beyond the scope of this section. For the exercises below, assume that interest is added to the account once per year.

### Exercise 1 of 6

You deposit \$1,000 into a savings account with 5% interest, and keep it there for 2 years. What is the account balance?

### Exercise 2 of 6

You deposit \$1,000 into a savings account with 5% interest, and keep it there for 4 years. What is the account balance? Round to the nearest cent.

### Exercise 3 of 6

To calculate compound interest quickly, use an exponent:
account balance = principal × (1 + interest rate)years
Using the original example above with a \$100 deposit and 10% interest:
account balance = \$100 × (1 + 0.1)3 = \$133.10
Now let's say you deposit \$1,000 into a savings account with 5% interest, and keep it there for 10 years. Using an exponent, what is the account balance?
In the address bar, use ^ for an exponent. For example, 2^3 is 2 to the 3rd power.

### Exercise 4 of 6

You deposit \$1,000 into a savings account with 5% interest, and keep it there for 20 years. What is the account balance?

### Exercise 5 of 6

You deposit \$1,000 into a savings account with 5% interest, and keep it there for 30 years. What is the account balance?

### Exercise 6 of 6

You travel back in time 500 years, deposit \$1 into a savings account with 5% interest, and return to the present time. What is the account balance?