Today’s post is a bit more technical and math focused. The compound interest formula is an amazing tool to have at your disposal when making calculations. If you’re always relying on a compound interest calculator to do these calculations, then you may be limited in what types of scenarios you can model and explore. I needed to learn a bunch of the math behind compound interest when writing An Interactive Guide to Early Retirement and Financial Independence and wanted to share some of the takeaways.

## Why Should I Learn the Compound Interest Formula?

If you’re hoping to plan for the future, and you’re investing in the stock market, you’ll likely be modeling your growth around predicted returns. The compound interest formula can help this by answering two important questions:

How much will my current investments be worth at a specific future date assuming a predicted rate of return?

You can also use this formula with some tweaks to answer questions like:

How much will my current investments be worth at a specific future date assuming a predicted rate of return

and that I regularly contribute more?

This scenario, which I’ve heard referred to as “compound interest with periodic investments”, is the most common one for people seeking early retirement or financial independence. It’s also a little tougher to calculate. Once you have the formula, you can just plug in your numbers and **boom**, a date!

What’s harder to model, and what I won’t be discussing here is “compound interest with growing periodic investments”. That is, what if you got a raise of 3% each year, and also invested that? I’m curious to explore that math problem later, but today the focus will be on growth with known calculations.

## Compound Interest vs Simple Interest

These are both “interest” but the difference is how often the interest occurs. If interest is calculated once each year, then that’s “Simple Interest”. If interest is calculated more than once per year, that’s “compound interest”.

## Compound Interest Formula and Variables

Here’s the formula in its basic state and the variables.

That’s a lot of variables. Here’s a definition of each one.

This formula is solved for “Future Value”, which means in order for it to work, you’ll need to know your initial deposit amount, the annual rate of return, the number of times compounded per year and the number of years to wait.

If you don’t have these values, but instead have future value and want to solve for a different variable, don’t despair! That’s the position I was in a few months ago and ended up solving this formula for various different situations. Let’s explore these one by one, starting with *Future Value*.

### Example 1: Solve for Future Value of a stock

Let’s look at an example:

You have $10,000 (P) invested in a diversified portfolio that returns about 7% (r) a year (n=1). What will the value be in 15 years (t)?

For this breakdown, you can parse these into the following variables:

- FV = What we’re solving for
- P = $10,000 – our initial amount
- r = 7%, or 0.07 for the purpose of our calculation
- n = 1, since we’re compounding yearly. If stocks returned 7% a month, we could make this 12.
- t = 15 since that’s how many years we’re going for.

If you plug in the numbers, you’ll get the following:

So, we can calculate that the future value of $10,000 after 15 years at 7% will be **$27,590.31**. When you don’t need to compound multiple times in the period (like a monthly, quarterly, etc compounding), you can just skip thinking about *n*, and write it as follows:

For all of these examples, I’m going to be using 1 as the number of times we’re compounding, but I’ll still give the formula with n in case you need to use it.

### Example 2: Solve for time until reaching a future value

Let’s look at another example, but this time with an amount to save in mind. Maybe this is someone hoping to retire with $70,000 @ a 4% WR and they need $1.75 million:

I need $1,750,000 (FV) to retire. I have saved up $100,000 (P) so far. Assuming my investments return 7% (r) a year, how many years (t) will it be until I have saved up enough?

Solving for *t* in the compound interest formula takes some work. The part that I wasn’t aware of before doing a bunch of research is how you can use log to bring exponents down. I didn’t remember learning this in algebra class, but it’s a handy thing to know. For example:

This use of *log* is how you can transform the compound interest formula to solve for *t*. I’ll warn you though, the formula isn’t pretty.

Like example 1, n will be 1, so we can rewrite this a little cleaner.

We can plug in the numbers into the formula and get this:

This may seem like a lot at first. But in this case, you’re putting in $100,000 then just leaving things as they are for 42 years while they grow. If you were making periodic investments, then this would grow much faster.

#### Example 2 with an estimate using the rule of 72

One way to estimate out this without the full formula is to use the “rule of 72” this rule is helpful when asking the question “how often do investments double”. It’s not exact, but it’s a good starting point:

Divide the interest rate into 72 – that’s how often your value will double.

If we try that in our case, we can use 72/7% = 10.3 years. So every 10.3 years or so our investments would double. Let’s see how that pans out year by year.

- $200,000 after 10.3 years
- $400,000 after 20.6 years
- $800,000 after 30.9 years
- $1,600,000 after 41.2 years
- $3,200,000 after 51.5 years

We were looking for $1,750,000 after 42 years which does fall somewhere in the range using the “rule of 72” between the 41 and 51 years range. This shorthand won’t give you the exact date like the formula would, but it is useful if you wanted to make this same calculation in your head. When I’m trying to estimate compound interest, I use the rule of 72 rather the formula.

### Example 3: Solve for time with periodic investments

