Formula, derivation, and worked examples
The Compound Interest Formula, Explained
The compound interest formula looks intimidating the first time you see it, but every symbol has a plain-language meaning, and working through one example by hand makes the whole thing click. This page breaks the formula down piece by piece, walks through a full worked example, covers the version of the formula used when you add regular contributions, and includes a reference table for every common compounding frequency.
The Formula
The standard compound interest formula is:
A = P(1 + r/n)^(nt)
Each letter stands for a specific input:
- A: the final amount: your principal plus all the interest it earns.
- P: the principal: the amount you start with.
- r: the annual interest rate, written as a decimal (5% becomes 0.05, not 5).
- n: the number of times per year interest compounds (1 for annually, 12 for monthly, 365 for daily).
- t: the number of years the money grows for.
r/n is the interest rate applied at each individual compounding period, and nt is the total number of periods over the full time span. Raising (1 + r/n) to the power of nt is what produces the compounding effect: each period's growth is applied on top of every previous period's growth, not just on the original principal.
Step-by-Step Worked Example
Take $2,000 invested at a 6% annual rate, compounded monthly, for 5 years.
- Convert the annual rate to a periodic rate: r/n = 0.06 / 12 = 0.005 per month.
- Find the total number of periods: n × t = 12 × 5 = 60 months.
- Add 1 to the periodic rate: 1 + 0.005 = 1.005.
- Raise it to the power of the total periods: 1.005^60 = 1.34885 (rounded to five decimal places).
- Multiply by the principal: A = $2,000 × 1.34885 = $2,697.70.
The total interest earned is $2,697.70 minus the original $2,000 principal, which is $697.70: roughly 34.9% growth over 5 years from a rate that only pays 6% a year, because each month's interest joined the balance and started earning its own interest the following month. You can plug these same four numbers into the compound interest calculator to confirm the result instantly, or change any one of them to see how sensitive the outcome is.
The Formula With Regular Contributions
The formula above only covers a single lump-sum principal with no further deposits. Once you add a recurring contribution PMT at every compounding period, the full formula becomes:
A = P(1 + r/n)^(nt) + PMT × [((1 + r/n)^(nt) - 1) / (r/n)]
The first term is the original lump-sum formula, unchanged. The second term is the future value of an ordinary annuity: it adds up every individual contribution, each compounding for however many periods remain between when it was deposited and the end of the time span. This is the exact formula this site's compound interest calculator uses whenever you enter a monthly contribution above zero.
Solving this same equation backwards: starting from a target future value A and solving for the required PMT: answers a different, very practical question: how much do you need to contribute each period to reach a specific goal. That reverse calculation is exactly what the savings goal calculator does automatically, so you never have to rearrange the algebra by hand.
Compounding Frequency Reference Table
The value of n depends entirely on how often your interest compounds. This is the standard mapping used by most banks and investment products:
| Compounding frequency | n (periods per year) |
|---|---|
| Annually | 1 |
| Semi-annually | 2 |
| Quarterly | 4 |
| Monthly | 12 |
| Daily | 365 |
There is also a theoretical limit called continuous compounding, where n approaches infinity. Its formula drops the (1 + r/n)^(nt) expression entirely and uses the mathematical constant e instead: A = Pe^(rt). For the same $2,000-at-6%-for-5-years example above, continuous compounding produces $2,699.72, while daily compounding (n = 365) produces $2,699.65: a difference of just $0.07, illustrating how close daily compounding already gets to the theoretical maximum.
A Quick Mental-Math Shortcut: The Rule of 72
If you only need a rough estimate of how long it takes an investment to double, divide 72 by the annual interest rate (as a whole number, not a decimal). At 6%, that is 72 / 6 = 12 years; the exact answer, solved with the real formula, is 11.90 years. At 8%, the rule gives 72 / 8 = 9 years against an exact 9.01 years. The Rule of 72 is a well-known approximation, not the precise formula: close enough for a quick mental estimate, but use the full calculator above whenever the exact figure matters.
Why the Exponent Matters More Than the Rate
It is tempting to focus only on the interest rate r, since it is the number advertised on a savings account or a loan. But the exponent nt does most of the heavy lifting over long time horizons. Doubling your interest rate roughly doubles your interest earned in any single year, but doubling your time horizon can multiply your final balance many times over, because the exponent nt grows the base (1 + r/n) to an ever-larger power. This is the mathematical reason "start early" is repeated so often in personal finance: t is inside an exponent, while r is only inside a base, and exponents compound far more aggressively than linear factors do over decades.
Frequently asked questions
What does each letter in the compound interest formula stand for?
How do I calculate compound interest by hand?
What is the formula when I add monthly contributions?
Does this page store any of the numbers I look at?
Is the Rule of 72 accurate?
Why does the formula use (1 + r/n) instead of just (1 + r)?
Ready to run your own numbers?
Plug your principal, rate, and time period into the full calculator.
Go to the compound interest calculatorFree. No sign-up.