The Compound Interest Formula, With Monthly Deposits
The compound interest formula explained with worked examples: how often interest is added, monthly deposits, the Rule of 72 and the cost of starting late.
By TheTextKit TeamPublished

A table of three results for the compound interest calculator. 6,000 scenarios were compared with Python. 1,891 of them were compared with exact fractions and the rest with 120 digit decimals. There were 0 differences.
The compound interest formula is A = P × (1 + r/n)^(n×t). A is the final balance, P the starting amount, r the yearly rate as a decimal, n how many times a year interest is added and t the number of years. So 10,000 at 5% for 10 years, compounded yearly, grows to 10,000 × 1.05¹⁰ = 16,288.95. This guide shows what changes when interest is added more often, how monthly deposits fit in, and how long it takes to double. We also checked our calculator on 6,000 scenarios. This is for information, not financial advice.
What compound interest is
Compound interest is interest on interest. The Consumer Financial Protection Bureau defines it as earning interest on the money you've saved and on the interest you earn along the way. Its example is 1,000 at 5%, compounded once a year: 1,050 after the first year and 1,102.50 after the second. The extra 2.50 in year two is interest on the first year's 50 of interest.
Investor.gov, the SEC's site for investors, uses the same idea with a smaller number. 100 at 5% becomes 105 after one year and 110.25 after two. Our calculator gives exactly 1,102.50 and 110.25 for those two examples, which is a quick test you can run yourself.
The compound interest formula in practice
The formula multiplies the balance by (1 + r/n) once for every time interest is added. There are n × t such times, so the multiplier is raised to that power. With r = 5% and n = 1 you multiply by 1.05 each year. With n = 12 you multiply by 1 + 0.05/12 each month, which is about 1.00417.
Take monthly compounding by hand. Here n is 12 and t is 10, so n × t is 120 months. The multiplier 1 + 0.05/12 is about 1.0041667, and raised to the 120th power it is about 1.647009. Times 10,000, the compound interest formula gives 16,470.09. How much does the frequency matter? Here is 10,000 at 5% for 10 years:
| Interest is added | Final balance | Effective annual rate |
|---|---|---|
| Yearly | 16,288.95 | 5.00% |
| Quarterly | 16,436.19 | 5.0945% |
| Monthly | 16,470.09 | 5.1162% |
| Daily | 16,486.65 | 5.1267% |

A table comparing 10,000 at 5% for 10 years. Interest added yearly gives 16,288.95 with an effective annual rate of 5.00%. Quarterly gives 16,436.19 and 5.0945%. Monthly gives 16,470.09 and 5.1162%. Daily gives 16,486.65 and 5.1267%.
The third column is the effective annual rate, (1 + r/n)ⁿ − 1, the yearly growth you really get. According to the CFPB, a higher compounding frequency, a higher interest rate or adding to your principal can make savings grow faster. Look at how modest the first of those is: going from yearly to daily adds 197.70 over ten years. Rate and time do the heavy lifting.
Adding a monthly deposit
Most people don't invest once. They add money every month, and each deposit then starts its own compounding. In the calculator a deposit is made at the end of each month by default. 200 a month at 6%, with interest added monthly for 10 years, gives 32,775.87. You paid in 24,000, so 8,775.87 is interest.
If you start with 10,000 as well, the same 200 a month at 6% for 10 years gives 50,969.84, of which 16,969.84 is interest.
Start or end of the month
When in the month you deposit matters a little. Paying at the start of each month gives each deposit one extra month of interest. For the same 200 a month at 6% for 10 years:
| Deposits are made | Final balance |
|---|---|
| At the end of each month | 32,775.87 |
| At the start of each month | 32,939.75 |

A table comparing the timing of 200 a month deposits at 6% for 10 years with interest added monthly. Deposits at the end of each month give a final balance of 32,775.87. Deposits at the start of each month give 32,939.75.
The two answers can be checked by hand. The end-of-month figure is 200 × ((1.005¹²⁰ − 1) / 0.005), and the start-of-month figure is that times 1.005. Doing so gave 32,775.87 and 32,939.75, the same as the calculator.
That check was not a formality. Our first version added the start-of-month deposit before the interest for the previous month, which let a deposit earn interest a month too early, and it gave 33,102.63. The hand formula showed the mistake, and we fixed it. The rule now is that interest is added first when both fall on the same date.
How long does it take to double?
The Rule of 72 says to divide 72 by the yearly rate to estimate the years it takes to double. Investor.gov describes the same shortcut. How close is it? Here it is against the exact answer for yearly compounding:
| Yearly rate | 72 ÷ rate | Exact years |
|---|---|---|
| 2% | 36 | 35.0 |
| 6% | 12 | 11.9 |
| 10% | 7.2 | 7.3 |
| 12% | 6 | 6.1 |

