Applications of Calculus: Continuously Compounded Interest

by Justin Skycak on

Deriving the "Pert" formula.

This post is part of the series Connecting Calculus to the Real World.


Suppose you invest a principal amount of money, $P,$ into an account with interest rate $r$ that is compounded $n$ times per year. After $t$ years, there would be nt total compoundings, each by a factor $1+(r/n),$ so your principal amount grows to an amount

$\begin{align*} A = P \left( 1 + \frac{r}{n} \right)^{nt}. \end{align*}$

Annual compounding means $n=1.$ Monthly compounding means $n=12.$ Daily compounding means $n=365.$ If you compound every minute, then $n=(365)(24)(60)=525600.$ If you compound continuously, then you take the limit as $n$ goes to infinity.

You might recall “Pert,” the formula for a continuously compounded investment:

$\begin{align*} A = Pe^{rt} \end{align*}$

But where does that formula come from?

We can use calculus to derive it.

Taking the limit as $n$ approaches infinity, we have

$\begin{align*} \lim_{n \rightarrow \infty} P \left( 1 + \frac{r}{n} \right)^{nt} = P \left[ \lim_{n \rightarrow \infty} \left( 1 + \frac{r}{n} \right)^n \right]. \end{align*}$

To derive the formula, we need to show that

$\begin{align*} \lim_{n \rightarrow \infty} \left( 1 + \frac{r}{n} \right)^n = e^r. \end{align*}$

By taking the natural log and rearranging the expression, we can get something that looks a bit like a difference quotient:

$\begin{align*} \ln \left[ \left( 1+\frac{r}{n} \right)^n \right] &= n \ln \left( 1+\frac{r}{n} \right) \\[5pt] &= \frac{r \ln \left( 1+\frac{r}{n} \right) }{r/n} \\[5pt] &= r \left[ \frac{\ln \left( 1+\frac{r}{n} \right) - 0}{r/n} \right] \\[5pt] &= r \left[ \frac{\ln \left( 1+\frac{r}{n} \right) - \ln(1)}{r/n} \right] \end{align*}$

Define $h=r/n.$ As $n$ goes to infinity, $h$ goes to $0,$ so

$\begin{align*} \lim_{n \rightarrow \infty} \ln \left[ \left( 1+\frac{r}{n} \right)^n \right] &= \lim_{n \rightarrow \infty} r \left[ \frac{\ln \left( 1+\frac{r}{n} \right) - \ln \left( 1 \right)}{r/n} \right] \\[5pt] &= \lim_{h \rightarrow 0} r \left[ \frac{\ln \left( 1+h \right) - \ln \left( 1 \right)}{h} \right] \\[5pt] &= r \lim_{h \rightarrow 0} \frac{\ln \left( 1+h \right) - \ln \left( 1 \right)}{h} \end{align*}$

Now it looks exactly like a difference quotient. In fact, it is the derivative of the natural log taken at $1{:}$

$\begin{align*} \lim_{h \rightarrow 0} \frac{\ln \left( 1+h \right) - \ln \left( 1 \right)}{h} &= \frac{d}{dx} \left[ \ln (x) \right]_{x=1} \\[5pt] &= \left[ \frac{1}{x} \right]_{x=1} \\[5pt] &= 1 \end{align*}$


$\begin{align*} \lim_{n \rightarrow \infty} \ln \left[ \left( 1+\frac{r}{n} \right)^n \right] &= r \lim_{h \rightarrow 0} \frac{\ln \left( 1+h \right) - \ln \left( 1 \right)}{h} \\[5pt] &= r(1) \\[5pt] &= r. \end{align*}$

Since order does not matter with logs and limits (the log of a limit is the limit of the log), we also have

$\begin{align*} r &= \lim_{n \rightarrow \infty} \ln \left[ \left( 1+\frac{r}{n} \right)^n \right] \\[5pt] &= \ln \left[ \lim_{n \rightarrow \infty} \left( 1+\frac{r}{n} \right)^n \right]. \end{align*}$

Using the definition of natural logarithm,

$\begin{align*} \lim_{n \rightarrow \infty} \left( 1+\frac{r}{n} \right)^n = e^r. \end{align*}$


$\begin{align*} \lim_{n \rightarrow \infty} P \left( 1+\frac{r}{n} \right)^{nt} &= P \left[ \lim_{n \rightarrow \infty} \left( 1+\frac{r}{n} \right)^n \right]^t \\[5pt] &= P \left[ e^r \right]^t \\[5pt] &= Pe^{rt}. \end{align*}$

This post is part of the series Connecting Calculus to the Real World.