Skip to content

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:

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.

  1. Convert the annual rate to a periodic rate: r/n = 0.06 / 12 = 0.005 per month.
  2. Find the total number of periods: n × t = 12 × 5 = 60 months.
  3. Add 1 to the periodic rate: 1 + 0.005 = 1.005.
  4. Raise it to the power of the total periods: 1.005^60 = 1.34885 (rounded to five decimal places).
  5. 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 frequencyn (periods per year)
Annually1
Semi-annually2
Quarterly4
Monthly12
Daily365

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?
A is the final amount, P is the principal (your starting amount), r is the annual interest rate written as a decimal, n is how many times per year interest compounds, and t is the number of years.
How do I calculate compound interest by hand?
Divide the annual rate by the compounding frequency to get the periodic rate, add 1, raise the result to the power of the total number of periods (years times compounding frequency), then multiply by the principal. See the step-by-step worked example above for a full walkthrough with real numbers, or use the compound interest calculator to skip the arithmetic entirely.
What is the formula when I add monthly contributions?
A = P(1 + r/n)^(nt) + PMT x [((1 + r/n)^(nt) - 1) / (r/n)], where PMT is your contribution per compounding period. See the "Formula With Regular Contributions" section above for the full explanation.
Does this page store any of the numbers I look at?
No: this is a static reference page with no calculator inputs of its own. If you use the compound interest calculator or savings goal calculator elsewhere on this site, every calculation still runs locally in your browser with nothing sent to a server. See our privacy policy for full details.
Is the Rule of 72 accurate?
It is a well-known approximation, accurate to within a few hundredths of a year at typical interest rates (6-10%), but it is not the exact formula. For a precise answer at any rate, term, or compounding frequency, use the full compound interest calculator instead.
Why does the formula use (1 + r/n) instead of just (1 + r)?
Because r is an ANNUAL rate, but each compounding period only earns its proportional share of that rate. Dividing r by n converts the annual rate into the correct periodic rate before it is applied at each of the nt compounding events: skipping this step and using the full annual rate at every period would dramatically overstate the result.

Ready to run your own numbers?

Plug your principal, rate, and time period into the full calculator.

Go to the compound interest calculator

Free. No sign-up.