Compounding & Investing

The Compound Interest Formula, Explained

A = P(1 + r/n)^(nt), broken down variable by variable with worked examples.

The compound interest formula is A = P(1 + r/n)^(nt). It calculates how a principal P grows at annual rate r, compounded n times per year, over t years. On $1,000 at 8% for 10 years, annual compounding gives $2,158.92 while daily compounding gives $2,225.35 — compounding frequency matters, but time and rate matter more.

The formula

A = P(1 + r/n)nt

Each variable means something specific:

VariableMeaning
AFinal amount after interest
PPrincipal — the starting amount
rAnnual interest rate, as a decimal (8% → 0.08)
nCompounding periods per year (12 = monthly, 365 = daily)
tNumber of years

Worked example

Let's apply the deposit-style formula to $1,000 at a fixed 8% annual rate for 10 years, with no contributions. The only change is how often interest is credited. For investments such as stocks or ETFs, actual returns are not fixed interest rates, so this is a mathematical illustration rather than a market forecast.

Compounding frequencynResult
Annual1$2,158.92
Semi-annual2$2,191.12
Quarterly4$2,208.04
Monthly12$2,219.64
Daily365$2,225.35
Continuous∞$2,225.54

Annual compounding grows $1,000 to $2,158.92; daily compounding reaches $2,225.35 — a difference of about $66. Compounding frequency is real, but it's a small effect next to rate and time.

Try the calculator with your own numbers →

Why time is the real lever

Because time sits in the exponent (nt), extending the horizon can increase the effect of compounding substantially when the rate is held constant. The exact relationship depends on the rate and compounding convention; a real investment does not follow a constant-rate path. That's why starting earlier matters more than trying to pick a higher rate.

For example, $1,000 at 8% for 10 years is $2,158.92, but for 20 years it's $4,660.96 — more than double, because the growth compounds on itself.

Continuous compounding

As n grows toward infinity, the formula becomes A = Pert. It's the mathematical ceiling of compounding — the most growth mathematically possible at a given rate and time. For real accounts that credit daily or monthly, it's a few dollars' difference on modest sums, so it's mostly useful as a clean upper bound and a shortcut in higher math.

Risk & limitations

The formula assumes a constant rate, but real investment returns fluctuate year to year. Inflation, taxes, and fees are excluded and reduce real results. More frequent compounding helps, but it does not change risk. This is educational math, not a prediction or advice.

Note: The formula is standard compound-interest math. Long-run return context: NYU Stern (Damodaran) provides long-run return context. Educational projection only.

Frequently asked questions

What is the compound interest formula?
A = P(1 + r/n)^(nt), where A is the final amount, P the principal, r the annual rate as a decimal, n the compounding periods per year, and t the number of years.
What does n mean in the compound interest formula?
The number of compounding periods per year: 1 for annual, 12 for monthly, 365 for daily. Larger n means interest is added to the balance more often.
How do you calculate monthly compound interest?
Set n = 12 and use A = P(1 + r/12)^(12t). Example: $1,000 at 8% for 10 years compounded monthly is about $2,219.64.
What is continuous compounding?
The theoretical limit of compounding infinitely often, given by A = Pe^(rt). It produces a slightly higher result than any discrete frequency — here $2,225.54 versus $2,225.35 daily.

Last reviewed: September 2026.

Source & scope

The formula A = P(1 + r/n)nt describes discrete compounding at a fixed nominal rate. Investor.gov uses the same core inputs—principal, estimated annual rate, time and compounding frequency—in its educational compound-interest calculator. Market investments do not provide a fixed rate, so use this formula as a scenario model rather than a promise of returns.

Source: Investor.gov Compound Interest Calculator.

About Oliver Brooks

Oliver Brooks founded Caspenda after nine years working as a software engineer. He now runs an e-commerce business and has been investing for 19 years.

At Caspenda, he explains the math behind financial decisions using worked examples, stated assumptions, and links to original sources. The articles are educational and do not provide personal financial advice. More about Oliver.