The formula
One formula. All the math.
Compound interest has exactly one formula. Everything else — monthly deposits, inflation, effective APY — is a layer on top. Here it is, with a worked example you can poke at.
The core formula
- A
- The future value — what the balance becomes.
- P
- The principal — your starting amount.
- r
- The annual interest rate, as a decimal (8% → 0.08).
- n
- Compound periods per year (12 = monthly, 365 = daily).
- t
- The number of years the money stays invested.
With regular deposits
The second term is the future value of an annuity — a regular deposit ofPMT every period. End-of-period deposits use the formula as-is; start-of-period deposits multiply the annuity term by(1 + r/n) because each deposit earns one extra period of interest.
Worked example
$10,000 at 8%, monthly, for 20 years.
- 01
Convert the rate.
r = 0.08, n = 12. So r/n = 0.08 / 12 = 0.006667.
- 02
Count the periods.
n · t = 12 · 20 = 240 compounding periods.
- 03
Raise 1 + r/n to the power nt.
(1.006667)240 ≈ 4.9268. That's your growth factor — the balance will multiply by nearly five.
- 04
Multiply by the principal.
$10,000 × 4.9268 ≈ $49,268. That's the future value with no monthly deposits.
- 05
Add a $200 monthly deposit.
PMT · [(4.9268 − 1) / 0.006667] ≈ 200 × 589 ≈ $117,800. Combined with the principal growth, you end at roughly$167,000— of which only $58,000 is money you contributed.
The lesson
Of the final $167,000, $58,000 is yours and $109,000 is interest. That split — interest beating contributions — is the magic. It only shows up if you start early and don't touch it.
Try it live
Edit the inputs below — the formula runs instantly.
Growth over time
Principal, contributions, and interest — stacked year by year.
Year-by-year breakdown
Opening balance, deposits, interest, closing balance.
Show table
Year-by-year breakdown
Opening balance, deposits, interest, closing balance.
| Year | Opening | Net flows | Interest | Closing |
|---|
Start compounding, keep compounding.
Open the calculator, change one number, and watch the long tail.