Albert Einstein reportedly called compound interest the "eighth wonder of the world." Whether or not he said it, the math is genuinely remarkable: money invested today grows not just on the principal, but on all the interest that has previously accumulated. Over decades, this creates extraordinary wealth — or extraordinary debt. Here's how the formula works.
The Compound Interest Formula
A = P × (1 + r/n)^(n×t)
Where:
- A = Final amount (principal + interest)
- P = Principal (initial investment)
- r = Annual interest rate (as a decimal — so 7% = 0.07)
- n = Number of times interest compounds per year
- t = Time in years
Interest earned = A - P
Example:
- Principal: $10,000
- Annual rate: 7%
- Compounding: Annual (n=1)
- Time: 30 years
A = 10,000 × (1 + 0.07/1)^(1×30)
A = 10,000 × (1.07)^30
A = 10,000 × 7.6123
A = $76,123
$10,000 grows to $76,123 — a gain of $66,123 — without adding another cent.
Use DevZone's Compound Interest Calculator to model any scenario instantly with adjustable compounding frequency, contributions, and time horizon.
Compounding Frequency Matters
The more frequently interest compounds, the faster your money grows — though the difference between monthly and daily is small.
| Compounding | Formula for (1 + r/n)^n | $10K at 7% after 30 years |
|---|---|---|
| Annually | (1.07)^1 = 1.07 | $76,123 |
| Quarterly | (1.0175)^4 = 1.0719 | $77,898 |
| Monthly | (1.00583)^12 = 1.0723 | $78,123 |
| Daily | (1.000192)^365 = 1.0725 | $78,221 |
Continuous compounding (the mathematical limit as n→∞) uses the formula A = P × e^(r×t) and gives $78,227 — barely more than daily compounding.
In practice, mutual funds and most investments compound daily or monthly. The difference from annual compounding on a 7% return is meaningful but not dramatic.
The Rule of 72
A simple mental shortcut: 72 ÷ interest rate = years to double your money.
| Rate | Doubling time |
|---|---|
| 4% | 18 years |
| 6% | 12 years |
| 7% | ~10.3 years |
| 8% | 9 years |
| 10% | 7.2 years |
| 12% | 6 years |
At 7% (close to the US stock market's long-run average after inflation), your money doubles roughly every 10 years. $10,000 becomes $20,000 at year 10, $40,000 at year 20, $80,000 at year 30.
Adding Regular Contributions
Most investors don't just invest once — they invest consistently. The formula for compound growth with regular contributions (annuity formula):
A = P × (1 + r/n)^(n×t) + PMT × [((1 + r/n)^(n×t) - 1) ÷ (r/n)]
Where PMT = periodic contribution amount.
Example: $10,000 initial investment + $500/month, 7% annual return, 30 years:
- From initial $10,000: $76,123
- From $500/month contributions: $566,765
- Total: $642,888
You contributed $10,000 + (500 × 360 months) = $190,000. Compound growth turned it into $642,888.
Time Is the Most Powerful Variable
Comparing two investors who invest the same amount but start at different ages (7% annual return):
| Scenario | Start | Amount | Contributions | End | Final value |
|---|---|---|---|---|---|
| Early starter | Age 25 | $200/month | 40 years | Age 65 | $528,000 |
| Late starter | Age 35 | $200/month | 30 years | Age 65 | $243,000 |
| Late starter (catch-up) | Age 35 | $400/month | 30 years | Age 65 | $486,000 |
The early starter contributes $96,000 total and ends up with $528,000. The late starter who tries to catch up with double the monthly investment contributes $144,000 and still ends up with less. The 10 missing years of compounding are impossible to fully replace.
Compound Interest Working Against You: Debt
The same math that builds wealth when investing destroys it when you carry high-interest debt.
Credit card at 20% APR with $5,000 balance (minimum payments only):
| Year | Balance |
|---|---|
| 0 | $5,000 |
| 1 | ~$5,500 |
| 3 | ~$6,700 |
| 7 | ~$9,500 |
| 10 | ~$12,500 |
The debt compounds faster than you can pay it off at minimum payments. At 20%, debt doubles in 3.6 years (72 ÷ 20).
High-interest debt should be paid off before investing — the guaranteed "return" from eliminating a 20% debt is better than any investment return you can reliably expect.
Real Returns vs Nominal Returns
Inflation erodes the purchasing power of your returns. A 7% nominal return during a 3% inflation period gives you a real return of approximately 4%.
Real return ≈ Nominal return - Inflation rate
For long-term planning, use real returns (inflation-adjusted) if you want to understand purchasing power growth. Use nominal returns if you're projecting raw dollar amounts.
US equity markets have historically returned about 10% nominally, or about 7% in real terms after ~3% inflation.
FAQ
What's the difference between simple and compound interest?
Simple interest is calculated only on the original principal: Interest = P × r × t. A $10,000 investment at 7% simple interest for 30 years earns $21,000 in interest ($10,000 × 0.07 × 30). Compound interest on the same investment earns $66,123 — three times more.
How do savings account interest rates compound?
Most savings accounts compound daily but credit interest monthly or quarterly. A 5% APY (Annual Percentage Yield) already accounts for the compounding — APY is the effective annual rate. APR (Annual Percentage Rate) is the pre-compounding rate; APY is what you actually earn.
Does compound interest work with index funds?
Not in the same mechanical way as a savings account. Index fund "compounding" happens through price appreciation and reinvested dividends — both of which increase your share count or value, which then grows further. The effect is similar to compounding but driven by market returns rather than a fixed rate.
What compounding frequency do banks use?
Savings accounts and CDs typically compound daily. Credit cards compound daily (which is why they're so expensive at high rates). Mortgages compound monthly. US savings bonds compound semi-annually.