Get Started
How to Calculate Compound Interest: Formula and Examples
Learn how to calculate compound interest with the formula, daily and monthly compounding and contributions. Worked examples and Excel tips.

How to Calculate Compound Interest: Formula and Examples

Last Updated: 8 min read
Miniature figure sitting on stacked coins showing compound interest growth

Learn how to calculate compound interest with the formula, daily and monthly compounding, regular contributions and Excel functions, with worked examples.

Table of Contents 26 sections
  1. The compound interest formula
  2. Step-by-step example: annual compounding
  3. Monthly and daily compounding
  4. How to calculate compound interest with regular contributions
  5. Compound interest in Excel or Google Sheets
  6. How to calculate the effective annual rate (APY)
  7. How to calculate how long it takes to reach a goal
  8. How to calculate the required rate
  9. Adjusting for inflation
  10. Compound interest on debt
  11. Common mistakes
  12. Understanding the formula's parts
  13. Continuous compounding
  14. Compound interest versus simple interest
  15. Compound interest with annual contributions
  16. Compound growth with changing contributions
  17. Calculating the real, inflation-adjusted return
  18. Calculating investment fees' effect
  19. Using compound interest for goals
  20. Worked comparison: starting at 25, 35 or 45
  21. How banks and brokerages quote interest
  22. Calculating compound interest when the rate changes
  23. Calculating CAGR
  24. Next steps
  25. How to use this guide
  26. Frequently asked questions
Skip the math: use the free Compound Interest Calculator.

Compound interest is often called the eighth wonder of the world, and the math behind it is simple enough to do on paper. This guide explains how to calculate compound interest with the formula, step-by-step examples, daily and monthly compounding, regular contributions and a spreadsheet shortcut. To check results instantly, use our compound interest calculator.

The compound interest formula

A = P x (1 + r/n)^(n x t)
  • A = the future value (principal plus interest)
  • P = starting principal
  • r = annual interest rate as a decimal (5% = 0.05)
  • n = times interest is compounded per year
  • t = number of years

To find only the interest earned, subtract the principal: Interest = A - P.

For related numbers, try the Interest Calculator, CD Calculator and 401(k) Calculator.

Step-by-step example: annual compounding

Invest $5,000 at 6 percent compounded annually for 10 years.

  1. r = 0.06, n = 1, t = 10.
  2. (1 + 0.06 / 1) = 1.06.
  3. 1.06^10 = 1.7908.
  4. A = 5,000 x 1.7908 = $8,954.
  5. Interest earned = $3,954.

Monthly and daily compounding

Same $5,000, 6 percent, 10 years, but compounded monthly: n = 12, so (1 + 0.06/12)^(120) = 1.005^120 = 1.8194, giving A = $9,097. Compounded daily (n = 365): (1 + 0.06/365)^3650 = 1.8219, so A = $9,110. Note how little extra daily compounding adds over monthly.

CompoundingnValue after 10 years
Annually1$8,954
Quarterly4$9,070
Monthly12$9,097
Daily365$9,110

How to calculate compound interest with regular contributions

When you add money regularly, use the future value of an annuity. For monthly deposits at the end of each month and monthly compounding:

FV = P(1 + i)^N + PMT x [ ((1 + i)^N - 1) / i ]
i = r / 12 and N = 12 x t

Example: $2,000 starting balance, $200 monthly, 5% annual, 15 years. i = 0.05 / 12 = 0.0041667, N = 180, (1 + i)^180 = 2.1137. FV = 2,000 x 2.1137 + 200 x (2.1137 - 1) / 0.0041667 = 4,227 + 53,458 = $57,685. You contributed $38,000 (2,000 + 36,000), so interest is about $19,685.

Compound interest in Excel or Google Sheets

  • Lump sum: =FV(rate/n, n*years, 0, -principal)
  • With monthly deposits: =FV(rate/12, years*12, -deposit, -principal)
  • Rate needed to hit a goal: =RATE(years*12, -deposit, -principal, goal)*12
  • Time to reach a goal: =NPER(rate/12, -deposit, -principal, goal)

How to calculate the effective annual rate (APY)

APY = (1 + r/n)^n - 1

