Compound Interest

The formula

One formula. All the math.

Compound interest has exactly one formula. Everything else — monthly deposits, inflation, effective APY — is a layer on top. Here it is, with a worked example you can poke at.

The core formula

A = P (1 + r/n)nt
A
The future value — what the balance becomes.
P
The principal — your starting amount.
r
The annual interest rate, as a decimal (8% → 0.08).
n
Compound periods per year (12 = monthly, 365 = daily).
t
The number of years the money stays invested.

With regular deposits

A = P (1 + r/n)nt + PMT · [ ((1 + r/n)nt − 1) / (r/n) ]

The second term is the future value of an annuity — a regular deposit ofPMT every period. End-of-period deposits use the formula as-is; start-of-period deposits multiply the annuity term by(1 + r/n) because each deposit earns one extra period of interest.

Worked example

$10,000 at 8%, monthly, for 20 years.

  1. 01

    Convert the rate.

    r = 0.08, n = 12. So r/n = 0.08 / 12 = 0.006667.

  2. 02

    Count the periods.

    n · t = 12 · 20 = 240 compounding periods.

  3. 03

    Raise 1 + r/n to the power nt.

    (1.006667)240 ≈ 4.9268. That's your growth factor — the balance will multiply by nearly five.

  4. 04

    Multiply by the principal.

    $10,000 × 4.9268 ≈ $49,268. That's the future value with no monthly deposits.

  5. 05

    Add a $200 monthly deposit.

    PMT · [(4.9268 − 1) / 0.006667] ≈ 200 × 589 ≈ $117,800. Combined with the principal growth, you end at roughly$167,000— of which only $58,000 is money you contributed.

The lesson

Of the final $167,000, $58,000 is yours and $109,000 is interest. That split — interest beating contributions — is the magic. It only shows up if you start early and don't touch it.

Try it live

Edit the inputs below — the formula runs instantly.

Live·

Inputs

$
%
Time horizon
Regular contributions: (optional)
$
%
Inflation & tax⌄
%

Shown as a "real" value in today's money.

%

Applied once at the end of the horizon.

Future value
—
—
After
—
Contributed
—
Principal + deposits
Interest earned
—
—
Effective APY
—
—

Growth over time

Principal, contributions, and interest — stacked year by year.

PrincipalContributionsInterest

Year-by-year breakdown

Opening balance, deposits, interest, closing balance.

Show table
YearOpeningNet flowsInterestClosing

Start compounding, keep compounding.

Open the calculator, change one number, and watch the long tail.