Last updated: October 31, 2026
The compound interest formula is A = P(1 + r/n)^(nt). A is the ending balance, P is the starting principal, r is the annual interest rate as a decimal, n is how many times interest compounds each year, and t is the number of years. Subtract P from A to get the interest alone.
This guide shows how to calculate compound interest by hand, with monthly compounding, with regular deposits and in a spreadsheet. The formula and definitions follow OpenStax College Algebra, a free peer-reviewed textbook.
Contents
- What is the compound interest formula?
- How to calculate compound interest step by step
- How compounding frequency changes the result
- Compound interest formula with monthly contributions
- How to calculate compound interest in Excel or Google Sheets
- Solving for rate, time or principal
- Simple vs. compound interest
- Frequently asked questions
What is the compound interest formula?
Compound interest is interest earned on interest. The Consumer Financial Protection Bureau (CFPB) defines it as earning interest on the money you saved and on the interest you earn along the way. The standard formula is:
A = P(1 + r/n)nt
| Symbol | Meaning | Example value |
|---|---|---|
| A | Ending balance (principal plus interest) | What you solve for |
| P | Principal, the starting amount | $1,000 |
| r | Annual interest rate as a decimal | 5% = 0.05 |
| n | Compounding periods per year | 12 for monthly |
| t | Time in years | 3 |
To find only the interest earned, use I = P(1 + r/n)nt − P. OpenStax notes that r is the annual percentage rate, also called the nominal rate.
How to calculate compound interest step by step
Here is the calculation for $1,000 at 5% compounded monthly for 3 years:
- Convert the rate to a decimal: 5% becomes 0.05.
- Find the rate per period: 0.05 ÷ 12 = 0.0041667.
- Add 1: 1 + 0.0041667 = 1.0041667.
- Find the number of periods: 12 × 3 = 36.
- Raise to that power: 1.004166736 ≈ 1.16147.
- Multiply by the principal: $1,000 × 1.16147 ≈ $1,161.47.
- Subtract the principal for interest only: $1,161.47 − $1,000 = $161.47.
The CFPB shows the same idea year by year: $1,000 at 5% compounded once a year becomes $1,050 after one year and $1,102.50 after two, because the second year’s 5% is earned on $1,050 rather than $1,000.
How compounding frequency changes the result
The more often interest compounds, the more you earn, but the gains shrink as frequency rises. This table shows $10,000 at a 5% annual rate for 10 years, calculated with the formula above:
| Compounding frequency | n | Balance after 10 years |
|---|---|---|
| Annually | 1 | $16,288.95 |
| Semiannually | 2 | $16,386.16 |
| Quarterly | 4 | $16,436.19 |
| Monthly | 12 | $16,470.09 |
| Daily | 365 | $16,486.65 |
| Continuously | — | $16,487.21 |
Moving from annual to monthly compounding adds about $181 here, while moving from daily to continuous adds less than a dollar. OpenStax shows the same pattern for $1,000 at 10% for one year: $1,100 compounded annually versus $1,105.16 compounded daily.
Continuous compounding formula
When compounding happens continuously, the formula becomes A = Pert, where e is about 2.71828. OpenStax’s example: $1,000 at 10% compounded continuously is worth $1,105.17 after one year.
Compounding and APY
Banks express the effect of compounding as the annual percentage yield (APY). A 5% rate compounded monthly works out to an APY of about 5.12%. Learn more in our answers on whether APY includes compounding and the difference between APR and interest rate.
Compound interest formula with monthly contributions
If you add money regularly, combine the growth of the starting balance with the future value of the deposits. When deposits are made at the end of each period and match the compounding schedule:
A = P(1 + i)N + PMT × [((1 + i)N − 1) ÷ i]
Here i is the rate per period (r/n), N is the total number of periods (n × t) and PMT is the regular deposit.
Example: $5,000 plus $200 a month at 6% for 20 years
- Monthly rate: i = 0.06 ÷ 12 = 0.005
- Periods: N = 20 × 12 = 240
- Growth of the $5,000: about $16,551.02
- Growth of the deposits: about $92,408.18
- Total balance: about $108,959.20, from $53,000 deposited
If deposits are made at the start of each period instead, multiply the deposit portion by (1 + i). The SEC’s free Investor.gov compound interest calculator runs the same calculation using an initial investment, monthly contribution, years, rate and a compounding frequency of annually, semiannually, quarterly, monthly or daily.
How to calculate compound interest in Excel or Google Sheets
Spreadsheets use the FV (future value) function. Microsoft documents it as FV(rate, nper, pmt, [pv], [type]), where rate is the interest per period, nper is the number of periods, pmt is the regular payment, pv is the starting amount and type is 0 for end-of-period or 1 for start-of-period payments. Google Sheets uses the same syntax.
- Lump sum only: =FV(0.05/12, 3*12, 0, -1000) returns about $1,161.47.
- With monthly deposits: =FV(0.06/12, 20*12, -200, -5000) returns about $108,959.20.
- Without FV: =1000*(1+0.05/12)^(12*3) gives the same lump-sum result.
Microsoft notes two common mistakes: keep rate and nper in the same units (divide an annual rate by 12 and multiply years by 12 for monthly), and enter money you pay in, such as deposits, as negative numbers so the result comes back positive.
Solving for rate, time or principal
You can rearrange the compound interest formula to answer other questions:
- Principal needed: P = A ÷ (1 + r/n)nt
- Rate needed: r = n × [(A ÷ P)1/(nt) − 1]
- Time needed: t = ln(A ÷ P) ÷ [n × ln(1 + r/n)]
For a quick mental estimate of doubling time, Investor.gov recommends the Rule of 72: divide 72 by the rate. At 9%, money doubles about every 8 years. At 6% compounded monthly, the exact time-to-double formula gives about 11.6 years, close to the rule’s 12. See how to use the Rule of 72 and how accurate the Rule of 72 is.
Simple vs. compound interest
Simple interest uses I = P × r × t and is paid only on the original principal. Compound interest adds each period’s interest to the balance. Investor.gov’s example shows the gap: $100 earning 5% a year grows to more than $162 in 10 years and almost $340 in 25 years with compounding. With simple interest, the same $100 would reach only $150 and $225. For a short comparison, read the difference between simple and compound interest.
Compounding works against you on debt. When interest on a loan or card balance is added to what you owe, you pay interest on that interest, so the same formula explains why unpaid balances grow.
Frequently asked questions
What is the formula for compound interest?
The compound interest formula is A = P(1 + r/n)^(nt), where A is the ending balance, P is the starting principal, r is the annual rate as a decimal, n is the number of compounding periods per year and t is the number of years.
How do you calculate compound interest monthly?
Set n to 12. Divide the annual rate by 12, raise (1 + r/12) to the power of 12 times the number of years, and multiply by the principal. For example, $1,000 at 5% compounded monthly for 3 years grows to about $1,161.47.
What is the formula for compound interest with monthly contributions?
Add the future value of the deposits to the growth of the principal: A = P(1 + i)^N + PMT × [((1 + i)^N − 1) / i], where i is the monthly rate, N is the number of months and PMT is the deposit made at the end of each month.
How do you calculate compound interest in Excel?
Use the FV function: =FV(rate, nper, pmt, pv). For $5,000 plus $200 a month at 6% for 20 years, enter =FV(0.06/12, 20*12, -200, -5000), which returns about $108,959.20.
What is the difference between simple and compound interest?
Simple interest is paid only on the original principal. Compound interest is paid on the principal and on interest already earned, so the balance grows faster over time.
How long does it take money to double with compound interest?
Divide 72 by the annual interest rate to estimate the years. At 6%, money doubles in about 12 years; the exact figure with monthly compounding is about 11.6 years.
Sources
- OpenStax College Algebra 2e: 6.1 Exponential Functions
- Consumer Financial Protection Bureau: How does compound interest work?
- Investor.gov (SEC): Compound Interest Calculator
- Investor.gov (SEC): What is compound interest?
- Microsoft Support: FV function
Image: Compound interest with varying frequencies, by Jelson25, CC BY-SA 3.0, via Wikimedia Commons.