Finance
Compound Interest, Explained in the Math Your Calculator Actually Uses
Published · 8 min read
The formula is five symbols long: A = P(1 + r/n)^(nt). Einstein called it the eighth wonder of the world. It underpins every savings calculator, every retirement plan, every mortgage amortization schedule, every Roth IRA projection, and every credit card balance that has ever gotten out of hand. And yet the intuition behind it, how each of those five symbols actually behaves, is surprisingly unevenly understood. Here is a walk through each variable, what moves it, and what it means for the decisions the formula is used to make.
P: principal, the input nobody thinks about
P is the starting amount. It is boring and linear: doubling principal doubles the final value at any fixed rate and time. The reason it feels unimportant is that the other variables compound. But compounding amplifies whatever principal you start with. $1,000 at 7% over 30 years grows to $7,612. $10,000 at the same rate and time grows to $76,123. The entire retirement-saving game is a long lever on P, because a dollar saved at age 25 is worth something like eight dollars saved at 55. This is the argument for maxing out a 401(k) match as early in your career as you can stomach.
r: the annual rate, where expectations meet reality
r is the nominal annual interest rate, expressed as a decimal. For a savings account at 4.5% APY, r = 0.045. For the long-run S&P 500 real return, r ≈ 0.07. For credit card debt, r = 0.20 or higher. r is the single largest lever in the formula, because it sits inside the exponent, small changes compound into enormous differences over long horizons.
A one-percentage-point difference in r over 40 years changes the final balance by roughly 40%. $100/month invested over 40 years at 6% produces $200,145. At 7%, $264,012. At 8%, $349,101. The mechanism that makes index funds more powerful than savings accounts in retirement planning is exactly this sensitivity to r.
n: the compounding frequency trap
n is how many times per year interest is compounded: 1 annually, 12 monthly, 365 daily. Marketing copy makes a big deal of this. Mathematically, once n is greater than 12, further increases barely move the needle. The APY/APR relationship makes this quantifiable: APY = (1 + APR/n)^n − 1. At 6% APR:
- Compounded annually (n=1): APY 6.000%
- Compounded monthly (n=12): APY 6.168%
- Compounded daily (n=365): APY 6.183%
- Compounded continuously: APY 6.184%
The difference between daily and continuous compounding is 0.001%. Nobody should choose a product for it. The SEC’s Investor.gov compound interest calculator lets you tweak n and see this directly.
t: time, the cheat code
t is years. Because of the exponent, more time makes the curve steeper, not linear. The famous Rule of 72 compresses this into a single line: doubling time ≈ 72 ÷ rate. At 6%, money doubles every 12 years. At 8%, every 9. At 12%, every 6. A 40-year retirement horizon at 7% delivers roughly 5.75 doublings, a factor of about 54×. A 20-year horizon at the same rate delivers 1.75 doublings, or about 3.4×. Extending the horizon is so powerful that delaying retirement by five years can produce bigger final balances than doubling monthly contributions.
What the formula hides
Two things worth naming. First, the formula assumes the rate is constant, which real markets never are. Averaging 7% over 40 years is not the same as 7% every year: sequence-of-returns risk means a bad decade at the start is worse than the same decade at the end. Second, the formula ignores taxes and fees. A 1% annual fund fee compounded over 40 years eats roughly 24% of the final balance. The SEC’s mutual fund cost calculator is explicit about this drag.
Put the math to work with the compound interest calculator to project a savings path. For retirement, use the FIRE calculator to see your FIRE number. For a Roth IRA specifically, the Roth IRA calculator applies the same compounding math with a tax-free withdrawal assumption at the end. And for debt, the credit card payoff calculator shows how ugly the formula gets when it runs in reverse.
Frequently Asked Questions
- What is the compound interest formula?
- A = P(1 + r/n)^(nt), where A is the final amount, P is principal, r is the annual interest rate as a decimal, n is the number of compounding periods per year, and t is time in years. For continuous compounding, use A = Pe^(rt), which produces the theoretical upper bound.
- What is the Rule of 72?
- A mental shortcut for estimating how long money takes to double at a given annual rate: divide 72 by the rate. At 6%, money doubles in 72÷6 = 12 years. At 10%, in 7.2 years. The rule is accurate within a fraction of a year for rates between 4% and 12%.
- Does compounding frequency really matter?
- Less than most people think. At 6% APR, $10,000 over 10 years grows to $17,908 compounded annually, $18,194 monthly, and $18,221 daily. The jump from annual to monthly is meaningful; the jump from monthly to daily is minor. The difference between monthly and continuous compounding is effectively noise.
- How does compound interest apply to debt?
- The same formula runs in reverse. Credit card debt at 24% APR compounded daily produces an effective APY of 27.1%. An unpaid $5,000 balance doubles in just over three years if nothing is paid. This is why paying minimums on high-rate debt is almost mathematically impossible to escape without changing the inputs.