The compound interest formula is one of those pieces of math that looks far scarier written out than it actually is once you know what each letter represents. Once you can read the formula fluently, you'll understand exactly what any online calculator is doing behind the scenes — and you'll be able to spot when an estimate looks wrong.
Try this calculator
Compound Interest Calculator
Put this guide into practice — enter your own numbers and see real-time results, no signup needed.
Calculate Compound Interest NowThe Core Formula
A = P × (1 + r/n)^(n×t)Where A is the final amount (principal plus all accumulated interest), P is the principal (starting amount), r is the annual interest rate expressed as a decimal, n is the number of times interest compounds per year, and t is the number of years the money grows.
Breaking Down Each Variable
Principal (P)
This is simply the amount you start with — a lump sum deposit, an initial investment, or a loan balance. If you have $8,000 to invest today, P = 8000.
Interest Rate (r)
Always convert the percentage to a decimal before plugging it into the formula. A 5% annual rate becomes r = 0.05. This is the single most common source of manual calculation errors — forgetting to divide by 100.
Compounding Frequency (n)
This tells the formula how many times per year interest is calculated and added to the balance. Annual compounding means n = 1. Monthly compounding means n = 12. Quarterly compounding means n = 4. Daily compounding is typically n = 365.
Time (t)
Expressed in years, including fractions of a year if needed. Eighteen months would be t = 1.5.
A Full Worked Example
Suppose you invest $8,000 at an annual rate of 5%, compounded monthly, for 10 years. Plugging into the formula: P = 8000, r = 0.05, n = 12, t = 10.
A = 8000 × (1 + 0.05/12)^(12×10) = 8000 × (1.004167)^120 ≈ 13,164.68After 10 years, your $8,000 has grown to approximately $13,164.68 — a gain of $5,164.68, or roughly 65% growth, without adding another dollar of your own money.
Isolating Total Interest Earned
The formula gives you the final amount, A, but you often want to know just the interest portion. That's a simple subtraction:
Interest Earned = A − PIn the example above, Interest Earned = 13,164.68 − 8,000 = 4,164.68... wait, let's recompute precisely: 13,164.68 − 8,000 = 5,164.68. This is the number most people actually care about when comparing offers or planning goals.
Adjusting the Formula for Regular Contributions
The basic formula above assumes a single lump sum with no further deposits. If you're contributing regularly (e.g., $200 per month into a retirement account), the calculation requires adding a second term for the future value of a series of contributions, often called an annuity calculation. This is why most real-world compound interest calculators separate 'initial deposit growth' from 'contribution growth' and sum the two.
FV of contributions = PMT × [((1 + r/n)^(n×t) − 1) / (r/n)]Where PMT is the regular contribution amount per compounding period. Adding this to the lump-sum formula gives the total projected balance including ongoing deposits.
A Second Worked Example With Contributions
Take $5,000 initial principal, contributing $250 monthly, at 6% annual return compounded monthly, over 15 years. The lump sum alone grows to roughly $5,000 × (1.005)^180 ≈ $12,297. The monthly contributions, using the annuity formula, add approximately $250 × [((1.005)^180 − 1) / 0.005] ≈ $72,875. Adding these together gives a projected total of roughly $85,172 after 15 years, from $5,000 initial plus $45,000 in total contributions ($250 × 180 months) — meaning growth alone contributed about $40,000 beyond what was deposited.
Pro Tip
When checking any calculator's output, sanity-check it against the Rule of 72 first. If a tool tells you $10,000 at 6% doubles in 20 years instead of roughly 12, either the rate, the compounding frequency, or the time horizon has been entered incorrectly.
Continuous Compounding: The Theoretical Limit
Some financial formulas use continuous compounding, where n approaches infinity. This uses Euler's number (e ≈ 2.71828) instead of the discrete formula:
A = P × e^(r×t)In practice, continuous compounding produces results only marginally higher than daily compounding, and few real-world financial products actually use it — but it appears in academic finance and options pricing models.
Common Formula Mistakes to Avoid
- Forgetting to convert the percentage rate to a decimal before calculating
- Using the annual rate directly in the exponent instead of dividing by compounding frequency
- Multiplying years by compounding frequency incorrectly (it should be n × t, not just t)
- Confusing nominal rate with effective annual rate when comparing two different offers
- Ignoring fees or taxes that reduce the effective rate of return in practice
Solving the Formula for Rate or Time Instead of Final Amount
Most people use the formula to solve for A, the final amount, but the same equation can be rearranged to answer different questions. If you know your starting principal and your target final amount, you can solve for the rate needed to get there, or the time required at a given rate — both useful for setting realistic goals rather than just observing outcomes.
To solve for time, rearrange the formula using logarithms: t = ln(A/P) / (n × ln(1 + r/n)). Suppose you have $15,000 and want to reach $30,000, at an assumed 6% annual rate compounded monthly. Plugging in: t = ln(30,000/15,000) / (12 × ln(1 + 0.06/12)) = ln(2) / (12 × ln(1.005)) ≈ 0.6931 / (12 × 0.004988) ≈ 11.58 years. This confirms the Rule of 72 estimate of 12 years is close but not exact — the formula-based answer is more precise.
To solve for rate, rearrange as: r = n × [(A/P)^(1/(n×t)) − 1]. If you have $10,000 and need it to grow to $18,000 in exactly 10 years compounded annually, the required rate is: r = (1.8)^(1/10) − 1 ≈ 0.0605, or approximately 6.05% annually. This kind of reverse calculation is especially useful when evaluating whether a specific savings goal is realistic given your timeline.
Verifying a Calculator's Output Manually
It's worth being able to spot-check any calculator's output using a simplified version of the formula, at least to catch major input errors. For a rough sanity check, compute the Rule of 72 doubling time first, then estimate roughly how many 'doublings' fit into your time horizon. At 6% (doubling roughly every 12 years), a 24-year horizon should produce close to 4x growth (two doublings), and a 36-year horizon should produce close to 8x growth (three doublings) — if a calculator's output is wildly outside this rough range, double-check the inputs before trusting the result.
Pro Tip
A fast manual check: if a calculator says your money grew by more than roughly 10x over a period shorter than three Rule-of-72 doubling periods, or grew by less than 2x over more than one doubling period, re-examine your rate, time, and compounding frequency inputs for an entry error.
Comparing Nominal Rate and Effective Annual Rate
Because the formula's exponent depends on both rate and compounding frequency, two accounts with the same nominal (stated) rate can produce different actual returns if they compound at different frequencies. The effective annual rate (EAR) converts any nominal rate and compounding frequency into a single comparable annual figure:
EAR = (1 + r/n)^n − 1A nominal 6% rate compounded monthly has an EAR of (1 + 0.06/12)^12 − 1 ≈ 6.17%. The same nominal 6% rate compounded daily has an EAR of (1 + 0.06/365)^365 − 1 ≈ 6.18%. Compounded only annually, the EAR is exactly 6%. This is why comparing the EAR (or APY, which is typically calculated the same way) rather than the nominal rate is the more reliable way to compare two different account offers.
A Note on Rounding and Precision
Manual calculations using this formula are sensitive to rounding, especially with monthly or daily compounding over long periods, since the small periodic rate gets raised to a large exponent. Carrying at least four to six decimal places through intermediate steps (rather than rounding the periodic rate to two decimal places early) avoids small errors from compounding into a noticeably wrong final answer over a multi-decade projection.
Putting the Full Formula to Work: A Combined Example
To tie every piece together, consider someone with $18,000 already saved, contributing $350 per month, expecting a 6.5% annual return compounded monthly, over 22 years. First, the lump sum: 18,000 × (1 + 0.065/12)^(12×22) ≈ 18,000 × (1.005417)^264 ≈ $75,394. Second, the contributions, using the monthly annuity formula: 350 × [((1.005417)^264 − 1) / 0.005417] ≈ $196,110. Adding both: approximately $271,504 after 22 years, from $18,000 + ($350 × 264 months) = $110,400 total deposited — meaning growth contributed roughly $161,104, nearly 60% of the final balance.
This combined calculation is exactly what a compound interest calculator with a contributions field does automatically behind the scenes — running both pieces of the formula and summing them, which is why understanding the two-part structure makes any calculator's output far easier to sanity-check.
What Happens When You Change One Variable at a Time
A useful exercise for building intuition is holding three of the four variables constant and changing only one, to see which lever moves the outcome most. Starting from the combined example above ($271,504 after 22 years): raising the rate from 6.5% to 7.5% (holding everything else constant) increases the final figure to roughly $319,000 — an 18% increase from a single percentage point. Extending the time horizon from 22 to 27 years instead (holding the rate at 6.5%) increases the final figure to roughly $391,000 — a 44% increase from five extra years. This single comparison illustrates, using one concrete example, why time horizon is generally the more powerful lever than rate improvements of similar apparent magnitude.