This page is quite old hence its rather spartan appearance.

Why not check out our Latest Stories page for our newest articles or search our site for anything.

Computing Your Investing Returns

By Matt Richards
July 20, 2005

Money managers, by and large, hate cocktail parties. Inevitably, one or another of the civilians at the party, one of those folks who do not live and die by their investing returns, will regale the manager with tales of his fabulous investing success. "I had Zaptronix last year at $8, sold it $16! I had Bubonix at $7, sold it at $22!"

The overenthused layman's hand is apparently so hot the manager wonders how he shook it without getting third-degree burns. Continuing in this vein, the fellow claims a 27% return on his past year's investing. But is his claim credible? A little more conversation elicits the following facts:

  • The investor computed his 27% return by taking the unweighted average return of his closed transactions.
  • He did not take into account uninvested cash when doing his calculations.
  • Neither did he include unrealised gains and losses.
  • Finally, he used his brokerage account as a checking account, adding and withdrawing money at will.

The first three of those items make his calculations incorrect, and the fourth makes doing the calculations properly a bit more difficult. Computing investing returns is mildly complicated, so it's understandable that self-directed investors tend to use less-than-correct methods. But it's not that difficult to do it right -- really! Now let's take a moment to talk about the proper way to calculate returns.

Complex jargon, easy concept
Most people's minds shut off the instant they hear a term as frightening as time-weighted internal rate of return (TWIRR), but don't let it happen to you! We'll use a colloquial, easy-to-understand definition that suits our purposes. For us, TWIRR will simply be a standard method for determining a rate of return that properly accounts for cash moving in and out of the account.

For instance, if you had $10,000 in an account and you added $10,000, and at the end of the year you had $20,000, you wouldn't want to say you had doubled your money. TWIRR simply removes the effect of that added cash and shows how your underlying investments performed. It's the method used by mutual funds and other investing entities to report their returns, so we're computing returns that are comparable with others we see reported.

What's at risk?
One small thing before we begin -- it's important that you decide exactly what money is at risk when you do your investing. This includes not only stocks you own but also any uninvested cash that you consider to be part of your investing pool. The goal of investing is to achieve a return on all of your funds, not just the portion you happen to have bought things with. So you need to make a clear determination of what monies constitute your investable funds.

The easiest way to do this is to consider your brokerage account, including any cash balance, as constituting your investable funds. If you use an external money market fund to hold your excess cash, you should use the sum of the two accounts. Either way, make this determination and stick to it. Note that you are not precluded from using your brokerage account as a checking account under the rules I'm describing, since the TWIRR method will factor out cash inflows and outflows.

From a philosophical point of view, though, you might want to think about whether money supposedly waiting to be invested should be used instead to pay the electric bill. If you need it for that, you probably shouldn't have been considering putting it in the stock market to begin with.

It's all about cash flows
Investing returns come down to one thing -- how much cash goes into the pool of investable funds versus how much comes back out. It is not necessary to track every single investment and its outcome to compute your returns. You need to know only three things:

  • When, and how much, money went into the account.
  • When, and how much, money came out of the account.
  • What the value of the account was on a given day.

We're going to model your investment account as though it were a mutual fund. When you put money into the account, you buy shares at the current net asset value, or NAV. When you take money out, you sell them. The magic of this process is that it removes the effects of the cash flowing in and out of the account from the computation of returns.

The "You Fund"
To track your returns, we'll create a spreadsheet that shows the flows in and out of the hypothetical "You Fund." Each line in the spreadsheet will contain the same information: the date, the amount of cash in/out (if any), the starting shares, the number of shares bought or sold, the ending shares, the value of the account, and the net asset value.

For each row, we enter the date, the cash in/out, and the account value. The other entries are calculated. "Start shares" is "end shares" from the previous row, "shares in/out" is "cash in/out" divided by "NAV" from the previous row, "end shares" is "start shares" plus "shares in/out," and "NAV" is "account value" divided by "end shares." Whew!

