Math guide

Compound Interest Formula: How It Works With Examples

Learn the compound interest formula, how compounding frequency changes growth, the Rule of 72, and worked examples comparing simple and compound interest.

A line chart where a steep compounding curve pulls away from a dotted straight simple-interest line

Compound interest is often described as the most powerful idea in personal finance, and it is also the one that is easiest to misjudge in your head. The numbers start slowly, then bend upward, and after a few decades the difference from simple interest is large enough to change a savings plan.

This guide explains how compound interest works, the formula behind it, how compounding frequency and time change the result, how APY differs from an interest rate, how to use the Rule of 72, and how the same math works against borrowers. It draws on the Consumer Financial Protection Bureau (CFPB), including the federal rule that defines APY, and on Wikipedia's articles on compound interest and the Rule of 72. Every example below was calculated, not estimated.

The short answer: compound interest means you earn interest on your original money and on the interest it has already earned. The formula is A = P(1 + r/n)^(nt). This article is educational and is not financial advice.

What is compound interest?

The CFPB defines compound interest as earning interest on the money you have saved and on the interest you earn along the way. Its worked example starts with $1,000 at a 5 percent interest rate, paid once a year. After one year the balance is $1,050. After two years it is $1,102.50, because the second year's interest is calculated on $1,050, not on the original $1,000.

Look closely at that second year. The interest was $52.50, which is $50 earned on the original money plus $2.50 earned on the first year's interest. That extra $2.50 is the whole idea. It is small at first, but it grows every year because the base that earns interest keeps getting larger.

Simple interest vs compound interest

Wikipedia describes compound interest as the contrast to simple interest, where previously accumulated interest is not added to the principal amount of the current period. With simple interest you earn the same amount every period, calculated only on the original principal.

The simple interest formula is A = P(1 + rt), where P is the principal, r is the annual rate as a decimal, and t is the time in years. Over 10 years, $1,000 at 5 percent simple interest grows to $1,500. With compound interest, compounding once a year, the same $1,000 grows to $1,628.89, which is $128.89 more.

The compound interest formula

The formula for periodic compounding is A = P(1 + r/n)^(nt). Wikipedia defines the variables: A is the final amount, P is the original principal sum, r is the nominal annual interest rate, n is the compounding frequency, with 1 for annually, 12 for monthly, 52 for weekly, and 365 for daily, and t is the overall length of time, in the same units as r, usually years.

As a worked example, take $1,000 at 5 percent compounded monthly for 10 years. The monthly rate is 0.05 divided by 12, which is about 0.004167. There are 12 times 10, or 120, compounding periods. Then 1.004167 raised to the 120th power is about 1.6470, so the result is about $1,647.01.

  • Convert the percentage rate to a decimal, so 5 percent becomes 0.05.
  • Divide the annual rate by the number of compounding periods per year, n.
  • Add 1 to the result.
  • Raise that to the power of n times t, the total number of periods.
  • Multiply by the principal, P, to get the final amount, A.

How compounding frequency changes the result

The CFPB notes that increasing the compounding frequency, finding a higher interest rate, and adding to your principal are ways to help savings grow faster. Here is what frequency alone does to $1,000 at 5 percent over 10 years.

The pattern shows diminishing returns. Moving from yearly to monthly compounding adds about $18, but moving from monthly to daily adds only about $1.65. Frequency matters, but far less than the rate or the time.

  • Compounded annually: $1,628.89.
  • Compounded quarterly: $1,643.62.
  • Compounded monthly: $1,647.01.
  • Compounded daily: $1,648.66.

Time is the biggest lever

Because growth is exponential, the length of time matters more than almost anything else. Take $10,000 at 5 percent for 30 years. With simple interest it becomes $25,000. With annual compounding it becomes $43,219.42, and with monthly compounding it becomes $44,677.44.

The same effect applies to a smaller sum. $1,000 at 5 percent compounded annually reaches $1,628.89 after 10 years, but after 30 years it is $4,321.94, well past the $2,500 that simple interest would give. Most of the gap appears in the later years, which is why starting early is such common advice.

APR vs APY: comparing accounts fairly

A quoted interest rate does not tell you how much you will earn unless you also know how often it compounds. That is the job of the annual percentage yield, or APY. The federal rule that defines it, Appendix A to Regulation DD (12 CFR Part 1030), states that the annual percentage yield measures the total amount of interest paid on an account based on the interest rate and the frequency of compounding.

The rule's formula is APY = 100[(1 + Interest/Principal)^(365/Days in term) − 1]. In practice, you can compute it from the rate: a 5 percent rate compounded monthly has an APY of about 5.116 percent, and compounded daily it is about 5.127 percent. When you compare savings accounts, compare the APY, because it puts every account on the same footing.

