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 unrealized 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," 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
5/19/05 0.00 0.0000 0.0000 0.0000 0.0000 10.0000
5/20/05 10,000.00 0.0000 1,000.00 1,000.00 10,000.00 10.0000

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.

We're off to a good start with our return tracking. In Part II of this article, we'll move on to buying stock, watching its value change, and computing our returns.

Check out Part Two of this series -- where we take on the nitty-gritty of computing your investing returns, using spreadsheets to keep track of your calculations.

Want to see the returns the Fool newsletters have been putting up? Consider a free trial to one of them. We have something for everyone -- value, dividends, small-caps, you name it.

Fool contributor Matt Richards is president of Richards Asset Management, and he would appreciate your feedback. Under no circumstances does this information represent a recommendation to buy, sell, or hold any security. The Motley Fool has an ironclad disclosure policy. To read some of Matt's other writings, visit The Motley Fool is investors writing for investors.