Sometimes we will want an entry that simply tells us the NAV for that day. Let's call these "memo" entries. For these, there will be no cash in/out shown; thus, no shares in/out and no change in the number of shares (end shares = start shares). We enter the account value to get the NAV for that day.

We will also have entries where cash goes in or out of the account. When cash goes into the account, we enter that amount in the "cash in/out" column as a positive number. When we remove cash, we enter the amount as a negative number. This causes "shares in/out" to be computed, and "end shares" to increase or decrease. For cash in/out entries, we always do a memo entry for the day before to get an NAV for the end of that day that can then be used by the cash in/out entry.

What's so nice about this method is that every line of the spreadsheet contains the same formulas, so we can simply copy down the last line each time we need to make a new entry, and enter the new date, cash in/out, and account value to get the new data.

Let's open the You Fund with $10,000. We arbitrarily set the initial number of shares at 1,000 -- thus making the net asset value $10 per share, and set up a spreadsheet to track the value of our holdings.

DateCash in/outStart sharesShares in/outEnd sharesAccount valueNAV

Note that when we buy shares, we assume we bought them in the morning at the previous night's closing NAV, so we had to set the net asset value to 10 for the day before the initial transaction. The fund is all in cash, so our account value remains the same at the end of the 20th. We now own 1,000 shares of the You Fund, valued at $10 each.

To create this entry, we enter the date and the amount of incoming cash in the first two columns. The start shares should be brought down from the end shares of the previous row, which in this case is zero. Shares in is computed as the cash in divided by the NAV from the previous row. End shares is start shares plus shares in. The account value comes from an account statement. In this case, the cash deposited is worth its value -- $10,000. Finally, the NAV is computed as the account value divided by the end shares.

Note that this was a "cash in" entry. Preceding it, we created a memo entry to establish the NAV at the end of the preceding business day. The second line records the actual purchase of shares.

Now we'll buy some stock. Remember, we're treating our holdings as if we were managing them as a fund -- in this case the "You Fund."

Let's say we bought 150 shares of Microsoft (Nasdaq: MSFT) at $25, and 150 shares of Yahoo! (Nasdaq: YHOO) at $37, investing $9,300 (plus $20 in commissions) of our $10,000 -- leaving $680 in cash. We make no entry in the spreadsheet regarding this purchase. Purchases and sales within the account do not affect our computation of returns.

A month from now Microsoft is trading at $26, and Yahoo at $39. We'd like to know how we're doing, so we add a line to our spreadsheet, giving us this:


Cash in/

Start shrs.Shrs. in/
End shrs.Acct. valueNAV*


*NAV refers to the net asset value of our
makeshift fund. $ figures in thousands

The entry for 6/20 is a full memo entry that allows us to compute our returns. For 6/20, since no cash went in or out, we entered that amount as $0. Start shares was brought down from the previous row's end shares. The start shares entry is equal to the end shares from the previous entry. Since the cash in/out entry is $0, shares in/out is 0, and the end shares for 6/20 is the same as the start shares. We enter the account value of $10,430, which is 150 times $26 for the Microsoft stock, plus 150 times $39 for the Yahoo! ($9,750 total), plus the $680 in uninvested cash, in the "account value" column. (Presumably we just took the total value for our account from a statement or Web page and plugged it in here.) Finally, the NAV is computed as the account value divided by the end shares, or $10.43.

So far, so good, and not terribly complicated. The shares in our hypothetical "You Fund" have risen from $10 to $10.43, for a profit of 4.3%. This makes sense, since our cash deposit into the account was $10,000, and the account is now worth $10,430. Note that these calculations include the uninvested cash. If we had calculated our return solely based on our Microsoft and Yahoo! investments, we might have been tempted to say that we were up $430/$9,300 = 4.62%. But that would be wrong! Our uninvested cash, earning 0%, drags our return down to 4.3%.

