Skip to main content

Compound Interest Formula Explained (With Examples)

The compound interest formula is A = P(1 + r/n)nt: your final amount equals your principal times one plus the periodic rate, raised to the number of compounding periods. Plug in $5,000 at 7% compounded once a year for 10 years and you get $9,836 — a $4,836 gain on money you never touched. This guide explains every variable, works the example step by step, and shows how to handle monthly compounding and monthly contributions.

The compound interest formula A = P(1 + r/n)^(nt) with P = $5,000, r = 0.07, n = 1, and t = 10, growing $5,000 to $9,836.
Each letter in the formula maps to one real input: principal, rate, frequency, and time.

The compound interest formula

Compound interest means you earn interest on your interest, not just on your original deposit. The standard formula captures that in one line:

A = P(1 + r/n)nt

This is the same equation behind the $10,000 + $500 monthly scenario and the SEC's Investor.gov compound interest calculator. If you only ever remember one personal-finance formula, this is the one worth keeping.

What each variable means

VariableMeaningExample value
AFinal amount (what you end up with)$9,836
PPrincipal — the amount you start with$5,000
rAnnual interest rate, as a decimal0.07 (for 7%)
nCompounding periods per year1 annual, 12 monthly, 365 daily
tTime in years10

The two variables people get wrong are r and n. The rate must be a decimal (7% is 0.07, not 7), and n has to match how often the account actually compounds. More on both below.

A worked example, step by step

Take $5,000 at a 7% annual rate, compounded annually (n = 1), for 10 years. Drop the values in:

A = 5,000 × (1 + 0.07/1)1×10

Simplify the inside first, then the exponent:

  • 1 + 0.07 = 1.07
  • 1.0710 = 1.9672
  • 5,000 × 1.9672 = $9,836

Of that $9,836, your original $5,000 is principal and $4,836 is interest. Stretch the same money to 30 years and it reaches $38,061 — the curve gets steeper the longer you leave it alone.

Check the math yourself — leave monthly at $0 for a pure lump-sum result:

Verify $5,000 at 7% for 10 years
Future value: $9,836

Approximate; annual compounding and monthly contributions.

Monthly vs annual compounding in the formula

The variable n controls how often interest is added. Raising it nudges your result up, because interest starts earning interest sooner. Same $5,000 at 7% for 10 years:

CompoundingnFinal amount
Annual1$9,836
Monthly12$10,048
Daily365$10,068
Continuous (Pe^rt)$10,069

Notice the gap shrinks fast. Going from annual to monthly adds $212; going from monthly all the way to continuous adds only about $21 more. At ordinary savings and investing rates, compounding frequency is a rounding detail — the rate and the time horizon do the real work. At the limit, the formula becomes A = Pe^(rt), where e is about 2.718.

Adding monthly contributions changes the formula

The lump-sum formula assumes you deposit once and walk away. Most people add money every month, and each deposit has its own, shorter time to compound. That calls for a second piece — the future value of a series of payments (an annuity):

FV = PMT × [((1 + i)N − 1) / i]

Here PMT is the payment, i is the periodic rate (r/n), and N is the total number of payments (n × t). For $200/month at 7% for 10 years with monthly compounding (i = 0.07/12, N = 120), the contributions alone grow to about $34,617. Add a $5,000 starting balance and the total lands near $44,665.

Ordinary annuity vs annuity due

Timing matters slightly. If you contribute at the end of each period (an ordinary annuity), use the formula above. If you contribute at the start of each period (an annuity due), multiply by one more (1 + i) — your $34,617 becomes about $34,819. Worth knowing, rarely worth losing sleep over. To run a full contribution schedule without doing this by hand, see $10,000 plus $1,000/month over 20 years or set your own numbers in the calculator.

How to solve for time, rate, or principal

Because the formula is just algebra, you can rearrange it to answer the reverse question.

Solve for time

t = ln(A / P) / (n × ln(1 + r/n))

To double your money at 7% compounded annually: t = ln(2) / ln(1.07) = about 10.2 years. That is exactly what the Rule of 72 approximates when it says 72 ÷ 7 ≈ 10.3 years — the mental shortcut and the real formula agree.

Solve for rate

r = n × [(A / P)1/(nt) − 1]

Want to know what return turns $5,000 into $10,000 in 10 years (annual compounding)? r = 21/10 − 1 = about 7.2%.

Common mistakes with the formula

1. Forgetting to convert the percent to a decimal. Use 0.07 for 7%, not 7. Plugging in the whole number turns a realistic projection into a fantasy.

2. Mismatching n and t. If you compound monthly, n is 12 and t is still in years — the exponent nt converts to months for you. Don't also change t to 120.

3. Entering the APY instead of the nominal rate. A bank's advertised APY already bakes in compounding, so feeding it back into the formula double-counts. APY vs interest rate explains which number to use.

4. Treating it as a forecast. The formula assumes a single, fixed rate. Real markets bounce around, so a 7% projection is a planning baseline, not a promise. For why a 10% market return is not 10% of real spending power, see real vs nominal return.

When to use a calculator instead

The formula is perfect for understanding why money grows. For an actual plan — a starting balance, a monthly contribution, a rate, and a time horizon, with a year-by-year breakdown — a calculator is faster and harder to fumble. Reach for the indexed $10,000 + $1,000/month hub when you want to compare time horizons, and the methodology page when you want to confirm exactly how it computes.

Frequently asked questions

What is the compound interest formula?

It is A = P(1 + r/n)nt, where A is the final amount, P is the principal, r is the annual rate as a decimal, n is the number of compounding periods per year, and t is years. For contributions, add the annuity term FV = PMT × [((1 + i)N − 1) / i].

How do you calculate compound interest by hand?

Convert the rate to a decimal, add 1, raise it to the number of periods, then multiply by the principal. For $5,000 at 7% annually for 10 years: 1.0710 = 1.9672, and 5,000 × 1.9672 = $9,836.

What is the formula with monthly contributions?

Use the lump-sum formula for your starting balance, then add the future value of an annuity, FV = PMT × [((1 + i)N − 1) / i], where i = r/n and N = n × t. Add the two results together for your total.

How is it different from simple interest?

Simple interest only ever earns on the original principal, so it grows in a straight line. Compound interest earns on principal plus accumulated interest, so it curves upward. See simple interest vs compound interest for a side-by-side.

Now that the formula makes sense, put real numbers behind it:

All examples assume a fixed rate and the compounding frequency stated; actual returns vary. This article is educational and does not constitute financial advice.