For a 5 percent rate compounded daily: (1 + 0.05/365)^365 - 1 = 5.127%. Banks quote APY on savings products so that rates with different compounding schedules can be compared.

How to calculate how long it takes to reach a goal

Rearrange the formula: t = ln(A/P) / (n x ln(1 + r/n)). To grow $10,000 to $25,000 at 7 percent compounded monthly: ln(2.5) = 0.9163, and 12 x ln(1.005833) = 0.06976. So t = 13.1 years. The shortcut is the Rule of 72: years to double is about 72 / rate, so at 7 percent doubling takes about 10.3 years.

How to calculate the required rate

r = n x [ (A/P)^(1/(n t)) - 1 ]. To turn $8,000 into $12,000 in 7 years compounded annually: (1.5)^(1/7) = 1.0596, so the required rate is 5.96 percent.

Adjusting for inflation

Real value = future value / (1 + inflation)^years. If $57,685 will be reached in 15 years with 3 percent inflation, its purchasing power is 57,685 / 1.558 = $37,025 in today's dollars. Or calculate a real rate: (1 + nominal) / (1 + inflation) - 1.

Compound interest on debt

The same formula applies to loans and credit cards. A $3,000 balance at 22 percent APR compounded daily with no payments grows to about $4,660 after two years: 3,000 x (1 + 0.22/365)^730 = $4,658. Understanding this helps prioritize high-interest debt payoff. For amortized loans, use the loan payment formula instead.

Common mistakes

  • Using the percentage instead of the decimal (5 instead of 0.05)
  • Mixing up the compounding period and the rate period
  • Forgetting to include contributions
  • Ignoring taxes, fees and inflation
  • Assuming a constant return in volatile markets

Understanding the formula's parts

The term (1 + r/n) is the growth factor in each compounding period. Raising it to the power n x t applies that growth over every period of the investment. The beauty of this structure is that it grows exponentially: a doubling happens in the same time span every time, regardless of the starting amount. That is why the Rule of 72 works: ln(2) is about 0.693, and 72 is a convenient number close to 69.3 with many divisors, so years to double is about 72 / rate.

Continuous compounding

As compounding gets more frequent, the result approaches a limit. With continuous compounding, A = P x e^(r t), where e is about 2.71828. For $10,000 at 6 percent for 10 years: A = 10,000 x e^0.6 = 10,000 x 1.8221 = $18,221, only $11 more than daily compounding. Continuous compounding is mostly used in finance theory and pricing models.

Compound interest versus simple interest

Simple interest: A = P x (1 + r x t)
Compound interest: A = P x (1 + r/n)^(n t)

With $10,000 at 5 percent for 20 years, simple interest gives $20,000, compounded annually gives $26,533 and compounded monthly gives $27,126. Many auto loans and some personal loans use simple interest, which is an advantage for borrowers who pay early. Savings accounts and investments generally compound.

Compound interest with annual contributions

If you contribute once a year, the future value of the annuity is PMT x [((1 + r)^t - 1) / r]. Contributing $6,000 a year to an IRA for 30 years at 7 percent gives 6,000 x (7.612 - 1) / 0.07 = 6,000 x 94.46 = $566,800. Total contributions are $180,000, and interest accounts for over two thirds of the final balance. For contributions at the beginning of each period (annuity due), multiply by (1 + r).

Compound growth with changing contributions

When contributions increase every year, such as 3 percent annual raises, the formula gets complicated and a table or spreadsheet is easier. Build a column for year, start balance, contribution, growth and end balance. Each year: end = (start + contribution) x (1 + r) if you deposit at the beginning, or start x (1 + r) + contribution if you deposit at year-end. This year-by-year approach is exactly what the calculator does with monthly steps.

Calculating the real, inflation-adjusted return

Real return = (1 + nominal) / (1 + inflation) - 1

With a 7 percent return and 3 percent inflation, the real return is 1.07 / 1.03 - 1 = 3.88 percent, not 4 percent. Using the real return in your formula gives results in today's dollars. For long-term plans such as retirement, this is more meaningful than nominal numbers.

Calculating investment fees' effect

