Reference

The compound interest formula, derived.

The closed-form expression behind every figure this site reports, with each symbol named, each substitution shown, and a worked example you can reproduce in any spreadsheet.

The notation

  • P — initial principal (the amount you start with).
  • r — annual nominal interest rate, expressed as a decimal (5 % = 0.05).
  • n — compounding periods per year (12 for monthly, 365 for daily).
  • t — number of years.
  • PMT — contribution made every compounding period (per n).
  • c — contribution timing: 0 if at the end of each period, 1 if at the beginning.

1. Principal-only growth

With no contributions, the balance after t years is the original principal multiplied by a growth factor compounded n·t times:

FVP = P × (1 + r/n)n·t

Each compounding period, the balance grows by a factor of (1 + r/n). Over n·t periods, the factor compounds. This is the standard expression taught in every introductory finance textbook.

2. The annuity term

For a series of identical contributions PMT made at the end of every compounding period, the future value of the contribution stream is:

FVPMT = PMT × ( (1 + r/n)n·t − 1 ) / (r/n)

The intuition: the first contribution earns interest for almost the entire horizon, the last contribution earns no interest at all (it's deposited at the end of the final period), and every contribution in between sits between those bookends. Summing the geometric series gives the closed form above.

If contributions are made at the beginning of each period instead, every contribution earns one extra period of interest. Multiply the annuity term by an additional (1 + r/n):

FVPMT, begin = FVPMT × (1 + r/n)

3. Combined

The full future-value expression used by the calculator is:

FV = P × (1 + r/n)n·t  +  PMT × ( (1 + r/n)n·t − 1 ) / (r/n) × (1 + (r/n) × c)

4. Worked example

$10,000 starting principal, $250/month contribution (end of period), 7 % annual rate, monthly compounding, 25 years. Substituting: P=10,000, r=0.07, n=12, t=25, PMT=250, c=0.

  • r/n = 0.07/12 ≈ 0.005833
  • n·t = 300
  • (1 + r/n)300 ≈ 5.78145
  • FVP ≈ 10,000 × 5.78145 = 57,814.50
  • FVPMT ≈ 250 × (5.78145 − 1) / 0.005833 ≈ 204,846.43
  • FV ≈ 262,660.93

You can reproduce this in Excel with =FV(0.07/12, 12*25, -250, -10000, 0) which returns the same value to two decimal places.

5. Sanity checks

  • Zero rate. When r = 0 the formula's denominator r/n is also zero. The calculator branches to the limit case FV = P + PMT × n × t — just principal plus total contributions.
  • Zero contributions. Setting PMT = 0 reduces the expression to the principal-only form. Useful for verifying single-deposit scenarios.
  • Continuous compounding. As n approaches infinity, the formula approaches P × er·t. We do not expose continuous compounding in the dropdown because no real bank account compounds continuously, but the limit is a useful upper-bound mental check.