Compound Interest Formula
The compound interest formula explained, with each variable defined, a worked example, and the version with regular contributions.
Reviewed Jan 15, 2025
Quick answer
The compound interest formula is A = P × (1 + r/n)^(n·t). P is the starting amount, r is the annual rate (as a decimal), n is the number of compounding periods per year, and t is years.
A = P × (1 + r/n)^(n·t)
Try it
Open full calculatorCompound Interest Calculator
See how a deposit grows over time with periodic compounding.
Result
$10,000 grows to $145,180 after 20 years at 7% (compounded monthly).
- Total contributed
- $58,000
- Total interest
- $87,180
- Final balance
- $145,180
Inputs
Formula
A = P(1 + r/n)^(nt) + contributions compounded
Related calculators
Calcxo gives you the answer plus the reasoning behind it.
What each variable means
- A — the final amount, including interest.
- P — the principal (the amount you start with).
- r — the annual interest rate, as a decimal (5% → 0.05).
- n — how many times interest is compounded per year.
- t — number of years.
With regular contributions
If you also add a fixed amount PMT each period, the formula becomes A = P × (1 + r/n)^(n·t) + PMT × [((1 + r/n)^(n·t) − 1) ÷ (r/n)]. The second term is the future value of a series of payments.
$5,000 invested for 20 years at 7%
A concrete walkthrough you can follow line by line.
P = 5,000, r = 0.07, n = 1 (annual), t = 20.
1. Plug in
A = 5,000 × (1 + 0.07/1)^(1·20)
2. Simplify
A = 5,000 × 1.07^20
3. Evaluate
1.07^20 ≈ 3.8697 → A ≈ $19,348
Result
About $19,348 — nearly 4× the starting amount.