Skip to content
Calc.
← All articles
financeBy Emil BjörkMay 20, 2026

How to Calculate Compound Interest: Formula and Examples

Compound interest is interest earned on both your original deposit and the interest already added to it. Below is the formula, two worked examples, and the three things that change the result: time, rate, and compounding frequency.

What Is Compound Interest and Why Does It Matter?

Compound interest occurs when the interest earned on an investment or deposit is added to the principal, and future interest is calculated on this new, larger amount. The balance therefore grows faster each year.

An example shows the difference from simple interest. If you invest $1,000 at 5% simple interest for 10 years, you earn $50 each year, totaling $1,500 after a decade. With annual compounding at the same rate, it grows to about $1,629 (1,000 × 1.05^10), an extra $129 because the interest earned interest.

The gap widens with longer periods and higher rates.

The Compound Interest Formula Explained

The standard compound interest formula is:

A = P(1 + r/n)^(nt)

Where:

  • A = final amount
  • P = principal (initial investment)
  • r = annual interest rate as a decimal
  • n = number of times interest is compounded per year
  • t = number of years
For continuous compounding, the formula becomes A = Pe^(rt).

The inputs:

Principal (P): your starting amount, the money you initially invest or deposit.

Interest rate (r): convert percentages to decimals (5% becomes 0.05).

Compounding frequency (n): this varies by account type:

  • Annually: n = 1
  • Semi-annually: n = 2
  • Quarterly: n = 4
  • Monthly: n = 12
  • Daily: n = 365
Time (t): the number of years the money stays invested.

Step-by-Step Calculation Examples

Example 1: Quarterly Compounding

Sarah invests $5,000 in a savings account offering 4% annual interest, compounded quarterly, for 8 years.

  • P = $5,000
  • r = 0.04
  • n = 4 (quarterly)
  • t = 8
A = 5,000 × (1 + 0.04/4)^(4×8)

A = 5,000 × (1.01)^32

A = 5,000 × 1.37494

A ≈ $6,874.70

Sarah's investment grows to about $6,874.70, earning $1,874.70 in interest (rounded to the cent).

Example 2: Monthly Compounding

John puts $10,000 into an investment account with 6% annual interest, compounded monthly, for 15 years.

  • P = $10,000
  • r = 0.06
  • n = 12 (monthly)
  • t = 15
A = 10,000 × (1 + 0.06/12)^(12×15)

A = 10,000 × (1.005)^180

A = 10,000 × 2.45409

A ≈ $24,540.94

John's investment more than doubles, reaching about $24,541 and earning about $14,541 in interest.

The compound interest calculator runs this formula from a starting amount, annual rate, number of years and a compounding frequency of annual, quarterly, monthly or daily, and can add a fixed monthly contribution on top.

Factors That Maximize Compound Interest Growth

Time

Time has the largest effect. Starting early with smaller amounts can beat starting late with larger ones. Assume a 7% annual return with deposits at the end of each year:

Early starter: invests $2,000 a year from age 25 to 35 (10 deposits, $20,000 total), then nothing more.

Late starter: invests $2,000 a year from age 35 to 65 (30 deposits, $60,000 total).

By age 65 the early starter has about $210,000 and the late starter about $189,000, even though the early starter put in $40,000 less. (A 7% return is an assumption for illustration, not a forecast.)

Interest Rate

A $10,000 investment over 20 years with annual compounding:

  • At 4%: grows to $21,911
  • At 6%: grows to $32,071
  • At 8%: grows to $46,610

Compounding Frequency

More frequent compounding increases the result, but the effect shrinks quickly. For $10,000 at 5% for 10 years:

  • Annual compounding: $16,289
  • Monthly compounding: $16,470
  • Daily compounding: $16,487
Going from annual to monthly adds $181; going from monthly to daily adds only $17. The rate and the number of years matter far more than the frequency.

Where the Same Math Applies

Savings goals: the savings goal calculator turns the formula around and works out the monthly deposit needed to reach a target by a deadline, allowing for the interest you expect to earn.

Measuring results: the stock return calculator takes the purchase and current price, the number of shares, dividends received and the holding period and returns the annualized rate, which is the compound rate the investment actually achieved.

Debt: compounding works against you on credit card balances and other debt that charges interest on unpaid interest.

Retirement planning: long-horizon projections of retirement accounts are this formula with contributions added each period.

Returns on investments are not guaranteed; the examples use fixed rates to show the arithmetic, and real results will vary.

Sources

Related articles

Looking for a calculator?

Calculator Collection has 1,400+ free calculators. Browse all calculators →