Finance · 8 min read

How to Calculate Compound Interest (and Why It Matters)

Why a 22-year-old investing $200/month can retire with twice as much as a 32-year-old investing $400/month — explained from first principles.

By WebGenAI · · Updated

Compound interest is the single most important concept in personal finance and one of the most counterintuitive ideas in mathematics. Albert Einstein supposedly called it the eighth wonder of the world (he probably didn't, but the quote sticks because it captures the truth). The reason: when interest earns interest on interest, growth stops being linear and starts being exponential, and exponential growth surprises everyone.

This article explains how compound interest actually works, where the formula comes from, and why starting investments five years earlier can leave you with twice as much money at retirement — without saving an extra dollar.

Simple vs compound interest

Simple interest calculates returns only on the original principal. Put $1,000 in an account paying 5% simple interest, leave it for 20 years, and you'll have $2,000 — the original $1,000 plus $50 in interest each year for 20 years.

Compound interest calculates returns on the principal plus accumulated interest. Put that same $1,000 in an account paying 5% compounded annually, leave it for 20 years, and you'll have $2,653. The extra $653 is interest on previously-earned interest. Stretch the timeline to 40 years and compound interest leaves you with $7,040 vs $3,000 simple — more than double.

The formula

The compound interest formula is `A = P(1 + r/n)^(nt)`. `A` is the final amount, `P` is the principal, `r` is the annual interest rate as a decimal, `n` is the number of times interest is compounded per year, and `t` is the number of years.

Most savings accounts compound monthly (`n = 12`); some compound daily (`n = 365`). The difference between annual and continuous compounding at typical rates is small — a few basis points — but at high rates (20%+) it becomes significant.

For periodic contributions (you add money every month, like a 401(k) or DCA into the stock market), the formula extends: `A = P(1+r/n)^(nt) + PMT × ((1+r/n)^(nt) - 1) / (r/n)`. Most calculators handle this for you; the underlying math is just the sum of a geometric series.

The Rule of 72

A useful mental shortcut: divide 72 by the annual return rate (in percent) to estimate how many years it takes for an investment to double. At 6% annually, your money doubles in roughly 12 years. At 9%, in 8 years. At 12%, in 6 years.

The math behind it: `(1 + r)^t = 2` solves to `t = ln(2)/ln(1+r)`, which is approximately `0.693/r` for small `r`. Multiply both sides by 100 to get the rule of 72. It's accurate within 1% for rates between 4% and 12%.

Why starting early matters so much

Consider two investors. Alice invests $200/month from age 22 to age 32 (10 years, $24,000 total), then stops contributing but leaves the money invested until age 65. Bob invests $200/month from age 32 to age 65 (33 years, $79,200 total). Both earn 8% annually.

Alice ends up with $419,000. Bob ends up with $362,000. Alice invested less than a third of what Bob did and still came out ahead, because her early contributions had 33 years of compounding ahead of them while Bob's first contributions had only 33 years and his last contributions had only one.

The lesson: time in the market beats timing the market, and time in the market beats amount in the market for any reasonable amount.

Real vs nominal returns

Inflation eats into compounding. A 7% nominal return with 3% inflation produces a 4% real (inflation-adjusted) return. For long-term planning, use real returns — otherwise you'll overstate the purchasing power of your future balance.

Historic data: US stocks have returned roughly 10% nominal / 7% real annualized over the last century. Bonds have returned roughly 5% nominal / 2% real. Cash savings rarely beat inflation. Use 6–7% real as a reasonable long-term equity return for planning.

Where compound interest works against you

The same exponential math applies to debt. A credit card balance at 22% APR doubles every 3.5 years if you only pay the minimum. A $5,000 balance left alone becomes $10,000 in 3.5 years and $20,000 in 7. This is why credit card debt is the financial emergency people most underestimate.

Mortgages compound, too, but at much lower rates. The same calculator works for both — `r` is the rate, `t` is the term, and the formula tells you what you'll actually pay over 30 years (often 1.5–2× the original loan).

Practical takeaways

  • Start investing as early as possible, even with small amounts. $50/month at 22 beats $500/month at 40.
  • Automate contributions. Behavior beats math; you'll skip months if you have to decide each time.
  • Use tax-advantaged accounts (401(k), IRA, ISA, RRSP) — taxes are friction that compounds against you over decades.
  • Pay off high-interest debt before investing. A 20% APR balance is a guaranteed 20% loss.
  • Reinvest dividends. They're a meaningful chunk of long-term equity returns.

Wrapping up

Compound interest rewards patience over insight, contributions over cleverness, and decades over months. The most powerful thing you can do for your future net worth is to start, automate, and leave it alone.

Our free compound interest calculator lets you model different contribution rates, time horizons, and compounding frequencies in seconds. Plug in your numbers, see what regular contributions produce over 10, 20, or 40 years. The motivation tends to follow the chart.