Skip to main content
Questions for Technical Minds

How is the compound interest formula derived

Last updated: 2026-11-10Author: WealthSyntax Editorial Team
#compounding

Short answer

The compound interest formula is derived by applying an interest rate r repeatedly to an accumulating balance. One period yields A_1 = P(1 + r); n periods produce the recurrence A_n = A_(n−1)(1 + r), resolving to A_n = P(1 + r)^n. Dividing annual rate r across k periods yields P(1 + r/k)^(kn), approaching Pe^(rn) under continuous compounding.

Educational content only, not financial advice. Examples use constant, hypothetical returns.
Mathematical Foundation

Formula and recurrence relations

Single Period: A_1 = P(1 + r)
Recurrence: A_n = A_(n−1) · (1 + r)
Closed Form: A_n = P(1 + r)^n
k Periods per Year: A_n = P(1 + r/k)^(kn)
Continuous Compounding: A_n = P · e^(rn)
With Regular Contribution: A_n = P(1 + i)^n + C · ((1 + i)^n − 1) / i
Symbol Legend:
P:Principal starting capital base
r:Nominal annual interest rate (as a decimal fraction)
k:Compounding frequency per year (e.g. 1=annual, 4=quarterly, 12=monthly)
n:Total elapsed time duration in years
A_n:Accumulated terminal balance at year n
C:Periodic cash contribution deposited at the end of each interval
i:Periodic interest rate applied each interval: i = r / k

1. One Period and the Recurrence Relation

Consider an initial principal P earning interest at an annual rate r over a single year. The interest generated at the end of the year is P * r. Adding this earned interest back to the starting principal yields the balance at the end of period 1:

A_1 = P + P*r = P(1 + r)

In the second period, interest is earned not merely on original principal P, but on the entire accumulated balance A_1. Thus A_2 = A_1(1 + r) = [P(1 + r)](1 + r) = P(1 + r)^2. For any period n, the recurrence relation is A_n = A_(n-1)(1 + r).

2. Closed Form and Proof by Mathematical Induction

Expanding the recurrence leads to the conjecture: A_n = P(1 + r)^n for all positive integers n. We prove this formally by mathematical induction.

Base Step: For n = 1, A_1 = P(1 + r)^1 = P(1 + r), which is true by definition.

Inductive Step: Assume the proposition holds for n = m, so A_m = P(1 + r)^m. By the recurrence relation, A_(m+1) = A_m(1 + r). Substituting the inductive hypothesis yields A_(m+1) = [P(1 + r)^m](1 + r) = P(1 + r)^(m+1).

Since the base case holds and the truth for m implies the truth for m + 1, the closed-form equation A_n = P(1 + r)^n holds for all positive integers n.

3. Compounding Frequency k and the Continuous Limit e^(rn)

When interest compounds k times per year, the annual rate r is divided into k equal periodic rates r/k, and the total number of compounding intervals becomes kn. The formula becomes A_n = P(1 + r/k)^(kn).

As compounding frequency approaches infinity (k -> ∞), interest compounds continuously. Let m = k / r, so k = mr. As k -> ∞, m -> ∞. Substituting m yields:

lim_(k->∞) P [ (1 + 1/m)^m ]^(rn) = P · e^(rn)

This proves why continuous compounding reaches Euler’s constant e as its theoretical mathematical ceiling.

4. Adding a Regular Periodic Contribution (Annuity Series)

When adding a regular contribution C at the end of each period, each deposit compounds for the remaining time. Deposit 1 compounds for (n-1) periods, while deposit n compounds for 0 periods:

Total Contributions Future Value = C(1 + i)^(n-1) + C(1 + i)^(n-2) + ... + C(1 + i)^0 = C * sum_(t=0)^(n-1) (1 + i)^t.

This is a finite geometric series with first term a = 1, common ratio q = (1 + i), and n terms. Applying the geometric series summation formula S_n = (q^n - 1) / (q - 1) gives C * ((1 + i)^n - 1) / i.

Combining the principal growth and contribution annuity yields the complete master formula: A_n = P(1 + i)^n + C * ((1 + i)^n - 1) / i.

Verified Worked Example

Compounding Frequency Scaling: $10,000 at 7% Over 10 Years

Type: frequency-scaling-schedule

We evaluate how terminal wealth changes as compounding frequency k shifts from annual to quarterly, monthly, daily, and continuous.

Terminal Wealth Comparison by Compounding Frequency on $10,000 at 7% for 10 Years
Compounding FrequencyFrequency kMathematical FormulaTerminal BalanceGain vs Annual
Annual1P(1 + r)^n$19,671.51Baseline
Quarterly4P(1 + r/4)^(4n)$20,015.97+$344.46
Monthly12P(1 + r/12)^(12n)$20,096.61+$425.10
Daily (365)365P(1 + r/365)^(365n)$20,136.18+$464.66
ContinuouscontinuousP · e^(rn)$20,137.53+$466.01

Numbered Step-by-Step Procedure:

1Step 1: Annual Compounding (k = 1)

$10,000 * (1 + 0.07)^10 = $10,000 * 1.967151 = $19,671.51.

$19,671.51
2Step 2: Monthly Compounding (k = 12)

$10,000 * (1 + 0.07/12)^120 = $10,000 * 2.009661 = $20,096.61 (+$425.10 vs annual).

$20,096.61
3Step 3: Continuous Compounding (k -> ∞)

$10,000 * e^(0.07 * 10) = $10,000 * e^0.70 = $10,000 * 2.013753 = $20,137.53 (+$466.02 vs annual).

$20,137.53
Observation: Increasing compounding frequency yields diminishing returns: moving from annual to monthly adds $425.10, but moving from monthly to continuous adds only $40.92.
Analytical Pitfalls

Common mistakes

  • ✕Confusing compounding frequency k with horizon duration n (e.g. entering monthly frequency as elapsed months).
  • ✕Omitting parentheses around exponents in code: evaluating P*(1+r)^k*n evaluates as [P*(1+r)^k] * n rather than ^(kn).
  • ✕Mixing up ordinary annuity (deposits at month-end) with annuity due (deposits at month-start), which changes the exponent of each deposit by +1 period.
Try it interactively

Compound Interest Systems Guide

Explore the full recurrence relation, exponential growth properties, and visual compounding models.

Open Compound Interest Guide
Further Reading

WealthSyntax provides educational systems analysis and financial mechanics for analytical minds.

Educational content only, not financial advice. Examples use constant, hypothetical returns.