The Compound Interest Formula, Step by Step
Compound interest means that interest is added to the balance, and the next round of interest is then calculated on the bigger amount. Over a few months the effect is small. Over a decade or two it becomes the main reason a balance grows faster than a straight line.
The formula looks technical, but it has only four inputs and needs nothing more than a calculator with a power key. This guide defines each part, works one example in full, shows how to rearrange the formula, and lists the slips that most often produce a wrong answer.
The formula and what each letter means
A = P × (1 + r/n)^(n × t)The balance after t years when interest compounds n times a year.
- A is the final balance, including the original deposit and all interest.
- P is the principal, the amount you start with.
- r is the annual interest rate written as a decimal, so 4% is 0.04.
- n is how many times per year interest is added: 1 for yearly, 4 for quarterly, 12 for monthly, 365 for daily.
- t is the number of years.
Read the formula from the inside out. The rate per period is r ÷ n. Each period multiplies the balance by (1 + r ÷ n). There are n × t periods in total, so that multiplication is applied n × t times, which is exactly what the exponent does.
Worked example: 5,000 at 4% for 10 years
Start with P = 5,000, r = 0.04 and t = 10. With yearly compounding, n = 1, so A = 5,000 × 1.0410. Since 1.0410 is about 1.480244, the balance is 7,401.22 and the interest earned is 7,401.22 − 5,000 = 2,401.22.
You can also build the answer one year at a time, which shows where the growth comes from:
| Year | Balance at end of year | Interest earned that year |
|---|---|---|
| 1 | 5,200.00 | 200.00 |
| 2 | 5,408.00 | 208.00 |
| 3 | 5,624.32 | 216.32 |
| 4 | 5,849.29 | 224.97 |
| 5 | 6,083.26 | 233.97 |
The interest in year 1 is 200.00 because it is 4% of the original 5,000. By year 5 it is 233.97, because the base has grown to 5,849.29. The five years of interest add up to 1,083.26, which matches 6,083.26 − 5,000.
Now change only the compounding. With monthly compounding, n = 12 and the periodic rate is 0.04 ÷ 12 = 0.003333. After 120 periods the balance is 5,000 × (1.003333)120 = 7,454.16, about 52.94 more than with yearly compounding. The rate is the same; interest simply joined the balance sooner.
Rearranging it to find the interest, the time or the rate
The same relationship can be turned around to answer the other questions people ask:
- Interest earned: A − P.
- Starting amount needed: P = A ÷ (1 + r/n)^(n × t).
- Time needed (yearly compounding): t = ln(A ÷ P) ÷ ln(1 + r), where ln is the natural logarithm key.
- Rate needed (yearly compounding): r = (A ÷ P)^(1/t) − 1.
Worked example, finding time: how long does 5,000 take to reach 8,000 at 4% a year? The ratio A ÷ P is 1.6. Then t = ln(1.6) ÷ ln(1.04) = 0.470004 ÷ 0.039221 = about 11.98 years. Checking whole years agrees: after 11 years the balance is 7,697.27, and after 12 years it is 8,005.16, so the target is crossed during year 12.
Common slips that give a wrong answer
- Entering the rate as 4 instead of 0.04. The formula needs a decimal. A rate of 4 would multiply the balance by 5 every year.
- Mixing units. If the rate is per year, t must be in years. For a 30-month deposit use t = 2.5, not 30.
- Rounding too early. Keep at least six decimal places in (1 + r/n) until the final step, or the answer can drift by a noticeable amount over many periods.
- Forgetting n. Dividing the rate by n but not multiplying the exponent by n, or the reverse, is the most frequent algebra error.
- Using a nominal rate as if it were the effective yearly rate. A 5% rate compounded monthly grows the balance by slightly more than 5% in a year. The difference is explained in APR vs APY.
To check your hand calculation, enter the same inputs into the compound interest calculator. If the results differ, compare the periodic rate and the number of periods first, since those two values are where most mismatches start.
This article is general education about how a formula works, not financial advice. Real accounts may have fees, variable rates, taxes or different compounding rules, so check the terms of any product you use.
- Compound Interest Calculator: Enter a starting balance, an interest rate and a term to see how money grows when interest is added to the balance. Add regular deposits or withdrawals to model a savings plan.
- Future Value Calculator: Enter a starting amount, how long it stays invested, an interest rate and how often it compounds. Add a regular deposit or withdrawal if you like, and see what the money grows to.
This article is general information, not professional advice. See our Disclaimer and Editorial Policy.
More articles
15-Year vs 30-Year Mortgage: Payment, Interest and Trade-offs
A shorter mortgage costs far less in interest but asks for a much higher monthly payment. A side-by-side example shows the size of both effects.
APR vs APY: What the Two Rates Really Tell You
APR and APY are two ways to quote the same rate. One ignores compounding and one includes it, and mixing them up can make a worse deal look better.
APR vs Interest Rate: What the Difference Means for a Loan
A loan with the lower interest rate is not always the cheaper loan. The APR folds in certain fees so offers can be compared, and a worked example shows how.