In example 2, we assumed that we wouldn’t make any additional investments. That’s probably not the case though. Let’s see how the formula is impacted when we want to save to that amount AND save more money each year.

I need $1,750,000 (FV) to retire. I have saved up $100,000 (P) so far. Assuming my investments return 7% (r) a year, and that I contribute an additional $25,000 a year (s), how many years (t) will it be until I have saved up enough?

For this, we need to introduce a new variable, *s*, which is your yearly contribution. This is probably the most useful formula for people pursuing financial independence since we’re usually saving additional funds each year. Here’s what this formula looks like:

Oof, that’s a lot going on in this formula! I’ll be honest, I don’t fully understand it, but that doesn’t stop me from using it. If you plug in the values for the variables, we can work this one out:

The value with periodic investments is way lower than without — **22.58 years** rather than 42.3 years. When you think about how your additional investments are being compounded, it adds up fast. In these 22 years, you’ll put in another $550,000 for a total amount invested of $650,000. That means that $1.1 million are gains on this in 22 years!

This formula is heavily used in the interactive guide to calculate how long it will be until you’re FI. This is also why it’s crazy hard to incorporate one-off windfalls into the formula. For instance: “I’m going to get $20k when I sell my house in 6 years, how will that impact this number?”. The math behind that goes way beyond my skill level. For modeling these more involved scenarios, I use Personal Capital* instead and let them worry about the math.

### Example 4: Solve for Present Value

What if we switch things around to where we don’t know our present value, but want to dream about the future with a specific rate?

How much do I need to invest now (P) in order to have $1,750,000 (FV) saved up in 20 years (t), assuming growth of 7% a year (r)?

This is the next easiest version of the initial formula, since it’s really just dividing both sides by one amount.

You’ll need $452k now in order to hit $1.75m in 20 years. If we try that with the rule of 72 (with our investment doubling about every 10 years), we can try it out and see if it matches up.

- $904,000 after 10.3 years
- $1,808,00 after 20.6 years

The rule of 72 isn’t exact, but it does confirm that in 20.6 years we’ll overshoot our goal – meaning that $1.75m isn’t too far under.

## Video Explanation of Compound Interest

Khan Academy has a great introduction explaining this topic in more detail if you’re more of a visual or audio learner.

## Calculating Compound Interest Using Google Sheets

Google Sheets and Microsoft Excel have a handy way of calculating future value built right in called the `fv`

formula. Let’s look at our initial question again, but solve it using Google Sheets for a specific timeframe.

I have saved up $100,000 (P) so far. Assuming my investments return 9% (r) a year, what will my account value be in 15 years (r) if I chip in an additional $25,000 each year?

The `fv`

formula documentation lists out the following inputs:

`FV(rate, number_of_periods, payment_amount, [present_value], [end_or_beginning])`

The `end_or_beginning`

part is new (for our purpose), but everything else is familiar. If you set `end_or_beginning`

to 0, it’ll be the same as the above formulas in this post (calculating interest at the end of the period). If you set it to 1, it’ll calculate interest at the beginning of the period. We can change these variables to the ones used in this post, it would look like this:

`FV(r, t, s, P, [end_or_beginning])`

You can fill in these using the values from the question and

`FV(0.07, 15, -25000, -100000, 0)`

The reason you have to put negative signs in front of these is that this formula is designed around paying off debt. You can tweak this by changing the signs. According to Google Sheets, you’ll have $904,128.70 after 15 years.

## Try Out the Compound Interest Formula

Next time you’re trying to calculate a future value of something, why not try calculating it yourself rather than relying on a calculator? It’s surprisingly easy to compute if you have the right formula handy.

*Have you calculated out compound interest manually? Why? Do you use the fv formula in your spreadsheets? What are you using them for?*

** – These are affiliate links.*

Lily @ The Frugal Gene

December 13, 2017

Alright this was definitely not the right post on my screen reader. It read the most random numbers to me hahahaha. I just learned the rule of 72 a few days ago and I’m using that because it’s the easiest. My husband also showed me how to calculate compound interest with Google with the first formula.

The last one might as well be scribbles!

Adam

December 14, 2017

Haha yeah, this would be a lot to try to hold in your head at once. The rule of 72 handles most cases around a raw amount doubling extremely well.

Cairy

October 29, 2018

Hi,

May I know how can I compute for the following?

“At a certain fixed rate of compound interest per annum, how long it takes to generate an investment of 1 to n? Assume that only one amount is invested at the beginning of the time and no withdrawal is allowed.”

Adam

October 29, 2018

That is an annoying phrased question if I ever saw one. Without actual numbers, the answer to that is going to be a formula rather than an actual answer. The “investment of 1 to n” part throws me a little though.

My guess is since that’s solving for T, it’s looking for the formula above in the “Example 3: Solve for time with periodic investments” section but with N being the amount rather than FV.