Compound Interest Calculator With Monthly Contributions, Worked
A compound interest calculator with monthly contributions adds two things together: what your starting balance grows to, and what every monthly deposit grows to. On an illustrative $10,000 with $300 added each month at an example 6% a year for 20 years, the balance ends at $171,714.31. You paid in $82,000; the other $89,714.31 - 52% of the final balance - is interest. Below is the formula, the year-by-year picture, what waiting costs, and how the same math runs in reverse when you take money out.
The formula for compound interest with monthly contributions
i = annual rate / 12 (the monthly rate)
n = years × 12 (the number of months)
Balance = start × (1 + i)^n + deposit × ((1 + i)^n - 1) / i
The first half is the starting balance compounding for n months. The second half is the future value of a stream of equal deposits. It assumes each deposit lands at the end of the month and the rate stays the same throughout. If the rate is zero, the second half is simply deposit × n.
“Compound interest calculator monthly” can mean two things: monthly deposits, or interest that compounds monthly. This formula does both - the rate is divided by 12 and applied every month, and a deposit arrives every month.
Worked example
All inputs are illustrative. The rate is an example, not a forecast, and returns are not guaranteed:
- Starting balance: $10,000
- Added at the end of each month: $300
- Annual rate: 6%, so i = 0.005 (0.5% a month)
- Time: 20 years, so n = 240 months
Working through it:
Starting balance grows to $10,000 × (1 + 0.005)^240 = $33,102.04
Deposits grow to $300 × ((1 + 0.005)^240 - 1) / 0.005 = $138,612.27
Balance at the end = $171,714.31
You paid in $10,000 up front and $72,000 in deposits, $82,000 in all. The difference, $89,714.31, is interest.
Year by year: where the interest shows up
| Year | Paid in so far | Balance | Interest so far | Share that is interest |
|---|---|---|---|---|
| 5 | $28,000 | $34,420 | $6,420 | 19% |
| 10 | $46,000 | $67,358 | $21,358 | 32% |
| 15 | $64,000 | $111,787 | $47,787 | 43% |
| 20 | $82,000 | $171,714 | $89,714 | 52% |
The share of the balance that is interest keeps rising, because every year the interest is earned on a bigger pile that already includes past interest. In the first 10 years this example earns $21,358 of interest. In the second 10 years, with the same deposits, it earns $68,357 - about 3.2 times as much.
The non-obvious part: the crossover year
There is a point where the money starts adding more than you do. In this example you deposit $3,600 a year. Year 10 is the first year in which the interest earned during the year ($3,799) is larger than that year’s deposits. By the final year the interest earned that year is $9,861, against the same $3,600 of deposits.
That is why the number of years carries so much weight, and why stopping early is expensive: the years you cut are the ones where interest was doing most of the work. The Coast FIRE calculator post runs the same growth in reverse to find how much needs to be invested now.
What waiting costs
Same $300 a month, same example 6%, starting from nothing. Compare starting at 25 with starting 10 years later, both stopping at 65:
- Start at 25: balance at 65 is $597,447
- Start 10 years later: balance at 65 is $301,355
Waiting saves you $36,000 of deposits and costs $296,093 of balance - about 8 times what it saves. To catch up after waiting, you would need to add $594.76 a month instead of $300, about 2.0 times as much.
What compounding frequency is worth by comparison
Frequency gets a lot of attention in calculators. On the $10,000 starting balance alone, over 20 years at 6%, compounding monthly instead of yearly adds $1,030.69. Adding one more year of $300 deposits to the full example adds $14,292. The rate, the deposit and the years move the result far more than the frequency does. If two accounts quote an APY, the frequency is already inside that number, so compare the APYs directly.
Compound interest calculator with withdrawals
The same arithmetic runs backwards when you take money out. Each month the remaining balance earns interest, then a withdrawal comes out:
Balance next month = balance × (1 + i) - withdrawal
Illustrative inputs: $500,000 earning an example 5% a year, with $3,000 taken out at the end of each month.
- Interest earned in the first month: $2,083.33
- The withdrawal is $916.67 more than that, so the balance shrinks from the start, and shrinks faster each month as there is less left to earn on.
- The money lasts about 23.8 years.
The number of months it lasts has a closed form:
Months = -ln(1 - balance × i / withdrawal) / ln(1 + i)
That only works when the withdrawal is bigger than the first month’s interest. If it is not, the balance never falls and the money never runs out at a fixed rate.
To make the same balance last exactly 30 years, the withdrawal is the level-payment formula, the same one used for a loan:
Withdrawal = balance × i / (1 - (1 + i)^-n)
Here that is $2,684.11 a month. Taking out $2,083.33 a month would leave the balance untouched for as long as the rate held.
One limit worth stating plainly: real returns are not the same every year. A run of bad years early in the withdrawals shortens the life of the money in a way a fixed-rate calculation cannot show. Treat the years-it-lasts figure as a reference point, not a plan.
How these were calculated
Balances use the formula above: the annual rate divided by 12, compounded monthly, deposits and withdrawals at the end of each month, and the same rate every month. No tax, fees or inflation are included. The crossover year is the first full year in which the growth of the balance, minus that year’s deposits, exceeds that year’s deposits. The withdrawal sustainable for a set number of years is the level-payment formula.
Every figure was computed twice: once by the code behind the calculator pack below, and once by an independent month-by-month loop written for this page (which finds the catch-up amount and the sustainable withdrawal by trial rather than by formula). The two agree to the cent before anything is published. The rates, balances and deposits are illustrative examples, not forecasts or quotes, and returns are not guaranteed. This is not financial or investment advice.
If you want to run monthly contributions, a lump sum, compounding frequency, the deposit a goal needs, years to a goal, withdrawals, inflation and the cost of waiting on your own numbers, the spreadsheet pack below has each one as an editable sheet with the formulas visible.