Take $100,000 for 30 years at 7 percent gross. With a 0.1 percent fee (6.9 percent net): $100,000 x 1.069^30 = $740,000. With a 1 percent fee (6 percent net): $574,000. The extra 0.9 percent in fees costs $166,000, or more than 22 percent of the final balance. Fees compound just like returns, so always include them in projections.

Using compound interest for goals

  • Emergency fund: keep 3 to 6 months of expenses in a high-yield savings account.
  • Down payment: a 5-year goal fits CDs or high-yield savings. See the mortgage calculator for how much you need.
  • Retirement: a 30-year horizon fits diversified stock funds in tax-advantaged accounts.
  • College savings: 529 plans compound tax-free for education expenses.

Worked comparison: starting at 25, 35 or 45

Start ageMonthly depositYears to 65Balance at 65 (7%)Total contributed
25$40040$1,049,000$192,000
35$40030$488,000$144,000
45$40020$208,000$96,000

Starting ten years earlier more than doubles the result, even though the extra contribution is only $48,000. Use this table to see why financial planners emphasize time over amount.

How banks and brokerages quote interest

Savings accounts state both an interest rate and an APY. Credit cards state an APR, applying a daily periodic rate (APR / 365) to your average daily balance, which is why balances compound daily. Bonds state a coupon rate and a yield. Mortgages and auto loans amortize rather than compound visibly, though the underlying math is similar. When comparing products, convert everything to an effective annual rate.

Calculating compound interest when the rate changes

When the rate varies by year, multiply growth factors: final = P x (1 + r1) x (1 + r2) x ... x (1 + rn). For returns of 8, -10, 12 and 6 percent starting from $10,000: 10,000 x 1.08 x 0.90 x 1.12 x 1.06 = $11,540. The average of the yearly returns is 4 percent, but the compound annual growth rate (CAGR) is (11,540 / 10,000)^(1/4) - 1 = 3.65 percent, a bit lower. This gap, called volatility drag, is why average returns overstate what you actually earn. Use CAGR to compare investments honestly.

Calculating CAGR

CAGR = (ending value / beginning value)^(1 / years) - 1

A fund that grew from $20,000 to $48,000 in 12 years has CAGR = (2.4)^(1/12) - 1 = 7.57 percent. In a spreadsheet, use =(end/start)^(1/years)-1 or =RRI(years, start, end).

Next steps

Use the compound interest calculator to test your own scenarios. Then explore the mortgage calculator, loan calculator and the rest of the finance calculators.

How to use this guide

Work through the steps in order with your own numbers, writing each result down as you go, then check your answer against the matching calculator on this site. If your hand calculation and the calculator disagree, the usual culprits are unit conversions, rounding, and a percentage typed as a whole number instead of a decimal. The examples are illustrations, not recommendations, and your situation may call for different assumptions. For important financial or health decisions, confirm your plan with a licensed professional who knows your circumstances. This article is reviewed periodically and was last updated in November 2026.

Frequently asked questions

How do you calculate compound interest?

Use A = P(1 + r/n)^(nt). Multiply the principal by (1 + rate per period) raised to the number of periods.

How do I calculate compound interest in Excel?

Use =FV(rate/n, n*years, 0, -principal) for a lump sum or =FV(rate/12, years*12, -monthly_deposit, -principal) with deposits.

How do I calculate interest earned?

Subtract your total contributions (principal plus deposits) from the final balance.

What is the Rule of 72?

Divide 72 by the annual rate to estimate how long it takes to double money.

How do I calculate APY?

APY = (1 + r/n)^n - 1.

How do I find how long to reach my goal?

Use t = ln(A/P) / (n x ln(1 + r/n)), or the NPER function in a spreadsheet.

This calculator is for educational purposes only and does not guarantee investment returns. Actual returns vary, are not guaranteed and may be negative. Results ignore taxes, fees and inflation unless noted. This is not investment advice; consider speaking with a licensed financial professional.

Sawera Shahid

About the author

Sawera Shahid is the founder and lead writer of Calculators360. She builds the site's free online calculators and writes clear, step-by-step guides on finance, math and health, with every formula explained and worked examples you can check by hand.

© 2026 Calculators360. Free calculators for health, finance and everyday math. Privacy · About · Contact

Leave a Reply

Your email address will not be published. Required fields are marked *