My Authors
Read all threads

Get a cup of coffee.

(Or, as the wise @JohnLegere says, get many cups of coffee!)

In this thread, I'll show you how to do CAGR calculations.

For those unfamiliar, CAGR = Compounded Annual Growth Rate. It's also called IRR (Internal Rate of Return).


Imagine that you bought 100 shares of Google ($GOOG) on Dec 31, 2015 (about 4.5 years ago).

At that time, $GOOG was trading at $758.88 per share. Today, it's at $1,515.55.

Assuming you're still holding on to your 100 shares, what's your rate of return on this investment?

Well, your initial investment was $75,888 (100 shares times $758.88 per share).

That $75,888 has now grown to $151,555 (100 shares times $1,515.55 per share).

This growth has happened between 2015-Dec-31 and 2020-Jul-17 -- a period of 1,660 days.

So you just plug these numbers into the standard compound interest formula:

And if you rearrange the terms in the formula, you get your CAGR.

In this case, your CAGR works out to about 16.43%.

Essentially, what this 16.43% CAGR means is:

Suppose you found a bank that paid 16.43% interest annually.

And suppose you deposited $75,888 into that bank on 2015-Dec-31.

Then, your money would have grown to $151,555 by 2020-Jul-17 -- same as your $GOOG investment.

But you don't usually just buy a stock once and hold on forever.

You add to your position over time. Sometimes, you trim your position.

How do you calculate your CAGR in such cases?

Let's take an example.

Say you bought 100 shares of $GOOG on 2015-Dec-31.

Then, on 2017-Apr-25, say you bought 50 more shares.

Then, on 2018-Jul-27, say you sold 70 shares.

This left you with 100 + 50 - 70 = 80 shares, which we'll assume you're still holding today:

As the table above shows, your actions result in some cash inflows and outflows over time.

Every time you buy stock, there's a cash outflow. And every time you sell, there's a cash inflow.

Here they are, marked on $GOOG's stock chart:

You can create a "cash flow timeline" that neatly captures these inflows and outflows. Like so:

Going back to the bank analogy: every cash *outflow* is like a *deposit* you make into a hypothetical bank account that's compounding your money.

And similarly, every cash *inflow* is like a withdrawal you make from the same bank account.

Imagine what would happen if you actually made these deposits and withdrawals.

Each deposit will give you a "benefit" that compounds over time, and each withdrawal will negate some of the benefit created by the deposits.

For example, buying 100 shares of $GOOG on 2015-Dec-31 gives you the benefit of $75,888 compounding for 1,660 days.

And selling 70 shares on 2018-Jul-27 erases the benefit of $86,695 compounding for 721 days.

This all follows from the "cash flow timeline" above.

These compounding benefits and negations all ultimately add up to your end balance ($121,244 in this case).

To capture this, we write a "CAGR equation".

The left side (LHS) of the equation takes care of all the compounding. The right side (RHS) is your end balance.


All that remains is to solve this equation to find R (our CAGR).

But this equation is *not* like the earlier equation we solved.

In the earlier equation, we could just rearrange the terms to solve for R.

But here, that's not possible. We need more powerful techniques.

Graphing the LHS and the RHS is a good way to solve this equation.

You take R on the X-axis.

And on the Y-axis, you graph both the LHS and the RHS.

Wherever the LHS and RHS meet, that R is your CAGR.

Like so:

There's also another way to solve the CAGR equation.

You start with a "guess" for R.

Say, R = 10%.

If R was really 10%, what would your end balance (on 2020-Jul-17) be after the compounding effect of all the deposits and withdrawals?

Easy. This is just your LHS evaluated at R = 10%. In this case, it works out to $32,808.

This is *lower* than your real end balance: $121,244 (the RHS).

So your CAGR has got to be better than 10%.

OK. Let's try 20% then.

Now, the LHS works out to $128,209.67.

This is *higher* than your end balance of $121,244.

So your CAGR can't possibly be as high as 20%.

That means your CAGR lies somewhere between 10% and 20%.

OK. What about 15%?

Turns out the LHS for R = 15% is only about $97,534 -- also *lower* than your end balance.

So your CAGR has to be higher than 15% but lower than 20%.

Carrying on this way, you can narrow down your CAGR into a very tight range.

This is called "the bisection method" of solving the CAGR equation.

You start with a CAGR guess. At the beginning, this guess may be wide off the mark. But you keep iterating and improving upon it. Pretty soon, you're really close to the right answer.

Here's the bisection method in action for this particular example. As you can see, bisection finds the same answer as the graphical method (CAGR = 18.94%), but with much higher precision.

Dividends can complicate the picture a little. But don't worry: the principle is the same.

Just treat each dividend as a cash inflow on its pay date. Add these inflows to the cash flow timeline. Then use the same procedure (graphical or bisection) to calculate CAGR.

Here's a picture summarizing the 3 steps of a CAGR calculation:

1) Prepare a cash flow timeline,
2) Write down the CAGR equation, and
3) Solve this equation either graphically or via bisection.

CAGR is a key metric we investors use to judge the performance of individual investments, portfolios, funds, and even fellow investors.

It's super important to know how to calculate CAGRs correctly. I hope this thread helps.

Thanks for reading. Enjoy your weekend!

Missing some Tweet in this thread? You can try to force a refresh.

Keep Current with 10-K Diver

Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!

This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!