A table comparing the Rule of 72 with the exact doubling time for yearly compounding. At 2% the rule gives 36 years and the exact answer is 35.0. At 6% it gives 12 and 11.9. At 10% it gives 7.2 and 7.3. At 12% it gives 6 and 6.1.
The rule is best between about 6% and 10%, and drifts a little further away at low rates. It is a sanity check, not a substitute for the formula.
The cost of starting late
Time beats almost everything else. The table shows 200 a month at 6%, with interest added monthly, for different lengths of time:
| Years | Money you put in | Final balance |
|---|---|---|
| 10 | 24,000 | 32,775.87 |
| 20 | 48,000 | 92,408.18 |
| 30 | 72,000 | 200,903.01 |
| 40 | 96,000 | 398,298.15 |

A table of 200 a month at 6% with interest added monthly. After 10 years you have put in 24,000 and have 32,775.87. After 20 years, 48,000 and 92,408.18. After 30 years, 72,000 and 200,903.01. After 40 years, 96,000 and 398,298.15.
Look at the jump from 30 to 40 years. You pay in 24,000 more, and the balance grows by 197,395.14. The last ten years add more than the first twenty together. Rate matters too: over 30 years the same deposits end at 166,451.73 at 5%, 200,903.01 at 6%, 243,994.20 at 7% and 298,071.89 at 8%. These are what-ifs, not forecasts, because real returns vary from year to year.
Three mistakes with the compound interest formula
Most wrong answers come from the inputs, not the arithmetic.
- Typing the rate as 5 instead of 0.05. The formula needs a decimal. With 5, 10,000 over 10 years becomes 10,000 × 6¹⁰, which is over 600 billion.
- Mixing months and years. If n counts times per year, t must be in years. Use 12 and 10, not 12 and 120.
- Comparing a rate with a yield. A bank that advertises 5.12% APY and one that offers 5% compounded monthly are offering the same growth, because 5.1162% rounds to 5.12%. Compare effective annual rates, not headline ones.
How we checked the calculator
We wrote a second version in Python that lists every interest date and every deposit date, sorts them by time and applies them in order. It uses exact fractions and 120 digit decimals, and its structure differs from the calculator's tick-by-tick loop.
We compared the two on 6,000 random scenarios. They covered all six frequencies from yearly to daily, both deposit timings, terms from 1 month to 100 years and rates from 0 to 100%. Starting amounts went up to 10 million and monthly deposits up to 10,000. For 1,891 of them, the ones with shorter terms, Python's Fraction type gave an exact reference. The final balance, the total deposits and the effective annual rate all matched in every scenario, so there were 0 differences. The check also showed that the calculator needs 60 digits of precision, not 30, for absurd cases such as 100 years at 100%.
Limits
The calculator assumes a fixed rate and the same deposit every month, and it adds interest on a regular schedule. Real accounts can differ: they may credit interest on set dates, use a day count, change the rate or round at each step. It includes no taxes, fees or inflation. Amounts take up to two decimals, rates up to four, and terms run from 1 month to 100 years.
Frequently asked questions
What is the compound interest formula?
For a single deposit, the balance is the starting amount times (1 + r/n) to the power n times t. Here r is the yearly rate as a decimal, n is how many times a year interest is added and t is the number of years. For example, 10,000 at 5% compounded yearly for 10 years is 10,000 x 1.05^10, or 16,288.95.
Does compounding more often make a big difference?
A small one. 10,000 at 5% for 10 years gives 16,288.95 compounded yearly and 16,470.09 compounded monthly. The rate and the time matter far more than the frequency.
What is the effective annual rate?
It is the yearly growth you actually get after compounding. A rate of 5% compounded monthly has an effective annual rate of about 5.1162%, because each month's interest earns interest too. It is also called the annual percentage yield, APY.
How does the Rule of 72 work?
Divide 72 by the yearly rate to estimate the years it takes money to double. At 6% that is 12 years, and the exact answer is 11.9. It is closest for rates between 6% and 10%.
Is this financial advice?
No. It is a calculator that does the arithmetic exactly for the settings you enter. Real accounts can add interest on other dates and charge fees or taxes, so check the terms of the account.
Try your own numbers
Open the Compound Interest Calculator to see a year-by-year table for your starting amount, monthly deposit, rate and term. For changes between two values, use the Percentage Calculator, and for price cuts, the Discount Calculator. Everything runs in your browser, so nothing you type is uploaded.