The 4.3% return is our return to date, of course, and not an annualised return like those reported by mutual funds. To get an annualised return, we'll take our return to date, divided by the fraction of the year that has gone by. In this case, 4.3% / (31/365) = 50.63%. Note that this is an uncompounded rate of return, which is the conservative approach, since compounding the return for such a short period of time is probably not appropriate. In fact, annualising the return for such a short period of time, as we've done above, is definitely not appropriate, but I know you'll do it anyway, so you might as well do it properly. Just don't take it too seriously, because it does not provide credible evidence regarding your likely investing performance -- yet.

Since the entry for 6/20 is there only to allow us to calculate the returns through that date, we can leave it in the spreadsheet or not, as we see fit. For now, we'll leave it. In fact, if you make a new entry for each business day, you'll end up with a full, graphable record of your returns. Pretty cool!

Three more months go by, and on Sept. 20 we decide to pull $300 out of the "You Fund." Our stocks are still trading at $26 and $39, so the value of the account has not changed. This is a "cash going out" entry. It is a two-line entry, like the "cash coming in" entry. As with the "cash coming in" entry, we first need a memo entry that shows the NAV for the night prior to the withdrawal, in order to determine the price of the shares we "sold." In this case the NAV (again computed as the account value divided by the number of shares) is still $10.43. We make an entry in the spreadsheet for the previous day, and another for today:


Cash in/outStart shrs.Shrs. in/outEnd shrs.Acct. valueNAV*



*NAV refers to the net asset value of our
makeshift fund. $ figures in thousands

To create the cash out entry we enter the date and the amount of cash going out (as a negative number) in the first two columns. As always, start shares is equal to end shares from the previous row. Shares out is equal to cash out divided by the NAV from the previous row. End shares is start shares plus shares out. With shares out as a negative number, our end shares are less than the start shares. For account value, we again enter from a statement or Web readout, and we compute NAV as account value divided by end shares.

Here we see how the TWIRR method factors cash out of the computations. Note that the removal of cash does not affect the NAV. We simply sell a number of shares whose value is equal to the amount of cash withdrawn, and remove them from the account. The NAV doesn't change, which means our returns don't change, except for the fact that more time has elapsed.

Two months later, we've reached the six month mark. Our investments have blossomed; Microsoft is at 28, and Yahoo at 41. Here's what our spreadsheet looks like now, with another memo entry added:


Cash in/outStart shrs.Shrs. in/outEnd shrs.Acct. valueNAV*

*NAV refers to the net asset value of our
makeshift fund. $ figures in thousands

We're doing pretty well! After six months, we are up 11.0478/10 minus 1 = 10.48%. More importantly, our method has correctly computed our returns, despite a cash withdrawal along the way.

Another month goes by, and during that month we sell our shares of Microsoft for $31 each, net of commission. This adds $4,650 in cash to our account, which brings us to a total of $5,030 in cash when we add the uninvested $380. Meanwhile, Yahoo! is at $43. Here's our spreadsheet now:

DateCash in/outStart shrs.Shrs. in/outEnd shrs.Acct. valueNAV*





*NAV refers to the net asset value of our
makeshift fund. $ figures in thousands

Excellent! After seven months we are up 18.2%, or roughly 31.04% annualised (15.1 / (214/365)). Note that nowhere in our spreadsheets are our buys and sells listed explicitly. As I mentioned earlier, all that matters is the total value of the account at any given time, not when individual buys and sells are made, or at what prices.

Continuing the process is simply a matter of making new entries whenever cash goes into or out of the account, and putting in the occasional memo entry to check your returns. If you want a continuous record, make an entry that includes each day's end-of-day account value.

In fact, I think the best way to continue the process is to do just that. Make an entry each day, indicate any cash in or cash out, and update the account value. This combination of memo/cash entry serves both functions, and gives you an end-of-day NAV showing each day's account value.

While maintaining this spreadsheet may seem difficult at first, you'll quickly get used to it. Once you get in the habit, you'll always know your true returns, and you'll be able to brag about them with pinpoint accuracy the next time you're at a cocktail party.

I have provided a sample spreadsheet here that you can use as a basis for your own measuring. Good luck!

(See this article on Fool.com that deals with some follow-up questions from readers.)

This series consists of articles originally published on our US site, Fool.com.