The Rule of 72

The Rule of 72 is a quick mental shortcut for how long it takes money to double. Wikipedia explains that you divide 72 by the interest percentage per period to get the approximate number of periods needed for doubling. It notes that the rule works well for typical rates between 6 and 10 percent, and the idea appears in Luca Pacioli's 1494 book Summa de arithmetica.

At 8 percent, 72 divided by 8 gives 9 years, and the exact answer is about 9.01 years. At 6 percent it estimates 12 years against an exact 11.90, and at 3 percent it estimates 24 years against an exact 23.45. Wikipedia's own example at 9 percent estimates 8 years against an exact 8.04. The rule is a close approximation, not a guarantee.

Adding regular contributions

Most people do not invest a single lump sum. They add money regularly. For deposits made at the end of each month, the future value is the monthly deposit multiplied by ((1 + r/n)^(nt) − 1) divided by (r/n).

Using that formula, $100 deposited every month at 5 percent compounded monthly grows to about $15,528 after 10 years, from $12,000 of deposits, and to about $83,226 after 30 years, from $36,000 of deposits. These figures assume a constant rate and that deposits are made at the end of each month. Real investment returns are not guaranteed and vary from year to year, so treat results like this as illustrations rather than forecasts.

Compound interest works against borrowers too

The same math applies to borrowed money whenever unpaid interest is added to the balance. As an illustration, $5,000 owed at 20 percent, compounded monthly for one year with no payments, grows to about $6,096.96, compared with $6,000 if the interest were compounded only once a year.

Actual loan and credit card terms vary, so read how interest is calculated and charged on any debt. The general lesson is that high rates combined with frequent compounding make balances grow quickly, which is why paying down high-interest debt early is so effective.

Why starting early matters: a worked comparison

Consider two savers who each deposit $100 a month into an account earning 5 percent compounded monthly. The early saver deposits for 10 years, from age 25 to 35, then stops and never adds another dollar. The later saver starts at 35 and deposits for 20 years, until age 55. Both are measured at age 55.

The early saver contributes $12,000 in total. Those deposits grow to about $15,528 by age 35, and then grow for 20 more years to about $42,122. The later saver contributes $24,000, twice as much, and ends with about $41,103. Half the deposits produced a slightly larger balance, purely because they had more years to compound.

The figures are illustrations that assume a constant 5 percent rate, which real accounts and investments do not guarantee. The lesson is about the shape of the curve: the earliest dollars do the most work, so time in the account matters at least as much as the amount deposited.

Common compound interest mistakes

Most errors in compound interest calculations come from a short list of slips, and all of them are easy to avoid once you know them.

  • Using 5 instead of 0.05 for the rate, which gives absurd answers.
  • Mixing time units, for example using months for t but an annual rate for r.
  • Comparing a nominal rate with an APY as though they were the same measure.
  • Rounding intermediate steps, which compounds the error. Round only the final answer.
  • Assuming investment returns are guaranteed the way a fixed savings rate is.
  • Ignoring fees, taxes, and inflation, which reduce what growth is worth in practice.

How to calculate compound interest in a spreadsheet

Spreadsheets make this quick. To reproduce the monthly example, type =1000*(1+0.05/12)^(12*10) into a cell and it returns 1647.01. The built-in FV function does the same: =FV(0.05/12, 120, 0, -1000) also returns 1647.01, where the arguments are the periodic rate, the number of periods, the regular payment, and the starting amount entered as a negative number.

For regular deposits, =FV(0.05/12, 120, -100) returns 15528.23, which matches the monthly deposit example above. If you are working with sensitive financial figures, use a spreadsheet or calculator that runs on your own device instead of a site that uploads your inputs.

Practical checklist

  • Write the rate as a decimal and divide it by the number of compounding periods per year.
  • Keep time units consistent between the rate and the number of periods.
  • Use A = P(1 + r/n)^(nt) for a lump sum, and the future value formula for regular deposits.
  • Compare savings accounts by APY, not by the nominal rate alone.
  • Use the Rule of 72 for a quick estimate of doubling time, and the formula for exact answers.
  • Round only the final result.
  • Remember that investment returns, fees, taxes, and inflation change real outcomes.

Research and references

This guide was prepared from the authoritative references below.

  1. Consumer Financial Protection Bureau: How does compound interest work?
  2. CFPB: Appendix A to Part 1030, Annual Percentage Yield Calculation
  3. Wikipedia: Compound interest
  4. Wikipedia: Rule of 72