DEV Community

Keith So
Keith So

Posted on • Originally published at boring-math.com

The Math Behind Compound Interest (And Why It Breaks Your Intuition)

Most people know compound interest is powerful. Few people know why it feels so unintuitive.

Here's the thing: human brains think linearly. We expect 100/year to become 1,000 in 10 years. Compound interest doesn't work that way, and the gap between what we expect and what actually happens is where the real money lives.

Let me break down the actual math.

The Formula (It's Simpler Than You Think)

ext
A = P(1 + r/n)^(nt)

Where:

  • A = final amount
  • P = principal (starting amount)
  • r = annual interest rate (as decimal)
  • n = compounding frequency per year
  • t = time in years

That's it. One formula. But the magic is in the exponent nt. Exponents are what make this non-linear, and non-linear is what breaks your brain.

A Real Example

Say you invest 10,000 at 7% annually, compounded monthly, for 30 years.

Linear thinking says: 7% of 10,000 = 700/year x 30 = 21,000 in gains. Total: 31,000.

Actual result: 10,000 x (1 + 0.07/12)^(360) = 81,165

That's not a small rounding error. Linear thinking underestimates the real result by 61%.

Try it yourself with different numbers

Where the Money Actually Comes From

Here's the year-by-year breakdown that makes this click:

Period Balance Interest Earned That Year
Year 1 10,700 700
Year 5 14,026 918
Year 10 19,672 1,288
Year 20 38,697 2,534
Year 30 76,123 4,987

In year 1, you earn 700. In year 30, you earn 4,987 on the same original investment. The interest is earning interest, which earns more interest.

More than half your total gains come in the final 10 years. This is why starting early matters more than investing more.

The Frequency Question

Does compounding monthly vs. annually actually matter?

10,000 at 7% for 30 years:

Frequency Final Amount Difference vs. Annual
Annually 76,123 --
Quarterly 79,957 +3,834
Monthly 81,165 +5,042
Daily 81,662 +5,539

Monthly to daily? Nearly identical. But annual to monthly? That's a meaningful 5K difference on a 10K investment.

The Part Nobody Talks About: Inflation

Here's the uncomfortable truth that compound interest evangelists skip. Inflation compounds too, in the opposite direction.

If your investment grows at 7% but inflation runs at 3%, your real return is roughly 4%. That 81,165 nominal result? In today's purchasing power, it's closer to 33,400.

Still great. Still way better than a savings account. But the posts showing 10K becomes 80K are quietly ignoring that 80K won't buy what 80K buys today.

See how inflation erodes purchasing power with an inflation calculator.

What This Means Practically

1. Start now, not later.
Starting 10 years earlier with 5K beats starting later with 15K. The exponent does the work, but it needs time.

2. Regular contributions dominate.
10K one-off grows to 81K in 30 years. But adding just 200/month? That's 262,481. The monthly contributions matter more than the starting lump sum over long periods.

Use a savings goal calculator to figure out exactly how much you need to save monthly to hit a target.

3. Don't interrupt compounding.
Every time you withdraw and restart, you reset the exponent. A 30-year run beats three 10-year runs, even with the same rate, because the exponential curve is steepest at the end.

4. Real returns, not nominal.
Always think in real (inflation-adjusted) terms. A 7% return with 3% inflation is a 4% real return. Plan accordingly.

The Bottom Line

Compound interest isn't magic. It's an exponential function, and exponential functions are genuinely hard for human brains to estimate. Now you know the formula, the real numbers, and the inflation caveat that most explainers skip.

The best time to start was yesterday. The second best time is right now.


All calculators mentioned are free at boring-math.com. No sign-up, no tracking, instant results.

Top comments (0)